How to add Descriptive Flexfields (DFF) in an Oracle Apps Framework (OAF) page
I had tried my hand on a requirement that came my way in which I had to add a few fields on a Oracle Applications Framework (OAF) page. I found that this can be easily achieved by configuring DFF or Descriptive Flexfields on those transaction which the OAF page is accessing.
Navigate to the OAF page
For the demonstration we shall a DFF segment to the Expense report creation page. Let us navigate to the page.
Note that Oracle Apps should be enabled for OAF personalization. To set this, you can check another article in this site.
This page shows the expense report header information. This means we first need to ensure that the DFF is enabled for expense report header. When we enable the page to show the DFF it will appear in the Additional Information section.
Let us find the DFF that has to be enabled. Since the DFF will be on expense report header then the table in question is AP_EXPENSE_REPORT_HEADERS_ALL. We can find out the DFF name for this table from the process given in another article.
The DFF title is Expense Report and application is Payables. Let us query this DFF.
Responsibility: Application Developer
Navigation: Flexfield > Descriptive > Segments
Let us add a segment to this DFF. Enable the DFF by unchecking the field, Freeze Flexfield Definition.
Click on Segments button.
Add an attribute as shown above. Double click on the segment button (the blue button on the left of Number field) to open the Segmentsdetails form.
Note that, Required, field is checked. This means that the DFF has to be filled out for every expense report entered. Now save and compile the flexfield. For details on flexfield changes you can refer to the following article.
On successful compilation of the DFF you will get the following message.
Let us go back to the Create Expense report page.
You will find the DFF segment shown as a field on the OAF page. Since the segment was set up as a mandatory field on the DFF Segments form above, this field on the OAF page has become mandatory. Click on Next button without entering a value in theCountry field. An error message will be displayed on top of the page.
Let us populate Country with a value, say, IN.
Now the error has been rectified and Oracle will allow going into the next page if we click Next button.
Now suppose we do not want to display the DFF segment on the form as it might be used for some concurrent program processing. But the default setting will make the DFF visible to the user. We have to carry out the following steps.
First we have to make the DFF segment non mandatory so that Oracle allows making the field invisible to user.
Note that mandatory DFF fields are not allowed by Oracle to be made invisible using personalization
Open the DFF segment setup and drill down to the Segment form.
Uncheck Required field. Save and compile the DFF.
Clear the mid tier cache and ensure that Apps is enabled for personalization. To do this you can refer to this article. Now go back to theCreate Expense Report page.
Observe that the DFF field, i.e. Country, is no longer mandatory. Click on Personalize Page link on the top right corner of this page.
Personalize page options will open. Scroll down until you find, Flex: Additional Information, section. This is the Additional Information section of the page which shows the DFF. If you do not want to scroll down and search for this manually you can search for Flex at the top of the screen (previous screenshot) and click on Go button.
Click on the Personalize icon (shaped like a pencil)
The personalization options page is displayed. We need to turn off visibility of this DFF. Hence we will set Rendered = False on the Function level so that Oracle will make this field invisible at all levels, i.e. Site, Responsibility or User.
Click on Apply button.
Go back to the Expense Report creation page.
The DFF is not visible to the users now. This is an easy way of adding additional fields on OAF pages. This process is fine when the requirement is simple but for more complex requirements, like adding validation after adding a field, we have to go for customizing the OAF page.