Today, I need to get an AP inovice id from an SLA event_id. From xla_events table, I got the entity_id for the event. And then I directly query xla_transaction_entities table with entity_id, but nothing can be gotten.
It is very strange. Under the same schema apps, why there is this entity_id in xla_events table, but not exists in xla_transaction_entities table? xla_events and xla_transaction_entities are both the synonym in apps schema from xla schema!!! They’re the views!!!
In R12, oracle introduce a new concept – DB Policy, which will be assign to table and table’s synonym. It is used to apply MOAC security to table and synonym. (Maybe my express is not very suitable here. I’m not a technical person. I can only do some simple queries
Let’s have a look at below two sql query.
No DB Policy assigned to XLA.XLA_TRANSACTION_ENTITIES
Several DB policies are assigned to XLA_TRANSACTION_ENTITIES synonym in apps schema. That’s why I can’t query out my event entity from apps schema in normaly way.
Why can we get the event from xla_events? Let’s have a look at xla_events’s db policy.
There’s no db policy on xla_event synonym in apps.
OK. Finally, after understanding the mechanism, I can get my event entity by adding xla. pre-fix now.