0% found this document useful (0 votes)
152 views6 pages

Descriptive Flex Fields

Flex Fields allow capturing extra or key information in a flexible way without changing forms or tables. There are two types: Descriptive Flex Fields capture extra details using attribute columns, while Key Flex Fields capture important data using segment columns. Developing reports on Key Flex Fields involves calling user exits to retrieve the flex field structure and values, then querying the associated table to return the flex field data.

Uploaded by

Hemant Homkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
152 views6 pages

Descriptive Flex Fields

Flex Fields allow capturing extra or key information in a flexible way without changing forms or tables. There are two types: Descriptive Flex Fields capture extra details using attribute columns, while Key Flex Fields capture important data using segment columns. Developing reports on Key Flex Fields involves calling user exits to retrieve the flex field structure and values, then querying the associated table to return the flex field data.

Uploaded by

Hemant Homkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

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

or to capture the key information

We have 2 types of flex fields in oracle applications

1. Descriptive Flex Fields ,

2. Key Flex Fields

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

 We will use the attribute column while working with DFF


 We will find all the DFF in Application Developer Responsibility

 N – Flex Filed – Descriptive – Register


 To find DFF in form – PO Requisition Form

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.

 Select Attribute3        Buyertype,

 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

 
 

** Differences between DFF and KFF

  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

 To find a table of DFF – go to the segment form of DFF

System

Last Query

Value  – Quary will get

KFF_List.xls file contains all the important KFF to study

Application

KFF name Table

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

 To Capture the Key Information


 We can query the Information at any level
 Data entry to the user will be very easy
 System will accept valid accounting transactions
 GL_CODE_COMBINATION – All Codes
 GLFV_CHARTS_OF_ACCOUNTS – Structure Details

 Accounting Key Flex Field:


 This is one of the built in KFF available in GL application to capture accounting transactions.
 Accounting KFF is nothing but Chart of accounts in the set of books when ever we assign the profile (GL: Set of Books
Name) to the user based on the this profile system will assign Accounting KFF to the User.

*******

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

*******

16USER GL:SET OF BOOKS Vision Operation(USA)


17USER GL:SET OF BOOKS Vision Italy
18USER GL:SET OF BOOKS Vision Belgium

*******

 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

 Developing the Reports on KFF – Process

1) Call the user ext from before report trigger

SRW.USER_EXIT (        ‘FND SRWINIT’);

2) Call another User Exit from After Report Trigger

SRW.USER_EXIT (‘FND SRWEXIT’);

3) Define the following parameters

1) P_CONC_REQUEST_ID

2) P_FLEXDATA

3) P_STRUCT_NUM       segment1||’\n’||segment2||’\n’||segment3||’\n’||…….||’\n’||segment30

4) Call another User exit from before report trigger

SRW.USER_EXIT ('FND FLEXSQL

CODE = "GL#"

NUM = ":P_STRUCT_NUM"

APPL_SHORT_NAME = "SQLGL"

OUTPUT = "P_FLEXDATA"

MODE = "SELECT"

DISPLAY = "ALL");
view rawgistfile1.sql hosted with   by GitHub

5) Define the Query like follows

                         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

SRW.USER_EXIT ('FND FLEXIDVAL

CODE = "GL#"

NUM = ":P_STRUCT_NUM"

APPL_SHORT_NAME = "SQLGL"

DATA = "Column Name where the data is available"

VALUE = "to get KFF Values we will give formula column Name"

MODE = "SELECT"

DISPLAY = "ALL");

view rawgistfile1.sql hosted with   by GitHub

Flex Fields Reports development

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) Call the user ext from before report trigger

SRW.USER_EXIT (        ‘FND SRWINIT’);

2) Call another User Exit from After Report Trigger

SRW.USER_EXIT (‘FND SRWEXIT’);

3) Define the following parameters

1) P_CONC_REQUEST_ID

2) P_FLEXDATA

3) P_STRUCT_NUM

4) Before Report Trigger

function BeforeReport return boolean is

L_NAME VARCHAR2(100);

begin

SRW.USER_EXIT( 'FND SRWINIT');

l_name :=fnd_profile.value('GL_SET_OF_BKS_NAME');

select chart_of_accounts_id
into :P_STRUCT_NUM

FROM gl_sets_of_books

where name = l_name;

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"

DISPLAY = "ALL" ');

return (TRUE);

end;

view rawgistfile1.sql hosted with   by GitHub

5) Go to data model select query

 SELECT            &P_FLEXDATA C_FLEXDATA,


GCC.LAST_UPDATE_DATE
FROM               GL_CODE_COMBINATIONS GCC
WHERE            CHART_OF_ACCOUNTS_ID = :P_STRUCT_NUM;

6) Take the Formula column and place it in query and edit the PL/SQL editor

function CF_DATAFormula return Char is

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;

function CF_DESCFormula return Char is

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;

view rawgistfile1.sql hosted with   by GitHub

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

Changing the structure number dynamically:

 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

 L_name varchar2 (100)


 L_name:=fnd_profile.value(‘GL_SET_OFBKS_NAME’);

 Write the following select statement to get the structure number based on the set of books name

                        Select              Chart_of_account_id


                        INTO                :P-STRUCT_NUM
                        From               GL_SET_OF_BOOKS
                        Where             name=L_name;

Develop the report on PO Module and display the charge account in PO Distributions Form

ReqNO Type    Cdate   Lineno             Item    ItemDesc        DistNo       ChargeA/C

FAQ in Flex Fields

1. What is FLEX FIELD?


2. What is KFF
3. In you experience what are the KFF you have come across?
4. Have u created any KFF? NO
5. Have u created any DF? Yes
6. What is FND FLEX SQL and FND IDVAL?
7. What is SRW REFERENCE?
8. What are parameters we suppose to pass for FND FLEXIDVAL?
9. How to change structure number dynamically?
10. What are the KFF are there in Inventory module?
11. Is there any KFF in PO? NO
12. Where the KFF data will be stored? Segments
13. Where the DFF data will be stored? Attributes
14. What in Attribute_Category?

You might also like