Descriptive Flex Fields
Descriptive Flex Fields
Flex Fields
Flex Field is nothing but a normal field but it is a ore flexible in the application either to extend the form functionality
1. Descriptive Flex Fields: DFF will be used to capture extra information from the end user
2. without changing form code and without altering database table
Customization of DFF
Open the form in application (PO, AP…) we will find the fields which are enclosed with [ ] it is nothing but a DFF we can
enable this DFF by using Application Developer Responsibility
Find the DFF title from following navigation
Help Menu – Diagnostics – Examine and enter password as apps and Block name $Descriptive Flex field$ we will
find the list of DFFs in the fields select Field: PO_REQ_HDR_DESCRIPTIVE_F4 we will find the DFF in the value
fields Value: Requisition Header (Oracle Purchasing)
Copy the value go to Application Developer
N – Flex field – Descriptive – Segments and enter and press F11 enter the title Ctrl + F11
Un check the checkbox called Freeze Flex field definition select segments button enter the column names
select attribute column and value set and save the transactions.
Check the check box called Freeze Flex Field Definition click on compile button internally system will
submit concurrent program (Flex field view Generation) to compile flex field it will generate one flex field
view to capture the data.
The view name will be database table name _DFV
Go to the form where DFF is attached, place the cursor, it will open DFF form enter the data save it go to
backend query the records.
Attribute9 Buyerlocaton,
Attribute13 Last Date
From PO_REQUISITION_HEADER_ALL
Where segment1=’15467’
Create the value set in system administrator; attach the value set at the time of creating DFF
column name in the value set field.
We can make the DFF column is optional or mandatory by selecting required check box in the
segments form.
Context Field: While creation of DFF we can define multiple structures based on the user selection we can change the DFF
structure. While defining the context field we will enter context field values for every context value there will be a structure
here we can use the entire attribute column from attribute 1 to 15.
NOTE: One we use the attributes in one structure we can use the same attributes in another structure, because
user can enter only one structure details at a time.
NOTE: Once we enter the value in the context field it will be stored in the Database column called Attribute
Category
DFF KFF
1. DFF will be used to capture EXTRA Information 1. KFF will be used to capture KEY Information
2. Attribute columns will be used 2. Segment columns will be used
3. We can register MAX DFF 3. We have 29 built in KFF we are not suppose to create new KFF
4. DFF will be accept what ever Data we enter 4. KFF we can define rules to capture valid data
5. WE have context field 5. WE have no Context field
6. DFF data will be stored in Attribute Columns 6. DFF codes will be stored in segments KFF description will be stored in FND_FLE
System
Last Query
Application
Name
Accounting Flexfield GL GL_CODE_COMBINATIONS
Assets KFF FA FA_ASSET_KEYWORDS
Category Flexfield FA FA_CATEGORIES_B
Location Flexfield FA FA_LOCATIONS
Sales Tax Location Flexfield AR AR_LOCATION_COMBINATIONS
Territory Flexfield AR RA_TERRITORIES
Item Catalogs INV MTL_ITEM_CATALOG_GROUPS
Item Categories INV MTL_CATEGORIES_B
Stock Locators INV MTL_ITEM_LOCATIONS
System Items INV MTL_SYSTEM_ITEMS_B
*******
Set of Books
Currency
Calendar
Chat of Account
*******
Select Name,
Currency_code Currency
Period_set_name Calendar
Chat_of_account_id ChartOfA/C
From GL_SET_OF_BOOKS
*******
*******
Structure Column
While defining the KFF we will find structure column field if it is null value then KFF has got only one structure, if there is a
structure column that will find multiple structure, open the segments form query the records based on KFF title, we will find
structure details
For Accounting KFF structure column is CHART_OF_ACCOUNTS_ID
And we will get all the structure details from this table – GL_CHARTS_OF_ACCOUNTS.
All the accounting KFF transaction will be stored in the data based table called GL_CODE_COMBINATIONS
1) P_CONC_REQUEST_ID
2) P_FLEXDATA
3) P_STRUCT_NUM segment1||’\n’||segment2||’\n’||segment3||’\n’||…….||’\n’||segment30
CODE = "GL#"
NUM = ":P_STRUCT_NUM"
APPL_SHORT_NAME = "SQLGL"
OUTPUT = "P_FLEXDATA"
MODE = "SELECT"
DISPLAY = "ALL");
view rawgistfile1.sql hosted with by GitHub
SELECT
&P_FLEXDATA
FROM
KFF Table
WHERE KFF Structure Column = :P_STRUCT_NUM;
6) Define Formula Column and CALL another User Exit from formula column
CODE = "GL#"
NUM = ":P_STRUCT_NUM"
APPL_SHORT_NAME = "SQLGL"
VALUE = "to get KFF Values we will give formula column Name"
MODE = "SELECT"
DISPLAY = "ALL");
P_FLEXDATA: It is one of the lexical parameter having the default value it is a contribution of all the segment columns, we will use
this lexical parameter in the select statement to retrieve the data from database
P_STRUCT_NUM: This is a bind variable will be used to capture KFF structure number
FND FLEX SQL: It is one of the User Exit we will define in the before report trigger to retrieve KFF segments data
FND FLEXIDVAL: This is another user exit will called from formula column to display the KFF data in the output
1) P_CONC_REQUEST_ID
2) P_FLEXDATA
3) P_STRUCT_NUM
L_NAME VARCHAR2(100);
begin
l_name :=fnd_profile.value('GL_SET_OF_BKS_NAME');
select chart_of_accounts_id
into :P_STRUCT_NUM
FROM gl_sets_of_books
SRW.REFERENCE(:P_STRUCT_NUM);
SRW.USER_EXIT('FND FLEXSQL
CODE = "GL#"
NUM = ":P_STRUCT_NUM"
APPL_SHORT_NAME = "SQLGL"
OUTPUT = ":P_FLEXDATA"
MODE = "SELECT"
return (TRUE);
end;
6) Take the Formula column and place it in query and edit the PL/SQL editor
begin
SRW.REFERENCE(:P_STRUCT_NUM);
SRW.REFERENCE(:C_FLEXDATA);
SRW.USER_EXIT('FND FLEXIDVAL
CODE = "GL#"
NUM = ":P_STRUCT_NUM"
APPL_SHORT_NAME = "SQLGL"
DATA = ":C_FLEXDATA"
VALUE = ":CF_DATA"
MODE = "SELECT"
DISPLAY = "ALL"
IDISPLAY = "ALL"');
RETURN(:CF_DATA);
end;
begin
SRW.REFERENCE(:P_STRUCT_NUM);
SRW.REFERENCE(:C_FLEXDATA);
SRW.USER_EXIT('FND FLEXIDVAL
CODE = "GL#"
NUM = ":P_STRUCT_NUM"
APPL_SHORT_NAME = "SQLGL"
DATA = ":C_FLEXDATA"
DESCRIPTION = ":CF_DESC"
MODE = "SELECT"
DISPLAY = "ALL"
IDISPLAY = "ALL"');
RETURN(:CF_DESC);
end;
7) Go to layout model design the report and register with Oracle Applications and submit from the user SRS form
SRW.REFERENCE( ) : It we are using bind variable in source column the user exit we will refer to get the latest values for
variable and source column
KFF structure number is nothing but chat of accounts ID, if we know the user set of books name we can find out chart of
Accounts ID.
Set of books name is one of the user profile by using FND profile API we can get from report triggers
Go to before report trigger declare the local variable write the following API
Write the following select statement to get the structure number based on the set of books name
Develop the report on PO Module and display the charge account in PO Distributions Form