1. update form level trigger WHEN-NEW-FORM-INSTANCE
declare
cursor get_cao is
select to_char(id_flex_num)
from fnd_id_flex_structures
where id_flex_structure_code = 'XX COA'
and id_flex_code = 'GL#';
v_cao varchar2(1000);
begin
open get_cao;
fetch get_cao into v_cao;
if get_cao%notfound then
v_cao := '101';
end if;
close get_cao;
app_standard.event('WHEN-NEW-FORM-INSTANCE');
fnd_key_flex.define(
BLOCK=>'SFF_MO_HEADER_V', --SFF_MO_HEADER_V block SFF_MOVE_ORDER_CAN in canvas
FIELD=>'DESTINATION_ACCOUNT_SEGMENTS', --field for LOV should be not database
APPL_SHORT_NAME=>'SQLGL',
CODE=>'GL#',
NUM=>v_cao,
ID=>'DESTINATION_ACCOUNT_CCID',--to show/store the CCID
DESCRIPTION=>'',
TITLE=>'Test Title',
VALIDATE=>'FULL',
QBE_IN=>'Y',
DERIVE_ALWAYS=>'Y',
updateable => '',
--VRULE=>'\nSUMMARY_FLAG\nI\nAPPL=SQLGL;NAME=GL_NO_PARENT_SEGMENT_ALLOWED\nN',
--vrule => 'GL_GLOBAL\nDETAIL_POSTING_ALLOWED \nE\nAPPL='||'"'||'SQLGL'||'"'||'; name=Parent Values are not allowed\nN'
where_clause => 'summary_flag !=''Y''',
QUERY_SECURITY =>'Y');
end ;--initialize;
2. Field Properties
DESTINATION_ACCOUNT_SEGMENTS, --field for LOV should be not database
Database Item: No
Query Only: No
List of Values: Enable List Lamp
Validate from List: No
3. field DESTINATION_ACCOUNT_CCID,--to show/store the CCID
Triggers:
3.Invoke Flexfield functionality by calling FND_Flex.Event(event) from Block Level:
- PRE-QUERY -- FND_FLEX.EVENT('PRE-QUERY' );
- POST-QUERY -- FND_FLEX.EVENT('POST-QUERY');
- PRE-INSERT --
- PRE-UPDATE --
- WHEN-VALIDATE-RECORD (item Level down)
- WHEN-NEW-ITEM-INSTANCE (item Level down)
- WHEN-VALIDATE-ITEM (item Level down)
- Write an item level trigger WHEN-NEW-ITEM-INSTANCE on DESTINATION_ACCOUNT_SEGMENTS as
FND_FLEX.EVENT(‘WHEN-NEW-ITEM-INSTANCE’)
- Write an item level trigger KEY-EDIT on BTL_KFF as
FND_FLEX.EVENT(‘KEY-EDIT’);
- Write an item level trigger WHEN-VALIDATE-ITEM on DESTINATION_ACCOUNT_SEGMENTS as
FND_FLEX.EVENT(‘WHEN-VALIDATE-ITEM’);
IF :XX_BLOCK.DESTINATION_ACCOUNT_CCID = -1 THEN
FND_MESSAGE.SET_STRING(‘You Have Selected An Undefined Code Combination !’);
FND_MESSAGE.SHOW;
RAISE FORM_TRIGGER_FAILURE;
END IF;
No comments:
Post a Comment