Oracle Apps Notes

A collection of my random notes, primarily on Oracle Apps

Category Archives: DFF

Finding the name of a DFF in a seeded Form

The first step in enabling a Descriptive Flex Field (DFF) in a seeded Form is to find out the name of the DFF. Identifying a DFF involves the following steps:

1. Navigate to the Form which contains the DFF which needs to be identified. In this example, we will consider the Transactions Form under the Receivables Manager responsibility.

2. Click on the DFF and then go to Help>Diagnostics>Examine to open the  ‘Examine Field and Variable Values’ window, note down the Block and Field names.

3. In the ‘Examine Field and Variable Values’ window, select  $DESCRIPTIVE_FLEXFIELD$ as the Block and enter <BLOCK_NAME>.<FIELD_NAME> as the Field. <BLOCK_NAME> and <FIELD_NAME> are the values obtained in Step#2. Press the TAB key or click on the Value field. The name of the DFF will be displayed in the Value field along with the application under which it is registered.

4. You can now navigate to Application Developer>Flexfield>Descriptive>Register  and execute a query with the DFF name (obtained in Step#3) in the Title field to obtain the complete details of the DFF.

Read-Only DFF Segments

Converting normal fields in Oracle Applications Forms into read-only fields is a fairly common requirement and it can be achieved quite easily using Form Personalization. All you need to do is to set the ‘ENABLED’ property of the item to ‘FALSE’.

Read-only Field using Form Personalization

With Descriptive Flexfield Field(DFF) segments however, things become a little more complicated since DFF segments cannot be modified through Form Personalization. Metalink Notes#1289789.1 and 735423.1 explain why it is not possible to alter DFF segments through Form Personalization.

So, coming back to the original question- how do we make a DFF segment read-only? Well, there are three ways:

  • By implementing Security Rules. Click on the link for more details.
  • Through CUSTOM.pll using the FND_DESCR_FLEX.UPDATE_DEFINITION() API. This method will enable or disable the entire DFF and not individual segments. Click on the link for more details.
  • By populating the Value Set of the DFF segment dynamically at run-time with a single value. This approach is based on the premise that if the Value Set of the DFF segment contains only one value then the segment effectively becomes a read-only segment. Here is how you do it:
  1. Create a custom table and register it with AOL. It should contain at least two columns- one for storing the segment value, one for storing the user_id.
  2. Use Form Personalization in the form containing the DFF to populate the table created in Step#1 with the value that you want the DFF segment to display and the user_id of the user accessing the form. You can do this from the WHEN-NEW-FORM-INSTANCE or any other suitable trigger and by using the FORMS_DDL builtin. The sequence of commands in the builtin should be:   delete from custom table any existing records created by the current user – insert value into custom table along with the current user’s user_id – commit.
  3. Create a table validated Value Set based on the custom table and add ‘column_name= :$PROFILES$.USER_ID’ (where column_name is the name of the column in your custom table which stores the user_id) in the where clause to ensure that only the record created by the current user is returned.
  4. Attach the Value Set created in Step#4 with the read-only DFF segment.

We need to store the user_id and access the Value Set based on the correct user_id because in a production environment, the same Oracle Applications form might be accessed concurrently by multiple users leading to multiple records being inserted in the custom table. Since the success of this approach depends on a single value being returned, so we need to limit the values returned by the value_set using the user_id.