by Vishal Kumar – Lead Consultant
Overview of Descriptive Flexfields
Descriptive Flexfields (DFF) provide customizable expansion space on the EBS user interfaces; and are used to track information that is important and unique to the business that otherwise would not be captured with seeded functionality.
Descriptive flexfields in Oracle R12 have broadly two different types of segments – global and context-sensitive.
1. A global segment is a segment that always appears in the descriptive flexfield pop–up window.
2. A context-sensitive segment is a segment that may or may not appear depending on what other information is present in your form.
A descriptive flexfield can get context information from either a field somewhere on the form, or from a special field (a context field) inside the descriptive flexfield pop–up window. If the descriptive flexfield derives the context information from a form field (either displayed or hidden from users), that field is called a reference field for the descriptive flexfield. A descriptive flexfield uses columns that are added to a database table. A descriptive flexfield requires one column for each possible segment and one additional column to store structure information (the context value). The descriptive flexfield columns are usually named ATTRIBUTEn, where n is a number.
In some business use cases, users need to create a context-sensitive DFF in the UI page that needs to populate automatically. This can be easily achieved by using the OAF Controller Extension with specific responsibility so that it doesn’t impact any other functionalities/seeded Oracle flows.
What is Controller Extension, and Why Does it Matter?
To extend the OA Framework page, you have two options. You can either extend the VO or extend/create the new controller class.
1. Extending a VO is on a global level, and you pick this option if you want to add extra columns to be displayed on the screen.
2. Extending/creating a controller class is to do the additional logic/behavior on the page, and it can be assigned on all levels (function/site/organization/responsibility/etc.)
So, for the desired task, we would complete this via Controller Extension at the responsibility level so that the scope is limited to the selected responsibility only.
How to Complete Controller Extension and Default DFF Context and Segments
Defaulting the value of a Descriptive Flexfields Context or Segment values on an OA Framework page comes up frequently. It is possible to achieve this functionality using a Controller Class (CO) extension in Oracle R12. The below example will focus on the code necessary to default the values using a CO extension. Please note that setting a DFF segment to be required in the Controller is different from setting up a DFF segment as required when it is configured. When a segment is set to be required in the application, it is required on all responsibilities throughout the EBS applications. Using the custom code approach allows you to set default values, and mark specific segments required only when necessary.
Let us consider the following DFF: Party Site Information under the Receivables module in Oracle R12, and the goal is to default the context value to one of the contexts defined and set the required field to one of the segments for the Responsibility while creating a Party Site.
To begin the process of achieving the desired result
1. Identify the DFF name and setup – The goal is to default the context value to Foodservice on the OA Framework page.
Navigation: (R)Application Developer -> Flexfield -> Descriptive -> Segments
2. Identify the OA Framework page and its controller.
a. Click on the ‘About this Page’ link at the bottom of this page. To enable the “About this page” link at the bottom of each OA Framework-based page, there is a profile option called FND: Diagnostics (FND_DIAGNOSTICS) set to Yes at User Level.
b. Under the controller’s list, identify the controller which should be extended.
An extension is to be developed for the controller oracle.apps.ar.hz.components.address.webui.HzPuiAddressCreateUpdateCO in order to accomplish the need.
3. Complete the controller extension
Setup the JDeveloper environment for the respective EBS Suite/OA Framework. You can refer to the OA Framework: How to Identify Required Oracle JDeveloper Patches For Oracle E-Business Release 12.x or 11i (Doc ID 416708.1) on Oracle support for more details.
Sample Code:
a. To set the Context Value
b. Segments Behavior
4. Setup the extended controller at responsibility level – To do this, personalize the OA Framework page and update the Controller to newly created controller.
a. Click on Personalize Page link. To enable the above link, Personalize Self-Service Defn profile is set to Yes at user level.
b. To complete personalization of the layout, click on the personalize pencil button that is marked/highlighted below.
c. Instead of calling the standard controller, the system should call the custom controller at Responsibility level as shown below.
5. Move the Java file to server, Create class file, generate customall.jar/customprod.jar and bounce the middle-tier services. Verify the behavior in the application after this.
- Generating class file would be fundamental after writing Java code. This can be achieved via javac <fileName>.java.
- Generating jar file and middle tier bounce is usually a DBA Activity.
a. Context Value Defaulting
b. Segments Behavior
Summary
This blog aims to clarify that setting a DFF segment as required or default in the Controller is not the same as configuring it as required. When a segment is set to be required in the application, it is mandatory for all EBS Applications responsibilities. However, using the custom code approach via Controller Extension enables you to mark particular segments as required and easily set default values based on business requirements.
References
- OA Framework: How to Identify Required Oracle JDeveloper Patches For Oracle E-Business Release 12.x or 11i (MOS Note 416708.1)
- https://docs.oracle.com/cd/A60725_05/html/comnls/us/fnd/ogendf08.htm
- https://doyensys.com/blogs/steps-to-controller-extension-in-oaf-page/
- Developing and Deploying Customizations in Oracle E-Business Suite Release 12.2 (Doc ID 1577661.1)
Elevate your user experience, streamline data entry, and enhance reporting efficiency.
Discover the power of setting values for Descriptive Flexfield’s context and segments based on your Oracle R12 responsibility. Contact the author or our team of experts to learn more.
Vishal Kumar – Lead Consultant
Email: [email protected]
LinkedIn: www.linkedin.com/in/vishalsomisetty/