apps work shop

29
Oracle Apps Forms New Module/Application Development Process Create a application in AOL module i. AOLApplicationRegister create a new menu (KK_AOL_MENU) i. AOLApplicationMenu Create a schema/user for the new module in database i. In SYSTEM/Manager@vis ii. Exam: create user KK identified by KK Grant connect, resource to KK Create product Directory structure for the New Module KK. i. D:\oracle\visappl\kk\11.5.0\forms\US ii. D:\oracle\visappl\kk\11.5.0\repots\US Register the KK_TOP in Server. i. D:\oracle\visappl Open adapps.inf See the line how it is define for the other module like GL_TOP. Copy a similar line and reset the path for KK_TOP. Exam: other solutions Open the regedit in the server itself. Update the Regedit KM_TOP = D:\oracle\visappl\KM\11.5.0 1) go to d:oracle\visappl\vis.env edit vis.env GL_TOP := …. AP_top := …. . . . KK_TOP := d:\oracle\visappl\kk\11.5.0 2) Run the vis.cmd 3)( In unix ) cd /oracle/visappl $vi vis.env set NM_TOP = /oracle/visappl/NM/11.5.0 -- Close the editor

Upload: yourskasi

Post on 28-Apr-2015

48 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Apps Work Shop

Oracle Apps Forms

New Module/Application Development Process

Create a application in AOL module i. AOLApplicationRegister

create a new menu (KK_AOL_MENU)i. AOLApplicationMenu

Create a schema/user for the new module in databasei. In SYSTEM/Manager@visii. Exam: create user KK identified by KK

Grant connect, resource to KK

Create product Directory structure for the New Module KK.i. D:\oracle\visappl\kk\11.5.0\forms\USii. D:\oracle\visappl\kk\11.5.0\repots\US

Register the KK_TOP in Server.i. D:\oracle\visappl Open adapps.inf See the line how it is define for the other module like GL_TOP.Copy a similar line and reset the path for KK_TOP.

Exam: other solutions Open the regedit in the server itself. Update the Regedit KM_TOP = D:\oracle\visappl\KM\11.5.0

1) go to d:oracle\visappl\vis.env edit vis.envGL_TOP := ….AP_top := …....KK_TOP := d:\oracle\visappl\kk\11.5.0

2) Run the vis.cmd

3)( In unix ) cd /oracle/visappl $vi vis.env set NM_TOP = /oracle/visappl/NM/11.5.0 -- Close the editor . ./*.env

Register the database schema in SYSADMIN Resp.i. SYSADMIN RespSequrityOracleRegister

Add the application to the Data group (Standard)i. Sysadmin RespSequrityOracleData Group

Page 2: Apps Work Shop

create a new request group i. Sysadmin RespSequrityResponsibilityRequest

create a new responsibility (KK_AOL_RESP)i. Sysadmin Resp SequrityResponsibilityDefine

Create a user & Assign the Resp to the user in the applicationi. Sysadmin Resp SequrityUserDefine

Practical

Page 3: Apps Work Shop

Registration

Table Registration Process1) These table registration is required for

Key_flex_fields Descriptive Flexfields Table type values sets Event alerts

3) Table registration is not mandatory for forms and reports.4) AD_DD (Application DBA Data Definition) is the built in which is used to register the table in the

application.5) For view/sequence there is no built-in.

Oracle Tables (Seed Data table)1) Seed data table or the base table which are comes with the applications.2) This table capture the core information of the package, module, setups.3) The data in this table is read only.4) Example : fnd_install_group

Fnd_languages

Oracle Tables (Transaction Data table)1) The tables which are used in all the business modules are called as transactional table.2) The data in there table are read and write mode.3) The entire base table which is store data day to day basis.

Oracle Tables (Interim Data table)

Page 4: Apps Work Shop

Interim data table are the temporary table (interface table/Custom staging table), which are used for validation propose at the time of transforming data from legacy system to Oracle.

View Registration Process Sequence Registration process

Table Registration using Ad-dd package Steps to register table. ------------------------- Conn KK/KK@vis

Create table KK_CLASS ( ROLLNO NUMBER , STUD_NAME VARCHAR2(100) , SUBJECT VARCHAR2(50)) Grant all to KK_CLASS to apps; Conn apps/apps@vis Create public sysnonym KK_CLASS FOR KK_CLASS ; Now register the table using AD_DD package.

BEGIN AD_DD.register_table ('PO', 'KK_CLASS', 'T'); AD_DD.register_column ('PO','KK_CLASS','ROLLNO',1,'NUMBER',10 ,'N', 'N'); AD_DD.register_column ('PO','KK_CLASS','STUD_NAME',2,'VARCHAR2',100 ,'Y', 'N'); COMMIT; END;

2nd Example

Conn KK/KK@vis

Create table kk_student ( STUD_ID NUMBER ,STUD_NAME VARCHAR2(50) ,STUD_ACCOUNT VARCHAR2(50) ,SUBJECT VARCHAR2(50) ,BATCH VARCHAR2(50) ,start_date date ,COUNTRY VARCHAR2(50) -- CONTEXT ,ATTRIBUTE1 VARCHAR2(100) ,ATTRIBUTE2 VARCHAR2(100) ,ATTRIBUTE3 VARCHAR2(100) ,ATTRIBUTE4 VARCHAR2(100) ,ATTRIBUTE5 VARCHAR2(100) ,STRUCT_ID NUMBER(15) ,SEGMENT1 VARCHAR2(25) ,SEGMENT2 VARCHAR2(25)

Page 5: Apps Work Shop

,SEGMENT3 VARCHAR2(25) ,SEGMENT4 VARCHAR2(25) ,SEGMENT5 VARCHAR2(25) , LAST_UPDATE_DATE DATE NOT NULL , LAST_UPDATED_BY NUMBER(15) NOT NULL , CREATION_DATE DATE NOT NULL , CREATED_BY NUMBER(15) NOT NULL , LAST_UPDATE_LOGIN NUMBER(15));

Grant all on kk_student to apps;

Conn apps/apps@vis

Create synonym kk_student for kk.kk_student;

SELECT * FROM KK_STUDENT begin ad_dd.register_table(‘PO’,'KK_STUDENT1','T'); AD_DD.REGISTER_COLUMN(‘PO’,'KK_STUDENT','STUD_ID',1,'NUMBER',15,'N','N'); AD_DD.REGISTER_COLUMN(‘PO’,'KK_STUDENT','STUD_NAME',2,'VARCHAR2',50,'Y','N'); AD_DD.REGISTER_COLUMN(‘PO’,'KK_STUDENT','STUD_ACCOUNT',3,'VARCHAR2',50,'Y','N'); AD_DD.REGISTER_COLUMN(‘PO’,'KK_STUDENT','COUNTRY',4,'VARCHAR2',50,'Y','N'); AD_DD.REGISTER_COLUMN(‘PO’,'KK_STUDENT','ATTRIBUTE1',5,'VARCHAR2',50,'Y','N'); AD_DD.REGISTER_COLUMN(‘PO’,'KK_STUDENT','ATTRIBUTE2',6,'VARCHAR2',50,'Y','N'); AD_DD.REGISTER_COLUMN(‘PO’,'KK_STUDENT','ATTRIBUTE3',7,'VARCHAR2',50,'Y','N'); AD_DD.REGISTER_COLUMN(‘PO’,'KK_STUDENT','ATTRIBUTE4',8,'VARCHAR2',50,'Y','N'); AD_DD.REGISTER_COLUMN(‘PO’,'KK_STUDENT','ATTRIBUTE5',9,'VARCHAR2',50,'Y','N'); AD_DD.REGISTER_COLUMN(‘PO’,'KK_STUDENT','STRUCT_ID',10,'NUMBER',15,'N','N'); AD_DD.REGISTER_COLUMN(‘PO’,'KK_STUDENT','SEGMENT1',12,'VARCHAR2',50,'Y','N'); AD_DD.REGISTER_COLUMN(‘PO’,'KK_STUDENT','SEGMENT2',13,'VARCHAR2',50,'Y','N'); AD_DD.REGISTER_COLUMN(‘PO’,'KK_STUDENT','SEGMENT3',14,'VARCHAR2',50,'Y','N'); AD_DD.REGISTER_COLUMN(‘PO’,'KK_STUDENT','SEGMENT4',15,'VARCHAR2',50,'Y','N'); AD_DD.REGISTER_COLUMN(‘PO’,'KK_STUDENT','SEGMENT5',16,'VARCHAR2',50,'Y','N'); Commit;END; SELECT * FROM FND_TABLESWHERE TABLE_NAME LIKE ''KK_STUDENT%’

SELECT * FROM FND_COLUMNSWHERE TABLE_ID =90405

Page 6: Apps Work Shop

Form and Form Function Registration

Example1

Take the Standard Concurrent Executable Form (FNDCPMPE). Copy the FNDCPMPE.fmx and rename as KK_ FNDCPMPE.fmx and put in the

$KK_TOP/forms/US. Open the apps front-end and open the Forms Form in below navigation. Application DeveloperapplicationForm Register the form as

Forms ApplicationUser Form Name Description

KK_ FNDCPMPE KK Application KK Executable

KK Executable Form

Register the forms to the form function (Application DeveloperapplicationFunction)

Function NameUser Function Name Type Form

KK_ FNDCPMPE_FUN

KK Executable Form Form KK Executable

Create a New Menu (Application DeveloperapplicationMenu)Menu User Menu NameKK_Menu KK Menu

Query the menu and attach the Form function to the Menu. (Application DeveloperapplicationMenu)

Seq PromtSub Menu Function Description

1KK Executeble  

KK Executable Form KK Executable Form

Based on the menu create the KK_Responsibility Assign the responsibility to the User. Login to the user and login the new executable form.

Form Functions with Query mode Register a new form function for the existing KK_ FNDCPMPE.fmx as below.

Function Name KK_ FNDCPMPE_VIEWUser Function Name KK Executable ViewType FormForm KK ExecutableParameter QUERY_ONLY="YES"

Attached the new function to the existing menu. Run and check the parameter function functionality.

Page 7: Apps Work Shop

Example2

Download the TEMPLATE.fmb and APPSTAND.fmb from $AU_TOP/forms/US in binary mode.

Set the FORM60_PATH in your local system. Try to open the TEMPLATE.fmb in form builder. Download all the dependent PLL and .fmb files from the Server. ($AU_TOP/forms/US) and

($AU_TOP/resources) to the local form60_path in binary mode. Rename the form module name as ‘KK_TEMPLATE’ and save as also KK_TEMPLATE.fmb Move this new fmb (KK_TEMPLATE) to $AU_TOP/forms/US binary. Open UNIX. And run the below command.

cd mnt/vis/visappl -- it is as a example.. . ./*.env -- setting the environment path. cd $AU_TOP/forms/US

f60gen $AU_TOP/forms/US/KK_TEMPLATE.fmb apps/$apps_pw module_type=FORM output_file=$FND_TOP/forms/US/KK_TEMPLATE.fmx

Open the apps front-end and open the Forms Form in below navigation. Application DeveloperapplicationFormRegister the form as below

Form Name KK_TEMPLATEForm Fun Name KK_TEMPLATE_FUNSubmenu Name  Menu Name KK_AOL_MENUResponsibility KK_RESPUser KK_USER

New Form Development Process

Template and Appstand Form Architecture

TEMPLATE.fmb

TEMPLATE.fmb Inherits all the Required object groups from appstand.fmb All required library are attached. Inherits some triggers ( some are read only mode ( Red) and some in read and write mode (

blue) Fndmenus.mmb ( the same menu which is attached to all the forms) APP_CUSTOM ( package having procedure closed window and open window)

APPSTAND.fmb

APPSTAND.fmb has all the standard object groups like (STANDARD_PC_AND_VA, STANDARD_TOOLBAR, and STANDARD_CALENDAR) which are inherited to other form in oracle application

Page 8: Apps Work Shop

APPSTAND.fmb TEMPLATE.fmb

Page 9: Apps Work Shop

  FNDMENU Architecture

  Coding Standards

Variable V_<variable_name>Parameter P_<parameter_name>Cursor Cur_<Cursor Name>Key word upper caseTable/View/Seq Lower case

Also it is client specific how they are following the standard..   Name Conventions

The form module name should be equal the .fmb file name which u have save.

It should be indicate the module name as well as it should follow the client Naming convention.

All the procedure and package should be written in the program unit or in the .pll file in the database and all these procedure should be call from the particular triggers of the form.

Package name should be given similarity to the block name and procedure and function name should be given as similarity to the item name.

Example : KK_CALENDER_PKG ( <Company short name><functionality of code><PKG>)

Page 10: Apps Work Shop

New Form Development process

Registering the Template.fmb in apps.

Example2

Download the TEMPLATE.fmb and APPSTAND.fmb from $AU_TOP/forms/US in binary mode.

Set the FORM60_PATH in your local system. Try to open the TEMPLATE.fmb in form builder. Download all the dependent PLL and .fmb files from the Server. ($AU_TOP/forms/US) and

($AU_TOP/resources) to the local form60_path in binary mode. Rename the form module name as ‘KK_TEMPLATE’ and save as also KK_TEMPLATE.fmb Move this new fmb (KK_TEMPLATE) to $AU_TOP/forms/US binary. Open UNIX. And run the below command.

cd mnt/vis/visappl -- it is as a example.. . ./*.env -- setting the environment path. cd $AU_TOP/forms/US

f60gen $AU_TOP/forms/US/KK_TEMPLATE.fmb apps/$apps_pw module_type=FORM output_file=$FND_TOP/forms/US/KK_TEMPLATE.fmx

Open the apps front-end and open the Forms Form in below navigation. Application DeveloperapplicationFormRegister the form as below

Form Name KK_TEMPLATEForm Fun Name KK_TEMPLATE_FUNSubmenu Name  Menu Name KK_AOL_MENUResponsibility KK_RESPUser KK_USER

Example3 (using the Template.fmb and kk_student table).

Steps

1. Download all the plls and requireds fmbs to your local machine. 2. Set the form60_path has set or not , if set then check all the standard plls and

required fmbs are there or not.3. Copy the TEMPLATE.fmb to other temp folder.4. Open the TEMPLATE.fmb in the form Builder.5. Change the module name to your required form name.

6. Save as same as the module name( module name and form name should be same and should be in upper case) (KK_STUDENT)

7. Delete the default blocks, windows, canvases8. Create a window and assign window property class to windows (KK_STUDENT)9. Create a canvas assign the canvas property class to Canvas. (KK_STUDENT)10. Assign windows to canvas and canvas to window. (KK_STUDENT)11. Create a data block using wizard based on a required table (KK_STUDENT).

Page 11: Apps Work Shop

12. Assign all text item property class to all items in the data block.13. Modify pre_form trigger at the form level.

Ex:- app_window.set_window_position ('BLOCKNAME', 'FIRST_WINDOW'); As Ex:- app_window.set_window_position (' KK_STUDENT', 'FIRST_WINDOW');

14. Modify the app_custom package in the program unit. Code : sample

Procedure close_window(wnd in varchar2) is begin IF (wnd = '<your first window>') then –Change to window name.

app_window.close_first_window; END IF; END;

Procedure open_window (wnd in varchar2) is begin IF (wnd = '<a window>') then --–Change to window name. go_block(‘block-name’); --–Change to block name. END IF; END; 

Code Procedure close_window(wnd in varchar2) is begin IF (wnd = 'KK_STUDENT') then –Changed to window name.

app_window.close_first_window; END IF; END;

Procedure open_window (wnd in varchar2) is begin IF (wnd = 'KK_STUDENT') then --–Changed to window name. go_block(‘KK_STUDENT’); --–Changed to block name. END IF; END; 

15. Modify the module level properties Consol window: give your window name

16. First_navigation data block : your block_name ( KK_STUDENT)17. In on_insert trigger in block level put the insert statement to the base table.

Note: the on-insert trigger is required if you are creating through view.18. Save and compile the form.19. Move (FTP) the form(KK_STUDENT.fmb) in binary mode to the custom top/forms/US 20. Compile the forms in the $AU_TOP/forms/US by f60gen command.

21. Ex:- f60gen $AU_TOP/forms/US/KK_STUDENT.fmb apps/$apps_pw module_type=FORM output_file=$KK_TOP/forms/US/KK_STUDENT.fmx

22. Run the form and try to insert and query data through it.

Page 12: Apps Work Shop

  WHO information tracking

Setting WHO Column in New form.

1)Who Columns is the columns which is tracking the record history for a record. Like who and when the record has created and who/when it has updated.

2)It has the standard columns.a. LAST_UPDATE_DATE DATE NOT NULLb. LAST_UPDATED_BY NUMBER(15) NOT NULLc. CREATION_DATE DATE NOT NULLd. CREATED_BY NUMBER(15) NOT NULLe. LAST_UPDATE_LOGIN NUMBER(15))

Steps to add who columns in New form.

1) Create a form based on the table (kk_student ) by taking the TEMPLATE.fmb2) Follow the apps standard like making a subclass ( text items to text items , canvas to canvas,

block to block, window to window)3) Update the app_custom package by setting the first window for opening the form and setting

the window name while closing the form.4) Add null canvas to the below items ( Last_update_date , last_updated_by, Creation_date,

Created_by, Last_update_login).5) Call the below build-in from pre-insert and pre-update of the current data block (KK_student’).

fnd_standard.set_who;6) Save and move the KK_STUDENT.fmb to KK_TOP/forms/US.7) Connect the unix. And compile the form from $AU_TOP/forms/US8) Resister the forms in the custom top.9) Ran the form to test who columns functionality.

Calendars Setting a Calendar in New form

1) Open the above KK_STUDENT.fmb in the form builder.2) Go to the Start_date field and open the properties. 3) Subclass : Text item date4) Lov : Enable_list_lamb 5) Validate from List : no6) Start_date Key-listval (Trigger) calendar.show;7) Save the form and move to the custom top.8) Compile from $AU_TOP/forms/US9) Run the form and see if the Apps standard calendar is showing or not.

Note: Enable_list_lamb is a dummy lov used to invoke special Object in our text item. The record group attached to the lov is a dummy record group. Select null from dual; Validate from list : Yes :-> Means it will compare with the record of the LOV and also

assign the date field to the date item. Validate from list : No Means selected date will not compire with the null and directly show

the lov.

Page 13: Apps Work Shop

 Find Methods (Row LOV, Find Window)

o If we want to query the form based on only one column (Primary Key) for one row then Row Lov logic will applicable.

o If we want to query the form based on the multiple column value then Find window (Search window) method will applicable.

o One block will have only one search method.

1) Row Lov Steps required to implement Row Lov

Open the KK_STUDENT.fmb in a form builder. Create a user Defined parameter (Stud_id_qf) Change the data type and width of the parameter same as the Primary Key. Create a Lov using the wizard based on the below query.

Select Stud_id from kk_student Assign the return value of the lov to the parameter (Stud_id_qf). Create a Query_Find user defined trigger at the block level. Write the below code on it.

App_find.query_find (‘lov_name’); Note: after opening the form when we click ViewFind, it calls Execute_trigger (‘Query_find’) internally. After then the above line code will execute. The Built-in will invoke the LOV and get the selected Primary key value to the User defined parameter (Stud_id_qf)Then it is assigning the ‘TRUE’ to the G_query_find parameter.Then it will call the execute_query in that block.

Create a Pre_query Trigger at the Data block level.Code :--

If :parameter.G_query_find = ‘TRUE’ then :kk_student.stud_id := :parameter. Stud_id_qf; :parameter.g_query_find := ‘FALSE’ ; End if;

The G_query_find parameter value will be assign ‘TRUE’, when we select the Find from Viewfind.

If we don’t used the g_query_find concept then also it will work but it will retrieve all the records as same as CTRL+F11.

Save the form and compile in the $AU_TOP/forms/US. Run the form and check the Row LOV functionality.

2) Find window

Steps require implementing Find window Open the KK_STUDENT.fmb in a form builder. Open the APPSTAND.fmb in form builder. Query_find object group of APPSTAND.fmb has contain Query_find_window, Query_find canvas,

Query_find block, with Key_next_block Trigger in block level, and the block contain atleast 3 button (Clear, New, Find). With the default code.

Copy the Query_find Object group from APPSTAND.fmb to KK_STUDENT.fmb. Rename the Objects of the Object_Groups in KK_STUDENT.fmb as per the block name.

(KK_STUDENT_QF ) Customized the query find block by adding the text items as per the requirement.

( Stud_name_qf , Stud_acct_qf , batch_qf ). Assign the same properties as per the reference field in KK_STUDENT Block. Modify the code in KEY_NEXT_BLOCK in Find block level (KK_STUDENT_QF).

Page 14: Apps Work Shop

o --App_find.find (‘Result block’);o App_find.find(‘KK_STUDENT’);

Modify the code in WBP of New Button-- App_find.new(‘Result_block’); App_find.new(‘KK_STUDENT’);

Modify the code in WBP of Find Button-- App_find.find(‘Result_block’); App_find.find(‘KK_STUDENT’);

Create Query_find user Defined Trigger at result Block (kk_student) at block level. Code :- --App_find.query_find( Result_window’, ‘find_window’, ‘find_block’);App_find.query_find( ‘KK_STUDENT’, ‘KK_STUDENT_QF’, ‘KK_STUDENT_QF’);

This procedure is going from result_window to the find window and cursor will go to find_block.

Pre-query trigger at Result block (kk_student)

Code :- If :Parameter.G_QUERY_FIND = ‘TRUE’ then Copy ( :find_block.item1 , ‘Result_block.item1’ ); Copy ( :kk_student_qf.stud_name_qf , ‘kk_student.stud_name’ );

Copy ( :kk_student_qf.stud_acct_qf , ‘kk_student.stud_account’ ); Copy ( :kk_student_qf.batch_qf , ‘kk_student.batch’ );

:parameter.G_QUERY_FIND := ‘FALSE’;

Save the form and compile in the $AU_TOP/forms/US Run the forms and check the find window functionality.

 Using Non-Form Functions

o Non Form function performs to restrict secure layout items within the form.

Steps to implement a non form function

Open the KK_STUDENT.fmb form in the form builder. Add a Push Button (Appove) in the lay out of KK_STUDENT. Create a Form function in the AOL Module in front-end.( ex: KK_APROVE’) The type of the function should be ‘subfunction’ Assign the non-form function to the menu and leaving the promt as empty. Create 2 button appove and reject on the form builder. Modify the pre-form Trigger at form level. Code :- Example IF fnd_function.test (‘function_name’) then App_item_property.set_property(‘blockname.itemname’, enabled, property_on);Else App_item_property.set_property(‘blockname.itemname’, enabled, property_off);

End if;----------IF fnd_function.test (‘function_name’) then App_item_property.set_property(‘KK_STUDENT.APPROVE’, enabled, property_on);

Page 15: Apps Work Shop

App_item_property.set_property(‘KK_STUDENT.REJECT’, enabled, property_off);Else App_item_property.set_property(‘KK_STUDENT.APPROVE’, enabled, property_off); App_item_property.set_property(‘KK_STUDENT.REJECT’, enabled, property_on);

End if;

Also register the form in different responsibility which has diff menu and run the same form in both the responsibility and get the difference.

Creating New Profile o Based on the profile (kk_subject) form will decide which subject the student needs.

SQL="SELECT MEANING, LOOKUP_CODEinto :visible_option_value,:profile_option_valuefrom fnd_lookupswhere lookup_type = 'KK_SUBJECT_LK'"COLUMN="meaning(10)"

Page 16: Apps Work Shop

Open kk_student in the form builder and write the below code in pre-form:

:KK_STUDENT.subject :=FND_PROFILE.value ('KK_SUBJECT'); --PROFILE NAME APP_ITEM_PROPERTY.SET_PROPERTY(':KK_STUDENT.SUBJECT', ENABLED , PROPERTY_OFF );

Using the apps built-ins

SET_TAB_PAGE_PROPERTY('RCV_SHIP', enabled, PROPERTY_FALSE);

SET_BLOCK_PROPERTY (block_name, property, value );o Property : INSERT_ALLOWED/UPDATE_ALLOWED/DELETE_ALLOWED/

DEFAULT_WHEREo Value : PROPERTY_TRUE / PROPERTY_TRUE

SET_CANVAS_PROPERTY (canvas_name ,property, value); Property : Canvas_Size/Topmost_tab_page, set_canvas_property('DEBRIEF_LINES',topmost_tab_page,'MATERIAL_NEW');

set_form_property (form_name ,property, value); set_form_property(name_in('SYSTEM.CURSOR_FORM'),VALIDATION_UNIT

,FORM_SCOPE);

Set_item_Property ( ‘Block.item_name’ ,property ,value); Properties : - LOV_VALIDATION/ LOV_NAME / VALIDATE_FROM_LIST

update_allowed/ item_is_valid/ visible/ enabled/ navigable

Flexfields Introduction to Key and Descriptive FIEXFIEDS

In an Oracle environment, a flex field is a database field that has flexibility to built in a diff account structure or to capture the extra information dynamically. So users can define reporting structures that are relevant to their specific organizations. Two types of flex fields are provided: key flex fields, which are required to record key data elements in Oracle applications, and descriptive flex fields, which are user-defined and record data elements that aren't automatically provided.

Page 17: Apps Work Shop

Enabling a DFFo Open the form to which you want to enable the DFF.o Put the Cursor on the DFF item.o Navigate to help – Diagnostic-Examine- Provide the apps passwordo Give the block name as $DESCITIVE$ and pickup the descriptive Flex field Name. o Switch the responsibility to application developer o Query the record based on that title of our DFF.o Click on segment and add some additional segments to the DFF.o If we have multiple DFF in a form then to identify or differentiate the DFF based on the Block

name.o In site a block only one DFF should be exist.o Context column /attribute category column is the structure column in DFF, and it is used to

group a set of attribute columns.o The number of context column present in the table is directly proportional to the no of DFF

item present in that current Form.o System will hide to map one attribute column to two DFF.

Value setso The Value set is nothing but the list of values which will be used in the Lov of the DFF/KFF

columns.o This value sets can be 8 types. But mostly we are using the independent/dependent value

set for KFF.o You can set the Format Type, Max Size , min value or Max value for a values used in

DFF/KFF.

DFF Registration and Structure Defineo Steps to Register..

Create a DFF Table in Module Specific Schema with attribute category column. Create a public synonym with apps schema. Register the table in AOL Module. Register the DFF in AOL Module.

o Design a form taking KK_Student table, while end user will going to enter the address field he should be prompted to enter address1 and address2 field. And while he will enter the country code( India/USA) again the form will be prompted to enter City in attribute3 and Dl No in attribute4 field in the case of Inida. But for the 2nd case ( USA) the form should prompt City in attibute3, SSN No in Attribute4, Tax Reg No in attribute5.

Page 18: Apps Work Shop

Steps Create the DFF as per the below information.

Application KK Application name KKDFFTitle KK_address Desc KK AddressTable Application KK Application Table Name KK_studentStructure Column Country Context promt Country

Page 19: Apps Work Shop
Page 20: Apps Work Shop

Create 2 context field value (INDIA/ US) . For Context India.. Define the Segments (City and DL No) and Values sets. For Context USA . Define the segments ( City, SSNo, Tax Reg No)

Invoking DFF Form of New Form

1. Open the kk_student.fmb in the form builder2. assign all the dff column with null canvas.3. create a text item in the datablock.

o Name : KK_ADDRo Subclass : Text-item-desc-flexo Lov : enable-list-lambo Validate from list : Noo Database : noo Canvas : KK_student

4. when-new-form-instance

KK_STUDENT.KK_ADDRESS ( 'WHEN-NEW-FORM-INSTANCE');

5. when-new-item-instanceFND_FLEX.EVENT('WHEN-NEW-ITEM-INSTANCE');

Note : this is the common API which is used to invoke the flex field objects ( window, canvas,..) for KFF as well for DFF.It can be called from key-listval, pre-insert, pre-update.

6. Save and run the form in apps.

Page 21: Apps Work Shop

KFF Registration and Structure Defineo Steps To Register KFF

Create a table in module specific schema with segment column, structure_id column & Code Combination column.

Create a public synonym in apps schema. Registered the table in AOL Module. Resister the KFF with AOL.

o Creating a new structure in accounting KFF ( GL# ). Navigation : AOL FlexfieldKeySegment Query Flexfield Title as ‘Accounting Flexfield’ Put the cursor in the detail block and click the new button. Give the code –Title –Desc Define the segments for the structure.

KK_ACCOUNT KK_ACCOUNTKK Account

Segment1 Location 3 charSegment2 Dept 4 digitsSegment3 Branch 3 digitsSegment4 Account 6 digits

Values sets for the Segments Segment1 Segment2 Segment3 Segment4

Hyderabad HYD Sales 1001 Ameerpet 211 Sal Account 410023Kolkata KOL Purchage 1002 Koti 212 Sales Acc 410024Bangalore BNG Accounting 1003 Salt Lake 213 Pur Acc 410025Mumbai MUB Warehouse 1004 Kol Town 214 Goodwill acc 410026

        KorMangala 215Misneslious Acc 410027

       Electronic City 216    

        Bandra 217            Cantonment 218    

Page 22: Apps Work Shop

Invoking KFF Form of New Form

Segments

Page 23: Apps Work Shop

1. Open the kk_student.fmb in the form builder2. Assign the dff columns with null canvas.3. Create a text item in the datablock.

o Name : KK_ACCTo Subclass : Text-itemo Lov : enable-list-lambo Validate from list : Noo Database : noo Canvas : KK_student

4. when-new-form-instance KK_STUDENT.KK_ACCOUNT ('WHEN-NEW-FORM-INSTANCE');

5. when-new-item-instanceFND_FLEX.EVENT('WHEN-NEW-ITEM-INSTANCE');

Note : this is the common API which is used to invoke the flex field objects ( window, canvas,..) for KFF as well for DFF.It can be called from key-listval, pre-insert, pre-update.

6. Save and run the form in apps.

Using dynamic KFF Structure.

By using the profile option you can get the dynamic account structure.