Вы находитесь на странице: 1из 5

For creating the folder options in the form Step1 Attach the APPFLDR library to the form

In order to have the code needed for this functionality, we must include the following library from $AU_TOP/resource (remember to remove directory when attaching)
Step2

To have access to objects required by folders, subclass the STANDARD_FOLDER object group from the APPSTAND.fmb form, located in $AU_TOP/forms/US. Open the form, locate the object group, drag and drop it to your form
Step3 Form level triggers WHEN-NEW-FROM-INSTANCE app_folder.def_folder_block( object_name => 'Folder Test' , folder_block_name => 'FOLDER_BLOCK NAME' , prompt_block_name => 'PROMPT_BLOCK NAME' , folder_canvas_name => 'STACKED_CANVAS NAME' -- Multiple stack canvas can be defined as separated by comma , folder_window_name => 'WINDOW NAME' , dis_functions => 'UPPER, ENABLED, lower, disabled' , tab_canvas => null , fixed_canvas => 'STACKED_CANVAS_FIXED NAME) ; app_folder.event('INSTANTIATE'); app_folder.event('VERIFY'); --Later can be commented FOLDER_ACTION app_folder.event(:global.folder_action); KEY-CLRFRM app_folder.event( 'KEY-CLRFRM'); WHEN-WINDOW-RESIZED if :system.event_window = 'FOLDER_WINDOW' then app_folder.event( 'WHEN-WINDOW-RESIZED' ) ; end if; FOLDER_RETURN_ACTION Null; Step4 Three data blocks has to create for folder functionality along with database block. Folder_tools and Folder_control blocks will be created automatically when you do the step2 Database block Folder prompt block (user named) Folder_tools block Folder_control block Database block (user named)

The below Block level triggers are mandatory for the Database block WHEN-NEW-BLOCK-INSTANCE KEY-NEXT-ITEM KEY-PREV-ITEM PRE-BLOCK POST-BLOCK
PRE-QUERY KEY-EXEQRY POST-QUERY

KEY-EXEQRY For all the above use app_folder.event Trigger: User-named trigger FOLDER_RETURN_ACTION This trigger is fired each time the folder does certain operations that you may need to further process. ":global:folder_action" contains the name of the process, and ":global:folder_field" holds the name of the relevant field, if any, stripped of the block name. Specific callbacks may populate other global variables. The FOLDER_RETURN_ACTION trigger is optional. You should code it if you need to perform logic on any of the supported events. Step5 Folder prompt block (user named) In folder prompt block. The below mentioned items has to create with same name Folder_dummy Folder_title Folder_open Order_by1 Order_by2 Order_by3 For the Folder_open item, create when-button-pressed trigger copy('OPEN', 'global.folder_action'); execute_trigger('folder_action');

Step6 Folder_control block The following block level triggers has to be created Key-exit Key-down Key-crerec Key-commit Key-clrrec Key-clrblk Key-nxtrec Key-clrfrm Key-prvrec All the above triggers should be created with the code Bell; Step7 The below mentioned objects are created automatically once you do the step1 and step2. Just ensure the availability of the below Some of the standard items are to be created Open Save New Delete Show Hide Widen Shrink Up Left Right Down All the above item will be created with trigger WHEN-BUTTON-PRESSED with the below mentioned code copy ('the respective action should be mentioned here', 'global.folder_action'); execute_trigger('folder_action');

The following record groups and LOV should exist FOLDERS_TO_LOAD Query: Select f.name, f.folder_id, u.user_name, decode (f.autoquery_flag, 'Y', '*') autoquery, decode (f.public_flag, 'Y', '*') avail_public from fnd_folders f, fnd_user u where f.object =:folder_control.object and ((f.created_by =:folder_control.user_id) or (f.public_flag = 'Y')) and f.created_by = u.user_id(+) order by f.name Return value for folder id is FOLDER_CONTROL.FOLDER_ID FOLDERS_TO_DELETE Query Select name, folder_id from fnd_folders where created_by = :folder_control.user_id and object = :folder_control.object order by name Return value for folder id is FOLDER_CONTROL.FOLDER_ID FOLDER_CANDIDATES Return value is FOLDER_CONTROL.NEW_ELEMENT The following parameter should be created FOLDER_OPERATION_MODE The following windows and respective content canvas has to create FOLDER_SORT_DATA FOLDER_TOOLS ALTER_PROMPT SAVE WHERE_CLAUSE FOLDER_AUTOSIZE Note: The folder block canvas should be the stacked canvas type.

For creating Query_find window step1 Form level.. Just add to 'WHEN-NEW-FORM-INSTANCE trigger as like below If query find is available then under the when-new-form-instance it has to defineprogram unit Eg----IF event_name = 'WHEN-NEW-FORM-INSTANCE' THEN EXECUTE_TRIGGER('QUERY_FIND'); END IF; In Query_find block.. Create block level KEY-NXTBLK trigger :parameter.G_query_find := 'TRUE'; app_find.find('blockname'); :parameter.G_query_find := 'FALSE'; step2 For date Create item level KEY-LISTVAL Trigger calendar.show(sysdate); step3 For clear button Create item level WHEN-BUTTON-PRESSED trigger app_find.clear; step4 For find button Create item level WHEN-BUTTON-PRESSED trigger :parameter.G_query_find := 'TRUE'; app_find.find('blockname'); :parameter.G_query_find := 'FALSE'; ---G_Query_find parameter is by default available step5 Add some condition in the where clause of the block that has to be executed base on the parameters passed through the find window Eg. WHERE ORG_ID = :PARAMETER.ORG_ID AND TRUNC(CLAIM_CREATION_DATE) BETWEEN NVL(:QUERY_FIND.CLAIM_DATE_FROM,TRUNC(CLAIM_CREATION_DATE)) AND NVL(:QUERY_FIND.CLAIM_DATE_TO,TRUNC(CLAIM_CREATION_DATE)) AND NVL(DIST_CLAIM_NUMBER) BETWEEN NVL(:QUERY_FIND.DIST_CLM_NR_FROM,TRUNC(DIST_CLAIM_NUMBER)) Add this custom trigger in the first block pof the form IF event_name ='QUERY-FIND' THEN APP_FIND.QUERY_FIND('CLAIM_DETAILS','QUERY_FIND','QUERY_FIND'); END IF;

Вам также может понравиться