0% found this document useful (0 votes)
92 views28 pages

This Training Article Will Focus On Creating DFF in A Custom Form

Flexfields are required whenever an additional information is required in Oracle Form. To accomplish this we need to follow the following Steps. 1. Create a table with Column like Attribute_category (for DFF representation) 2. Register DFF with Apps 3. Create a Form which will Contain DFF. 4. Register this Form with Apps using AD_DD package.

Uploaded by

bvbrahmam
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)
92 views28 pages

This Training Article Will Focus On Creating DFF in A Custom Form

Flexfields are required whenever an additional information is required in Oracle Form. To accomplish this we need to follow the following Steps. 1. Create a table with Column like Attribute_category (for DFF representation) 2. Register DFF with Apps 3. Create a Form which will Contain DFF. 4. Register this Form with Apps using AD_DD package.

Uploaded by

bvbrahmam
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/ 28

Flexfields are required whenever an additional information is required in Oracle Form.

For complete knowledge in Descriptive Flexfield please visit


http://oracle.anilpassi.com/descriptive-flexfield-basics-in-oracle-apps.html
This Training Article will focus on Creating DFF in a Custom Form.
Name
Gender
DOB
st

1 DFF

nd

2 DFF

Addres
s State
City

Gender is M
Gender is F

GYM
Occupatio
n Country

PARLOUR
Occupatio
n Country

Note
In this Form , User enter Name , Gender,
DOB.
st
1 DFF depends upon Gender if M(Male)
then DFF will be invoked with Segments
GYM, Occupation, Country. If F(Female)
then Segment will be PARLOUR,
Occupation, Country.
nd
st
2 DFF will Depend on Country of 1 DFF.

To accomplish this we need to follow the following Steps


1. Create a table with Column like Attribute_category (for DFF representation) and
Attribute1, Attribute2 (For Value entered in DFF ), its not mandatory to use these
Names but is a good practice and also recommended by Oracle.
Register this Custom table with Apps using AD_DD package .
2. Register DFF with Apps
3. Create a Form which will Contain DFF.
4. Register this Form with Apps
STEP 1 :
This Step is further divided into following Steps
a. Create Custom Table in Custom Schema
b. Grant permission to APPS user
c. Add Comments to Columns (Good Practice).
d. Create Synonym in APPS

e. Register table with Apps using AD_DD Pakage


f. Register Column with Apps Using AD_DD Package.
a. Create a Custom Table in Custom Schema.
CREA TE TABLE XX_XX_DFF (
NAME
VARCHAR2(100),
GENDER
VARCHAR2(1),
DOB
DATE,
ATTRIBUTE_CATEGORY1
VARCHAR2(100),
ATTRIBUTE_CATEGORY2
VARCHAR2(100),
ATTRIBUTE1
VARCHAR2(100),
ATTRIBUTE2
ATTRIBUTE3
ATTRIBUTE4
ATTRIBUTE5
ATTRIBUTE6
ATTRIBUTE7
)

VARCHAR2(100),
VARCHAR2(100),
VARCHAR2(100),
VARCHAR2(100),
VARCHAR2(100),
VARCHAR2(100)

b. Grant permission to APPS user


GRANT ALL ON XX_XX_DFF TO APPS

c. Add Comments to Columns (Good Practice).


COMMENT ON COLUMN XX_XX_DFF.ATTRIBUTE1 IS 'GYM';
COMMENT ON COLUMN XX_XX_DFF.ATTRIBUTE2 IS 'BEAUTY PARLOUR';
COMMENT ON COLUMN XX_XX_DFF.ATTRIBUTE3 IS 'OCCUPATION';
COMMENT ON COLUMN XX_XX_DFF.ATTRIBUTE4 IS 'COUNTRY'; COMMENT
ON COLUMN XX_XX_DFF.ATTRIBUTE5 IS 'ADDRESS'; COMMENT ON
COLUMN XX_XX_DFF.ATTRIBUTE6 IS 'CITY';
COMMENT ON COLUMN XX_XX_DFF.ATTRIBUTE7 IS 'STATE';
COMMENT ON COLUMN XX_XX_DFF.ATTRIBUTE_CATEGORY1 IS 'Depends on Gender';
COMMENT ON COLUMN XX_XX_DFF.ATTRIBUTE_CATEGORY2 IS 'Depends on Country';

d. Create Synonym in APPS


CREA TE SYNONYM XX_XX_DFF FOR XXBL.XX_XX_DFF

e. Register

table with Apps using AD_DD Pakage

BEGIN
AD_DD.REGISTER_TABLE('FND','XX_XX_DFF','T');
END;

f.

Register Column with Apps Using AD_DD Package.

BEGIN
AD_DD.REGISTER_COLUMN('FND','XX_XX_DFF','NA ME',1,'VARCHAR2',100,'N','N');
AD_DD.REGISTER_COLUMN('FND','XX_XX_DFF','GENDER',2,'VA RCHAR2',1,'N','N');
AD_DD.REGISTER_COLUMN('FND','XX_XX_DFF','DOB',3,'DATE',9,'N','N');
AD_DD.REGISTER_COLUMN('FND','XX_XX_DFF','ATTRIBUTE_CATEGORY1',4,'VA
RCHAR2', 100,'N','N');
AD_DD.REGISTER_COLUMN('FND','XX_XX_DFF','ATTRIBUTE_CATEGORY2',5,'VA
RCHAR2', 100,'N','N');
AD_DD.REGISTER_COLUMN('FND','XX_XX_DFF','ATTRIBUTE1',6,'VA
RCHAR2',100,'N','N'); AD_DD.REGISTER_COLUMN('FND','XX_XX_DFF','ATTRIBUTE2',7,'VA
RCHAR2',100,'N','N'); AD_DD.REGISTER_COLUMN('FND','XX_XX_DFF','ATTRIBUTE3',8,'VA
RCHAR2',100,'N','N'); AD_DD.REGISTER_COLUMN('FND','XX_XX_DFF','ATTRIBUTE4',9,'VA
RCHAR2',100,'N','N'); AD_DD.REGISTER_COLUMN('FND','XX_XX_DFF','ATTRIBUTE5',10,'VA
RCHAR2',100,'N','N'); AD_DD.REGISTER_COLUMN('FND','XX_XX_DFF','ATTRIBUTE6',11,'VA
RCHAR2',100,'N','N'); AD_DD.REGISTER_COLUMN('FND','XX_XX_DFF','ATTRIBUTE7',12,'VA
RCHAR2',100,'N','N'); END;

STEP 2: Register DFF with Apps

Navigation Path : Application Developer

Flexfield

Descriptive

Register

For 1st DFF XX_DFF_GENDER


Application

: Application Object Library

Name

: XX_DFF_GENDER

Title

: XX_DFF_GENDER

Description

: Depends on Gender

Table Application : Application Object Library


Table Name

: XX_XX_DFF

Structure Column : ATTRIBUTE_CATEGORY1


Context Prompt
: Context
Value (Press Save)
N ote: Title should be Unique as it is required to Query the Flexfield
for creation or updation of Segments (M entioned Below with
Segment)

Now Click on Button Column and Check only


ATTRIBUTE1, ATTRIBUTE2, ATTRIBUTE3, ATTRIBUTE4
i.e GYM, PARLOUR, Occupation, Country.

Now Create Segments


Navigation Path : Application Developer

Flexfield

Descriptive

Segment

Query the Flexfield by Pressing F11 and Copy the Title XX_DFF_GENDER in
Title field. (As discussed above, Title is required to be Unique)
1. Unfreeze Flexfield Definition by Unchecking the checkbox
Freeze Flexfield Definition.
2. Check Synchronize with Reference Field Checkbox (When
Reference Field is not null)
3. Enter :blockname.item_name of your Form (Can be filled later
once form is created) in Reference Field.
4. Context Field Values
Code

N ame

D escription

F
F
Female
M
M
Male
(Global Data Elements is a default Context

Enabled

che
ck
che
ck value)
Field

Reference Field Contain :XX_XX_DFF.GENDER


(:BLOCK_NA ME.ITEM_NAME). It will link the Gender field of my Form
and depending upon the value entered it will show the DFF.
Context Field Values.
My 1st DFF will show 3 fields

GYM, Occupation, Country when Gender is M


PARLOUR, Occupation, Country when Gender is F.
Any Segments created under Global Data Elements will always be invoked
with the DFF. Since Occupation and Country are common therefore I m
putting them in Global Data Elements.
We can also achieve this by creating Segment Occupation and Country
for both Context Field Value M and F, leaving Global Data Elements as
Blank.
Click in Global Data Elements and then click Segments Tab.
I ve Place Occupation and Country Segments under it which means
whether the Gender is M or F. 1st DFF will always show these two fields.

Number
: 1 (Any Unique Number can be
entered) Name : Occupation
Column
: ATTRIBUTE3 (This means when you save your data the
value Placed under Occupation will store in Attribute3 column of
custom table XX_XX_DFF ).
Displayed :
Check Enabled :
Check
Number
: 2 (Any number can be entered other then 1 which is already
Used) Name
: Country
Column
: ATTRIBUTE4 (This means when you save your data the
value Placed under Country will store in Attribute4 column of custom
table XX_XX_DFF
).

Value Set
: XX_COUNTRY
Displayed : Check
Enabled
:
Check (Press Save)

Creating ValueSet XX_COUNTRY


Place the cursor in Country and Press the Button Value Set. A Form will be
displayed . You can also create a Value Set from
Application Dev Application Validation Set

Value Set Name : XX_COUNTRY


Maximum Size
20
Validation Type
:
Independent (Press Save)

Now putting value to this Value Set.


Application Developer Application Validation Values
Value
India
UK
USA

Translated Value
India
UK
USA

Description
India
UK
USA

Enabl
check
check
check

Context Field Values contd.


M means if User has enter Gender as M then the Segments created under
this will be invoked along with the Global Data Elements Segments
Place the cursor on M and click Segments

Number
1
Name
: GYM
Column
: ATTRIBUTE1
Displayed : Check
Enabled : Check
(Press Save)

Context Field Values contd.


F means if User has enter Gender as F then the Segments created under
this will be invoked along with the Global Data Elements Segments
Place the cursor on F and click Segments

Number
1
Name
: PARLOUR
Column
: ATTRIBUTE2
(Press Save)

Till here 1st DFF is registered in Apps


Now For 2nd DFF which Depends on Country mentioned in 1st DFF.

Navigation Path : Application Developer

Flexfield

Descriptive

Application

: Application Object Library

Name

: XX_DFF_COUNTRY

Title

: XX_DFF_COUNTRY

Description

: Depends on Country

Table Application : Application Object

Library Table Name


: XX_XX_DFF
Structure Column : ATTRIBUTE_CATEGORY2
Context Prompt
: Context
Value (Press Save)

Register

Click Column Button and Check only


ATTRIBUTE5, ATTRIBUTE6, ATTRIBUTE7
Ie Address, City, State from table XX_XX_DFF

Now Create Segments


Navigation Path : Application Developer

Flexfield

Descriptive

Segment

Query the Flexfield by Pressing F11 and Copy the Title XX_DFF_COUNTRY in
Title field.
1. Unfreeze Flexfield Definition by Unchecking the checkbox
Freeze Flexfield Definition.
2. Check Synchronize with Reference Field Checkbox (When Reference
Field is not null)
3. Enter :blockname.item_name of your Form (Can be filled later
once form is created) in Reference Field.
4. Context Field Values
Code
India

N ame
India

D escription
India

Enabled
check

(Global Data Elements is a default Context Field value)

For Global Data Elements

Number
1
Name
: Address
Column
: ATTRIBUTE5
Displayed :
Check Enabled :
Check
(Press Save)

For Context Field Value is India


Number
Name

2
: State

Column
Value Set
Displayed
Enabled

:
:
:
:

Number
Name
Column
Value Set
Displayed
Enabled
(Press Save)

ATTRIBUTE7
XX_STA TE
Check
Check

1
: City
: ATTRIBUTE6
: XX_CITIES
: Check
: Check

Value Set

XX_STA TE

Now creating Values of Value Set XX_STATE


Application Developer Application Validation Values
Value

Translated Value

Delhi
Uttar Pradesh
Uttarakhand

Delhi
Uttar Pradesh
Uttarakhand

Description

Enabled

Delhi
Uttar Pradesh
Uttarakhand

che
ck
che
ck
che
ck

Value Set XX_CITIES


This Value Set is a Dependent Value Set on valueset XX_STA TE.

Value Set Name


Maximum Size
Validation Type

: XX_CITIES
20
:

Dependent Click Edit


Information Button
Independent Valueset : XX_STA TE
Dependent Default Value : New
Delhi Description
: New
Delhi (Press Save)

Now Putting Values to this Value Set.


Navigate
Application Developer Application Validation Values

By Pressing UP and Down Arrow, You can put value for different
Independent Value.
Independent Value : UP
V alue
Agra
Allahabad
Banaras
Gaziabad
Noida

Enable
check
check
check
check
check

Press Down Arrow, Next Value for Independent Value Set(XX_STA TE) will
be Displayed.
Independent Value : Uttarakhand
Value
Enable
Auli
check
Haldwani
check
Mussorie
check
Nainital
check

Similarly for value (Delhi) of Independent Value Set (XX_STA TE)

Value
New Delhi

Enable
check

STEP 3 Create a Custom Form which will Contain DFF

Download Template form from $AU_TOP/ forms/


US Create a Window, Canvas
Create Datablock based on Custom Table XX_XX_DFF
Change Properties Visible to NO for ATTRIBUTE1, ATTRIBUTE2,
ATTRIBUTE3, ATTRIBUTE4, ATTRIBUTE5,
ATTRIBUTE6, ATTRIBUTE7

Properties for ATTRIBUTE_CA TEGORY1, ATTRIBUTE_CATEGORY2


Subclass Information : TEXT_ITEM_DESC_FLEX
LOV
: ENABLE_LIST_LA MP
Validate from List : NO
Database Item
: NO
Program Unit (Package Spec)
PACKAGE XX_DFF_PKG IS

PROCEDURE XX_DFF_PROC (EVENT VARCHAR2); END;


Package Body
PACKAGE BODY XX_DFF_PKG IS
PROCEDURE XX_DFF_PROC (EVENT VARCHAR2) IS
BEGIN
IF EVENT = 'WHEN-NEW-FORM-INSTANCE' THEN
--- FOR 1st DFF WHICH CONTAIN
--- GYM OR PARLOUR (Depends on Gender)
--- OCCUPATION and COUNTRY
FND_DESCR_FLEX.DEFINE( BLOCK
=> 'XX_XX_DFF',
FIELD => 'ATTRIBUTE_CA TEGORY1',
APPL_SHORT_NAME => 'FND',
DESC_FLEX_NAME => 'XX_DFF_GENDER'
-----

);

FOR 2nd DFF WHICH CONTAIN


ADDRESS
CITY
STATE (Depends on Country from 1st DFF)

FND_DESCR_FLEX.DEFINE( BLOCK
=> 'XX_XX_DFF',
FIELD => 'ATTRIBUTE_CATEGORY2',
APPL_SHORT_NAME => 'FND',
DESC_FLEX_NAME => 'XX_DFF_COUNTRY' );
END IF;
END ;
END;

Change in Triggers
1. W hen-New-Form-Instance :
XX_DFF_PKG.XX_DFF_PROC('WHEN-NEW-FORM-INSTA NCE');

2. W hen-New-Item-Instance:
FND_FLEX.EVENT('WHEN-NEW-ITEM-INSTA NCE');
STEP 4

Register this Form with Apps

1. FTP the form to $FND_TOP/forms/US (Ive registered my DFF with FND)


2. Telnet to $FND_TOP/forms/US run
f60gen XX_XX_DFF.fmb apps/password@db_name
3. Register Form Using App. Developer Application Form

4. Register Form with Function


Using App. Developer Application

Function

5. Add this Function into a Menu.


DFF is Ready Now
Login to that Responsibility which Contain this Menu

You can Query this Record in Table

You might also like