You are on page 1of 17

ORACLE APPS PART H

1 of 17

13th May 2012

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

ORACLE APPS PART H

3/29/2016 1:58 PM

ORACLE APPS PART H

2 of 17

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

CLASS 28
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 without
changing form code and without altering database table
1. We will use the attribute column while working with DFF
2. We will find all the DFF in Application Developer Responsibility

i. N Flex Filed Descriptive Register


3. To find DFF in form PO Requisition Form
4. Customization of DFF
i. 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
ii. Find the DFF title from following navigation
1. 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)
iii.
Copy the value go to Application Developer
1. N Flex field Descriptive Segments and enter and press F11 enter the title
Ctrl + F11
iv.
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.
v.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.
vi.
The view name will be database table name _DFV
vii.
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
viii.
Create the value set in system administrator; attach the value set at the time of
creating DFF column name in the value set field.
ix.
We can make the DFF column is optional or mandatory by selecting required
check box in the segments form.
CLASS 29

3/29/2016 1:58 PM

ORACLE APPS PART H

3 of 17

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

x.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.
1. 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.
2. NOTE: Once we enter the value in the context field it will be stored in the
Database column called Attribute Category

xi.
Global Data Elements: While defining the context field we will enter the context
field values based on the value we can change the DFF structure if we want to define
any field globally we will select option called Global Data elements, select se4gments
enter the details.
1. Once we use the attribute column in Global Data elements it will not be available
for the context field values.

3/29/2016 1:58 PM

ORACLE APPS PART H

4 of 17

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

2. Key Flex Field : These will be used capture key information which is in the code language for every code
there will be a specific meaning in the application we will find all the KFF s in the Application Developer
Responsibility. Navigation Flex field Key Register and enter we can find the structure in the
segments form Navigation Flex Field Key Segments and press enter when we enter the data in KFF it
will be stored in segments columns we will find segments column around 30 based on the requirement.

Differences between DFF and KFF


DFF
1.
DFF will be used to capture EXTRA
Information
2.
Attribute columns will be used
3.
We can register MAX DFF
4.
5.
6.

DFF will be accept what ever Data we


enter
WE have context field
DFF data will be stored in Attribute
Columns

1.
2.
3.
4.
5.
6.

KFF
KFF will be used to capture KEY
Information
Segment columns will be used
We have 29 built in KFF we are not
suppose to create new KFF
KFF we can define rules to capture valid
data
WE have no Context field
DFF codes will be stored in segments
KFF description will be stored in
FND_FLEX_VALUES tables.

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

Staructure Column

CHART_OF_ACCOUNTS_ID
No
No
No

LOCATION_STRUCTURE_ID
No
no
STRUCTURE_ID
ORGANIZATION_ID
ORGANIZATION_ID

3/29/2016 1:58 PM

ORACLE APPS PART H

5 of 17

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

CLASS 30
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
17USER
18USER
*******

GL:SET OF BOOKS
GL:SET OF BOOKS
GL:SET OF BOOKS

Vision Operation(USA)
Vision Italy
Vision Belgium

USD
ITL
BEL

101(5)
50173(4)
50714(6)

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');

3/29/2016 1:58 PM

ORACLE APPS PART H

6 of 17

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

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
NUM
APPL_SHORT_NAME
OUTPUT
MODE
DISPLAY

= "GL#"
= ":P_STRUCT_NUM"
= "SQLGL"
= "P_FLEXDATA"
= "SELECT"
= "ALL");

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");
CLASS 31
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

3/29/2016 1:58 PM

ORACLE APPS PART H

7 of 17

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

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;
5) Go to data model select query
SELECT

&P_FLEXDATA C_FLEXDATA,
GCC.LAST_UPDATE_DATE

FROM
WHERE

GL_CODE_COMBINATIONS GCC
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
NUM
APPL_SHORT_NAME

= "GL#"
= ":P_STRUCT_NUM"
= "SQLGL"

3/29/2016 1:58 PM

ORACLE APPS PART H

8 of 17

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

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
DATA
DESCRIPTION
MODE

= "SQLGL"
= ":C_FLEXDATA"
= ":CF_DESC"
= "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
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
INTO
From
Where

Chart_of_account_id
:P-STRUCT_NUM
GL_SET_OF_BOOKS
name=L_name;

CLASS 32
Develop the report on PO Module and display the charge account in PO Distributions Form
Line Level
Dist Level
ReqNO
Type Cdate Lineno
Item ItemDesc
DistNo
ChargeA/C

3/29/2016 1:58 PM

ORACLE APPS PART H

9 of 17

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

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?

CLASS 33

Forms Development Process

3/29/2016 1:58 PM

ORACLE APPS PART H

10 of 17

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

1)We Will download the TEMPLETE.fmb from AU_TOP\Resource Folder


Application Utilities
2)Open

with

Forms6i

builder

and

delete

the

Canvas
3)Create New Block , Canvas , Window attach oracle apps Properties

existing

Block
Window

4)Develop the from as per client requirement


Note:We will change the Property called First Navigaction Data Block as Datablock Name in the Module
Properties.
II)Customize folooiwng two triggers1) Pre-Form
-New Window Name
2) WHEN-NEW-FORM-INSTANCE -New form Name
3) APP_Custom package -New Window Name

5)Save the form we will get (.fmb)


6)compile the form we will get(.fmx)
7)Move the .fmb into au_top\11.5.0\Forms\US\ .fmb
8)Move the .fmx into CuS_top\11.5.0\Forms\US\ .fmx
9)Goto Applicaton Developer and create Form
10)create Function attach form to the function
11)Create Menu attach function menu
12)Attach Menu to the responsibility , Responsibility will be attached to the user
so that user can open the from and enter/Query the Data.
Develop the User Form
First Form
User ID
User Name
Creation Date
Second Form
Supplier ID
Supplier Name
Supplier Creation Date
Template.fmb: It is a built in form available in AU_TOP resources folder, it has got 21 libraries to support
menu functionality standard toolbar functionalities and other oracle apps functions like who columns, profiles,
flex fields, multi org and so on.

3/29/2016 1:58 PM

ORACLE APPS PART H

11 of 17

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

Form Registration:
After moving the .fmb and .fmx in to the server we will take the .fmx name select application developer
responsibility register the form Navigation Application Developer Application Form and enter
Enter the .fmx name and application name where the .fmx is located enter user form name
Copy the user form name attach to the function.
Function:
It is nothing but instance of form along with parameter navigation Applicatoin Function and enter
Enter the function name and user function name go to properties tab select type as form, go to form tab
attach user form name what ever we have created
Copy the user function name attach to menu
Menu:
Group of submenus and functions, enter menu name sequence no, prompt, attach user function name in
the function field, copy the user menu name, go to responsibility form in system administrator attach in
the menu field
Select the responsibility we will find the form in object navigator window.
Form Setup
First step
AU/11.5.0/FORM/US
Copy the files in to resource folder like Templete.fmb and appstand.fmb
Second Step
Start menu Run Regedit
Hkey_local_mechine -> software -> oracle
Forms60 _path
- - - - - - - - - - -- - - -- - - ; give the template.fmd file path
CLASS 34
Table registration
Note: connect to custom top (wip) --wip/wip@prod
1) create table custom_vendors
2) grant all on custom_vendors to apps;
3) conn apps/apps@prod
4) create public synonym custom_vendors for po.custom_vendors;
5) exec ad_dd.register_table ('po','custom_vendors','t', 8, 10, 90);
Exec Ad_dd.register_table(

3/29/2016 1:58 PM

ORACLE APPS PART H

12 of 17

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

p_appl_short_name ,
p_tab_name
,
p_tab_type
,
p_next_extent
,
p_pct_free
,
p_pct_used
)
6) exec ad_dd.register_column ('po','custom_vendors','vendor_id', 1,'number', 10,'n','y');
Exec ad_dd.register_column (
p_appl_short_name ,
p_tab_name
,
p_col_name
,
p_col_seq
,
p_col_type
,
p_col_width
,
p_nullable
,
p_translate
,
p_precision
default null,
p_scale
default null)
Note: register all columns
7)commit;
Value sets
Who columns
Flexfield (dff,kff)
Note :
If we are registering table by using AD_DD package we can utilize following functions
1) Who columns
2) Flex fields
3) Multi org
4) Profile, Table Value set creation and so on.
Create Table wip_item_details(
Item
Varchar2(50),
ItemDesc
Varchar2(100),
ItemDate
Date,
ItemLoc
Varchar2(50),
Item Category
Varchar2(50),
ItemCost
Number(9),
Created_By
Number(9),
Creation_Date
Date,
Last_Update_By
Number(9),
Last_update_date
Date,
Attribute_Category
Varchar2(100),
Attribute1
Varchar2(100),
Attribute2
Varchar2(100),
Attribute3
Varchar2(100),

3/29/2016 1:58 PM

ORACLE APPS PART H

13 of 17

Attribute4
Attribute5

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

Varchar2(100),
Varchar2(100))

Grant all on WIP_ITEM_DETAILS to APPS;


Conn APPS/APPS@PROD;
Create Public Synonym WIP_ITEM_DETAILS for WIP.WIP_ITEM_DETAIS
Table type contains three values
T Table, V View, S Synonym
Exec AD_DD.REGISTER_TABLE (WIP,WIP_ITEM_DETAILS,T,0,10,90)
EXEC AD_DD.REGISTER_COLUMN
(WIP,WIP_ITEM_DETAILS, ITEM,1,VARCHAR2,50,N,Y);
All the columns to be registered
To know the table status about registration
Navigation
Application - > Database - > Table and press enter
And query for the required table.
Implementing who columns
Create two triggers Pre_Insert and Pre_updata at Block level
Call the following API from the both the triggers.
Fnd_standard.set_who();
This API is available in the library called FNDSQF.PLL
Implementing the calendar to the date field
Go to the field properties, change the property called list of values Enable_List_Lamp
Create the trigger called KeyListVal at Item level call the following API
Calender.show()
It is available in the library called APPDAYPK.PLL
Attaching the list to the field
Record Group-> LOV -> field
Create Record Group by enter list of value or by enter select statement
Create LOV attach record group
Attach LOV to field property called list of values

3/29/2016 1:58 PM

ORACLE APPS PART H

14 of 17

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

Reference: 115devg.pdf - 24th Chapter

CLASS 35
Development of Master Details Form
Master Form
PO-VENDORS
Vendor_ID, Vendor_name, Creation_Date
Detail Form
PO_VENDOR_SITES_ALL
Vendor_ID, Vendor_site_code, Site_Creation_Date,
Address1, Address2, City.
Develop the form with master table by using template.fmb (Primary Key must be selected)
Crate detailed data block after selecting the column click next button, can check the check box called Auto
join data blocks, select the button called create relationship, select radio button called based on join
condition.
Select Primary Key from Master Item, reference key from detail Item, system will automatically create
join condition and select finish button.
At the time of selection layout style select tabular format and select number of records to be displayed in
the layout.
Attach property classes and save the .fmb generate .FMX move in to the custom top.
Practice development
PO_HEADERS_ALL
PO_header_id, PO_NO, type, Cration_Date
POLINE_ALL
Po_heder_id, item_desc, quantity, Unit_price,
Line_total(quantity*unitprice)
Manual Development of Form
Crate a table in WIP
Item, Item_Desc, Item_date, Item_loc.
Create new data block by select the manual option
Change the following the properties
Subclass: Block

3/29/2016 1:58 PM

ORACLE APPS PART H

15 of 17

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

Database source Name: Table Name


Database Column Name: Column Names
Go to canvas create and change the property class to Frame_Rect
Define the Text Item attach following properties
Subclass: Tex_Item
Column Name: DB column
Register the column and compile and generate .FMX
CLASS 36
Descriptive Flex Field Form Development Process
Table should contain attribute column and also it should be registered
Go to application developer open the DFF register form navigation Flex Field Descriptive Register
and enter
Create New DFF by giving database table name.
Copy the DFF table go to segments form query based on table, select segments button, enter DFF
structure details.
Open the template.fmb select all the attribute column at the time of data block creation
Define the field in the Canvas change the field property database items as "no"
Define the Package like follows.
Package Specification:
---------------------PACKAGE DFF_PKG IS
PROCEDURE DFF_PROC(EVENT VARCHAR2);
END;
Package Body:
------------PACKAGE BODY DFF_PKG IS
PROCEDURE DFF_PROC(EVENT VARCHAR2) AS
BEGIN
IF (EVENT = 'WHEN-NEW-FORM-INSTANCE'

) THEN

FND_DESCR_FLEX.DEFINE(
BLOCK

=>

'WIP_ITEMS10',

FIELD

=>

APPL_SHORT_NAME

=>

'WIP',

DESC_FLEX_NAME

=>

'WIPDFF'

'DFF_TEXT',
);

END IF;
END DFF_PROC;
END;

Call this Package from WHEN-NEW-FORM-INSTANCE Trigger


o Packagename.Procedure name('WHEN-NEW-FORM-INSTANCE');
o DFF_PKG.DFF_PROC('WHEN-NEW-FORM-INSTANCE');

Call another API from WHEN-NEW-ITEM-ISNATCE Trigger


o fnd_flex.event('WHEN-NEW-ITEM-INSTANCE');
o It will Populate the DFF in the Form.

3/29/2016 1:58 PM

ORACLE APPS PART H

16 of 17

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

Note:
FNDSQF library will support for all the flex field APIS like
FND_DESC_FLEX.DEFINE
FND_FLEX.EVENT
FND_KEY_FLEX

Function Security:
For single form creation of multiple functions at the time of creation function passing the parameter which
will change the form functionality.
Develop a form register in application developer at the time of creation function pass the parameter
called QUERYONLY=YES
Attach the functions to menu and menu to responsibility and responsibility to the user.
NOTE: At the time of crating function select form tab pass the parameter in the field called parameter
Calling another form from the existing form.
Form 6i feature
APPS

Call_Form, New_form, Open_form


-

FND_FUNCTION.EXECUTE( )

OPEN_FORM built-in
Opens the indicated form. Use OPEN_FORM to create multiple-form applications, that is,
applications that open more than one form at the same time.

NEW_FORM built-in
Exits the current form and enters the indicated form. The calling form is terminated as the parent
form. If the calling form had been called by a higher form, Form Builder keeps the higher call active
and treats it as a call to the new form. Form Builder releases memory (such as database cursors) that
the terminated form was using.
Form Builder runs the new form with the same Runform options as the parent form. If the parent form
was a called form, Form Builder runs the new form with the same options as the parent form.

CALL_FORM built-in
Runs an indicated form while keeping the parent form active. Form Builder runs the called form with
the same Runform preferences as the parent form. When the called form is exited Form Builder
processing resumes in the calling form at the point from which you initiated the call to CALL_FORM.
Posted 13th May 2012 by be happy and make others to be happy
0

Add a comment

3/29/2016 1:58 PM

ORACLE APPS PART H

17 of 17

http://oracleapps4people.blogspot.in/2012/05/oracle-apps-part-h.html

Comment as:

Publish

Notify me

3/29/2016 1:58 PM

You might also like