Você está na página 1de 24

Oracle Apps Forms

New Module/Application Development Process Create a application in AOL module i. AOLApplicationRegister create a new menu (PRASAD_AOL_MENU) i. AOLApplicationMenu Create a schema/user for the new module in database i. In SYSTEM/Manager@vis ii. Exam: create user PRASAD identified by PRASAD Grant connect, resource to PRASAD Create product Directory structure for the New Module PRASAD. i. D:\oracle\visappl\prasad\11.5.0\forms\US ii. D:\oracle\visappl\prasad\11.5.0\repots\US Register the PRASAD_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 PRASAD_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 := . . . . PRASAD_TOP := d:\oracle\visappl\prasad\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 create a new request group i. Sysadmin RespSequrityResponsibilityRequest create a new responsibility (PRASAD_AOL_RESP) i. Sysadmin Resp SequrityResponsibilityDefine Create a user & Assign the Resp to the user in the application
i. Sysadmin Resp SequrityUserDefine Practical

Registration Table Registration Process 1) 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)

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 PRASAD/PRASAD@vis Create table PRASAD_CLASS ( ROLLNO NUMBER , STUD_NAME VARCHAR2(100) , SUBJECT VARCHAR2(50)) Grant all to PRASAD_CLASS to apps; Conn apps/apps@vis Create public sysnonym PRASAD_CLASS FOR PRASAD_CLASS ; Now register the table using AD_DD package. BEGIN AD_DD.register_table ('PO', 'PRASAD_CLASS', 'T'); AD_DD.register_column ('PO','PRASAD_CLASS','ROLLNO',1,'NUMBER',10 ,'N', 'N'); AD_DD.register_column ('PO','PRASAD_CLASS','STUD_NAME',2,'VARCHAR2',100 ,'Y', 'N'); COMMIT; END; 2nd Example Conn PRASAD/PRASAD@vis Create table prasad_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) ,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 prasad_student to apps; Conn apps/apps@vis Create synonym prasad_student for prasad.prasad_student; SELECT * FROM PRASAD_STUDENT begin ad_dd.register_table(PO,'PRASAD_STUDENT1','T'); AD_DD.REGISTER_COLUMN(PO,'PRASAD_STUDENT','STUD_ID',1,'NUMBER',15,'N','N'); AD_DD.REGISTER_COLUMN(PO,'PRASAD_STUDENT','STUD_NAME',2,'VARCHAR2',50,'Y','N') ; AD_DD.REGISTER_COLUMN(PO,'PRASAD_STUDENT','STUD_ACCOUNT',3,'VARCHAR2',50,' Y','N'); AD_DD.REGISTER_COLUMN(PO,'PRASAD_STUDENT','COUNTRY',4,'VARCHAR2',50,'Y','N'); AD_DD.REGISTER_COLUMN(PO,'PRASAD_STUDENT','ATTRIBUTE1',5,'VARCHAR2',50,'Y','N') ; AD_DD.REGISTER_COLUMN(PO,'PRASAD_STUDENT','ATTRIBUTE2',6,'VARCHAR2',50,'Y','N') ; AD_DD.REGISTER_COLUMN(PO,'PRASAD_STUDENT','ATTRIBUTE3',7,'VARCHAR2',50,'Y','N') ; AD_DD.REGISTER_COLUMN(PO,'PRASAD_STUDENT','ATTRIBUTE4',8,'VARCHAR2',50,'Y','N') ; AD_DD.REGISTER_COLUMN(PO,'PRASAD_STUDENT','ATTRIBUTE5',9,'VARCHAR2',50,'Y','N') ; AD_DD.REGISTER_COLUMN(PO,'PRASAD_STUDENT','STRUCT_ID',10,'NUMBER',15,'N','N'); AD_DD.REGISTER_COLUMN(PO,'PRASAD_STUDENT','SEGMENT1',12,'VARCHAR2',50,'Y','N') ; AD_DD.REGISTER_COLUMN(PO,'PRASAD_STUDENT','SEGMENT2',13,'VARCHAR2',50,'Y','N') ; AD_DD.REGISTER_COLUMN(PO,'PRASAD_STUDENT','SEGMENT3',14,'VARCHAR2',50,'Y','N') ;

AD_DD.REGISTER_COLUMN(PO,'PRASAD_STUDENT','SEGMENT4',15,'VARCHAR2',50,'Y','N') ; AD_DD.REGISTER_COLUMN(PO,'PRASAD_STUDENT','SEGMENT5',16,'VARCHAR2',50,'Y','N') ; Commit; END; SELECT * FROM FND_TABLES WHERE TABLE_NAME LIKE ''PRASAD_STUDENT% SELECT * FROM FND_COLUMNS WHERE TABLE_ID =90405

Form and Form Function Registration Example1 Take the Standard Concurrent Executable Form (FNDCPMPE). Copy the FNDCPMPE.fmx and rename as PRASAD_ FNDCPMPE.fmx and put in the $PRASAD_TOP/forms/US. Open the apps front-end and open the Forms Form in below navigation. Application DeveloperapplicationForm Register the form as User Form Forms Application Name Description PRASAD_ PRASAD PRASAD PRASAD FNDCPMPE Application Executable Executable Form Register the forms to the form function (Application DeveloperapplicationFunction) Function Name PRASAD_ FNDCPMPE_FUN User Function Name PRASAD Executable Form Type Form Form PRASAD Executable

Create a New Menu (Application DeveloperapplicationMenu) Menu User Menu Name PRASAD_Menu PRASAD Menu Query the menu and attach the Form function to the Menu. (Application DeveloperapplicationMenu)

Sub Promt Menu Function PRASAD PRASAD 1 Executeble Executable Form Based on the menu create the PRASAD_Responsibility Assign the responsibility to the User. Login to the user and login the new executable form. Seq
Form Functions with Query mode

Description PRASAD Executable Form

Register a new form function for the existing PRASAD_ FNDCPMPE.fmx as below. PRASAD_ FNDCPMPE_VIEW PRASAD Executable View Form PRASAD Executable

Function Name

User Function Name Type Form Parameter QUERY_ONLY="YES" Attached the new function to the existing menu.

Run and check the parameter function functionality.

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 PRASAD_TEMPLATE and save as also PRASAD_TEMPLATE.fmb Move this new fmb (PRASAD_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/PRASAD_TEMPLATE.fmb apps/$apps_pw module_type=FORM output_file=$FND_TOP/forms/US/PRASAD_TEMPLATE.fmx Open the apps front-end and open the Forms Form in below navigation. Application DeveloperapplicationForm Register the form as below

Form Name Form Fun Name Submenu Name Menu Name Responsibility User

PRASAD_TEMPLATE PRASAD_TEMPLATE_FUN PRASAD_AOL_MENU PRASAD_RESP PRASAD_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

APPSTAND.fmb

TEMPLATE.fmb

FNDMENU Architecture

Coding Standards

Variable Parameter Cursor Key word Table/View/Seq

V_<variable_name> P_<parameter_name> Cur_<Cursor Name> upper case 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 : PRASAD_CALENDER_PKG ( <Company short name><functionality of code><PKG>)

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 PRASAD_TEMPLATE and save as also PRASAD_TEMPLATE.fmb Move this new fmb (PRASAD_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/PRASAD_TEMPLATE.fmb apps/$apps_pw module_type=FORM output_file=$FND_TOP/forms/US/PRASAD_TEMPLATE.fmx Open the apps front-end and open the Forms Form in below navigation. Application DeveloperapplicationForm Register the form as below
Form Name Form Fun Name Submenu Name Menu Name Responsibility User PRASAD_TEMPLATE PRASAD_TEMPLATE_FUN PRASAD_AOL_MENU PRASAD_RESP PRASAD_USER

Example3 (using the Template.fmb and prasad_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) (PRASAD_STUDENT) 7. Delete the default blocks, windows, canvases 8. Create a window and assign window property class to windows (PRASAD_STUDENT)

9. Create a canvas assign the canvas property class to Canvas. (PRASAD_STUDENT) 10. Assign windows to canvas and canvas to window. (PRASAD_STUDENT) 11. Create a data block using wizard based on a required table (PRASAD_STUDENT). 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 (' PRASAD_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 = 'PRASAD_STUDENT') then Changed to window name. app_window.close_first_window; END IF; END; Procedure open_window (wnd in varchar2) is begin IF (wnd = 'PRASAD_STUDENT') then --Changed to window name. go_block(PRASAD_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 ( PRASAD_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(PRASAD_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/PRASAD_STUDENT.fmb apps/$apps_pw module_type=FORM output_file=$PRASAD_TOP/forms/US/PRASAD_STUDENT.fmx

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

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 NULL b. LAST_UPDATED_BY NUMBER(15) NOT NULL c. CREATION_DATE DATE NOT NULL d. CREATED_BY NUMBER(15) NOT NULL e. LAST_UPDATE_LOGIN NUMBER(15)) Steps to add who columns in New form. 1) 2) 3) 4) 5) 6) 7) 8) 9) Create a form based on the table (prasad_student ) by taking the TEMPLATE.fmb Follow the apps standard like making a subclass ( text items to text items , canvas to canvas, block to block, window to window) Update the app_custom package by setting the first window for opening the form and setting the window name while closing the form. Add null canvas to the below items ( Last_update_date , last_updated_by, Creation_date, Created_by, Last_update_login). Call the below build-in from pre-insert and pre-update of the current data block (PRASAD_student). fnd_standard.set_who; Save and move the PRASAD_STUDENT.fmb to PRASAD_TOP/forms/US. Connect the unix. And compile the form from $AU_TOP/forms/US Resister the forms in the custom top. Ran the form to test who columns functionality.

Calendars
Setting a Calendar in New form 1) 2) 3) 4) 5) 6) Open the above PRASAD_STUDENT.fmb in the form builder. Go to the Start_date field and open the properties. Subclass : Text item date Lov : Enable_list_lamp Validate from List : no Start_date Key-listval (Trigger) calendar.show; 7) Save the form and move to the custom top. 8) Compile from $AU_TOP/forms/US 9) 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.

o o o

Find Methods (Row LOV, Find Window)


If we want to query the form based on only one column (Primary Key) for one row then Row Lov logic will applicable. If we want to query the form based on the multiple column value then Find window (Search window) method will applicable. One block will have only one search method.

1)

Row Lov
Steps required to implement Row Lov Open the PRASAD_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 prasad_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 :prasad_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 dont 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 PRASAD_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 PRASAD_STUDENT.fmb. Rename the Objects of the Object_Groups in PRASAD_STUDENT.fmb as per the block name. (PRASAD_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 PRASAD_STUDENT Block. Modify the code in KEY_NEXT_BLOCK in Find block level (PRASAD_STUDENT_QF). o --App_find.find (Result block); o App_find.find(PRASAD_STUDENT); Modify the code in WBP of New Button -- App_find.new(Result_block); App_find.new(PRASAD_STUDENT); Modify the code in WBP of Find Button -- App_find.find(Result_block); App_find.find(PRASAD_STUDENT); Create Query_find user Defined Trigger at result Block (prasad_student) at block level. Code :--App_find.query_find( Result_window, find_window, find_block); App_find.query_find( PRASAD_STUDENT, PRASAD_STUDENT_QF, PRASAD_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 (prasad_student) Code :If :Parameter.G_QUERY_FIND = TRUE then Copy ( :find_block.item1 , Result_block.item1 ); Copy ( :prasad_student_qf.stud_name_qf , prasad_student.stud_name ); Copy ( :prasad_student_qf.stud_acct_qf , prasad_student.stud_account ); Copy ( :prasad_student_qf.batch_qf , prasad_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 PRASAD_STUDENT.fmb form in the form builder. Add a Push Button (Appove) in the lay out of PRASAD_STUDENT. Create a Form function in the AOL Module in front-end.( ex: PRASAD_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(PRASAD_STUDENT.APPROVE, enabled, property_on); App_item_property.set_property(PRASAD_STUDENT.REJECT, enabled, property_off); Else App_item_property.set_property(PRASAD_STUDENT.APPROVE, enabled, property_off); App_item_property.set_property(PRASAD_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 (prasad_subject) form will decide which subject the student needs.

SQL="SELECT MEANING, LOOKUP_CODE into :visible_option_value, :profile_option_value from fnd_lookups where lookup_type = 'PRASAD_SUBJECT_LK'" COLUMN="meaning(10)"

Open prasad_student in the form builder and write the below code in pre-form: :PRASAD_STUDENT.subject :=FND_PROFILE.value ('PRASAD_SUBJECT'); --PROFILE NAME APP_ITEM_PROPERTY.SET_PROPERTY(':PRASAD_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_WHERE o 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 userdefined and record data elements that aren't automatically provided.
Enabling a DFF o 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 password o 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 sets o 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 Define o 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 PRASAD_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.

Steps Create the DFF as per the below information.


Application Title Table Application Structure Column PRASAD Application PRASAD_address PRASAD Application Country name Desc Table Name Context promt PRASADDFF PRASAD Address PRASAD_student Country

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 prasad_student.fmb in the form builder 2. assign all the dff column with null canvas. 3. create a text item in the datablock. o Name : PRASAD_ADDR o Subclass : Text-item-desc-flex o Lov : enable-list-lamb o Validate from list : No o Database : no o Canvas : PRASAD_student 4. when-new-form-instance PRASAD_STUDENT.PRASAD_ADDRESS ( 'WHEN-NEW-FORM-INSTANCE'); 5. when-new-item-instance FND_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.

KFF/DFF Code

KFF Registration and Structure Define o 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.
PRASAD_ACCOUNT Segment1 Segment2 Segment3 Segment4 PRASAD_ACCOUNT Location Dept Branch Account PRASAD Account 3 char 4 digits 3 digits 6 digits

Values sets for the Segments


Segment1 Hyderabad HYD Kolkata KOL Bangalore BNG Mumbai MUB Segment2 Sales 1001 Purchage 1002 Accounting 1003 Warehouse 1004 Segment3 Ameerpet 211 Koti 212 Salt Lake 213 Kol Town 214 KorMangala Electronic City Bandra Cantonment 215 216 217 218 Segment4 Sal Account 410023 Sales Acc 410024 Pur Acc 410025 Goodwill acc 410026 Misneslious Acc 410027

Invoking KFF Form of New Form

Segments

KFF Value Sets

1. Open the prasad_student.fmb in the form builder 2. Assign the dff columns with null canvas. 3. Create a text item in the datablock. o Name : PRASAD_ACCT o Subclass : Text-item o Lov : enable-list-lamb o Validate from list : No o Database : no o Canvas : PRASAD_student 4. when-new-form-instance PRASAD_STUDENT.PRASAD_ACCOUNT ('WHEN-NEW-FORM-INSTANCE'); 5. when-new-item-instance FND_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.

Você também pode gostar