You are on page 1of 4

DFF REGISTRATION IN APPS

1. The customized table should have the same structure like a standard APPS table. Make
sure the table has atleast the following columns.

LAST_UPDATE_DATE
LAST_UPDATED_BY
CREATION_DATE
CREATED_BY
ATTRIBUTE_CATEGORY
ATTRIBUTE1
ATTRIBUTE2
ATTRIBUTE3
ATTRIBUTE4
ATTRIBUTE5
ATTRIBUTE6
ATTRIBUTE7
ATTRIBUTE8
ATTRIBUTE9
ATTRIBUTE10
ATTRIBUTE11
ATTRIBUTE12
ATTRIBUTE13
ATTRIBUTE14
ATTRIBUTE15

2. Create the table in APPS from SQL* PLUS using the create table command.
3. Register the table in APPS in the following way.
a)First register the table by executing the following code from SQL *PLUS.

EXECUTE ad_dd.register_table
(p_appl_short_name,p_tab_name,p_tab_type,p_next_extent,p_pct_free, p_pct_used);

Example:
EXECUTE ad_dd.register_table('FND', 'FLEX_TEST', 'T',8, 10, 90);

Here
FNDShort name of the Application which will use the table. Put the short name of the
application ur table refers to.
FLEX_TESTName of the table.
TTable type. Use ’T’ if it is a transaction table (almost all application tables), or
’S’ for a ”seed data” table(used only by Oracle Applications products).
8Next extent .
10Pct free
90Pct used

The output is PL/SQL procedure successfully completed.

b) Then register the columns of the table in the following way.

EXECUTE 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,p_scale);

1
Example:

EXECUTE ad_dd.register_column('FND', 'FLEX_TEST','APPLICATION_ID', 1, 'NUMBER', 38, 'N', 'N');


EXECUTE ad_dd.register_column('FND', 'FLEX_TEST','ATTRIBUTE_CATEGORY', 2, 'VARCHAR2', 30,
'N', 'N');
EXECUTE ad_dd.register_column('FND', 'FLEX_TEST','ATTRIBUTE1', 3, 'VARCHAR2', 150, 'N', 'N');
EXECUTE ad_dd.register_column('FND', 'FLEX_TEST','ATTRIBUTE2', 4, 'VARCHAR2', 150, 'N', 'N');
EXECUTE ad_dd.register_column('FND', 'FLEX_TEST','ATTRIBUTE3', 5, 'VARCHAR2', 150, 'N', 'N');
EXECUTE ad_dd.register_column('FND', 'FLEX_TEST','ATTRIBUTE4', 6, 'VARCHAR2', 150, 'N', 'N');
EXECUTE ad_dd.register_column('FND', 'FLEX_TEST','ATTRIBUTE5', 7, 'VARCHAR2', 150, 'N', 'N');
EXECUTE ad_dd.register_column('FND', 'FLEX_TEST','ATTRIBUTE6', 8, 'VARCHAR2', 150, 'N', 'N');

For each column u have to execute this statement.


Here
FNDApplication short Name
FLEX_TESTTable name
APPLICATION_ID,ATTRIBUTE_CONTEXT,ATTRIBUTE1,.. Column Names
NUMBER,VARCHAR2Data Types

c) After u have executed all these statements successfully then COMMIT the transactions
otherwise it will be rollbacked. Make sure u commit the transaction.

4. Go to ApplicationDatabaseTable.
5. Query the form with ur table name. If no record appears then u might not have
commited the transaction as said before. Only when u commit u will see ur table in this
form.

2
6. Go to flexfields- descriptiveRegister

7. Enter the details in the form.


APPLICATION : Give the application name
NAME : Name of the DFF.
TITLE : Title of the DFF.
DESCRIPTION : Description of the DFF
TABLE APPLICATION: The application name in which the table is used.
TABLE NAME : Give the table name
STRUCTURE COLUMN : Enter the column name in which the context
value of the DFF is stored. Preferably
ATTRIBUTE_CONTEXT
CONTEXT_PROMPT : Give the name which it should prompt for the
Context value.

Note: The APPLICATION NAME and TABLE APPLICATION need not be the same.

8. Save the form.


9. Go to Columns. Here u can enable or disable the columns u like.
10. Go to FlexfieldsDescriptiveSegments and query for the DFF u have registered. U
will find it. Define the Flexfield columns and compile the DFF.

3
CUSTOMISING A FORM WITH DFFs.

1) Create a block with the base table. Include a text item (named say DESC_FLEX)
in the block and in the property sheet mention the class as TEXT-ITEM-DESC-
FLEX and put it in the layout editor.
2) For all the DFF columns set the canvas property to null. They should exist in
the form.
3) In the WHEN-NEW-FORM-INSTANCE trigger of the form enable the DFF. To
enable the DFF the code to be written is
FND_DESCR_FLEX.DEFINE(
BLOCK=>'TEST_FLEX',
FIELD=>'DESC_FLEX',
APPL_SHORT_NAME=>'FND',
DESC_FLEX_NAME=>'TEST_DFF’);

Here TEST_FLEX is the Block name. Give the relevant block name of ur form.
DESC_FLEX is the item we have created in the block.
FND is the application short name in which the table has been registered and
DFF_TEST is the name of the DFF.
4) To Pop Up the DFF screen add the following code to the WHEN-NEW-ITEM-
INSTANCE trigger at form level.
FND_FLEX.EVENT('WHEN-NEW-ITEM-INSTANCE');
5) Register the form and test.

You might also like