Requirement is to restrict some data from LOV available on OAF pages or Core Forms.
If LOV is available at Core forms, it’s difficult to restrict data as core form personalization does not support this level restriction.
If we are at OAF page view extension (OAF customization) is the option to restrict LOV data. In next lines we shall discuss an easy method to restrict data in LOV for both Core forms and OAF pages.
How to achieve this?
It’s quite easier to restrict LOV data using Oracle provided data restriction method. Oracle recommends VPD for data restriction, which can be a better approach over OAF customization.
This can be useful for core forms as well.
Use below steps to implement this –
>Find out the source for LOV data –
OAF Page – Go to about this page >> Find associated VO >> Check the underlying SQL
>> Find the table/view having actual data >> Use VPD to restrict the data on source table/view
Core Form – Get the fmb file (from AU_TOP) and open in form builder >> Find the associated LOV >> Find Attached Data Source
>> Find the table/view having actual data >> Use VPD to restrict the data on source table/view
Use of VPD over OAF customization will be easy to maintain and deploy to higher instances.
Example:
Restrict Create Order options on order (Buyer work center) page:
Create LOV has 2 options 1) SPO and 2) CSPO >> we need to exclude SPO option
Find the source for LOV data and got that source table is PO_DOC_STYLE_LINES_TL
Created function to restrict SPO on the source table
Add this function to policy.
Go to application and check the create option –