CREATE PARAMETER ITEM RANGE
1 P_CONC_REQUEST_ID DATA TYPE
NUMBER
2 P_ITEM_FLEXDATA DATA TYPE CHARACTER 500
INITIAL VAL
(msi.segment1||msi.segment2||msi.segment3||msi.segment4||msi.segment5
||msi.segment6||msi.segment7||msi.segment8||msi.segment9||msi.segment10
||msi.segment11||msi.segment12||msi.segment13||msi.segment14||msi.segment15
||msi.segment16||msi.segment17||msi.segment18||msi.segment19||msi.segment20)
4 P_ITEM_HI CHAR 820
5 P_ITEM_LO CHAR820
6 P_STRUCT_NUM NUMBER
101
7 p_where_item
CHAR 820 INITIAL VAL 1=1
BEFORE REPORT
FUNCTION beforereport
RETURN BOOLEAN
IS
BEGIN
begin
SRW.USER_EXIT('FND SRWINIT');
exception
when srw.user_exit_failure then
srw.message(010,'Failed in before report trigger, srwinit. ');
raise;
end;
begin
SRW.USER_EXIT('FND FLEXSQL CODE="MSTK"
NUM=":P_STRUCT_NUM" DISPLAY="ALL"
APPL_SHORT_NAME="INV"
OUTPUT=":P_ITEM_FLEXDATA" MODE="SELECT"
TABLEALIAS="msib"');
exception
when srw.user_exit_failure then
srw.message(020,'Failed in before report trigger, item select. ');
raise;
end;
/*
begin
SRW.USER_EXIT('FND FLEXSQL CODE="MSTK"
NUM=":P_STRUCT_NUM" DISPLAY="ALL" APPL_SHORT_NAME="INV"
OUTPUT=":P_ITEM_ORDER_BY" MODE="ORDER BY"
TABLEALIAS="msi"');
exception
when srw.user_exit_failure then
srw.message(080,'Failed in before report trigger, item order by. ');
raise;
end;
*/
begin
SRW.USER_EXIT('FND FLEXSQL CODE="MSTK"
NUM=":P_STRUCT_NUM" DISPLAY="ALL"
APPL_SHORT_NAME="INV" OUTPUT=":P_WHERE_ITEM"
MODE="WHERE"
OPERATOR="BETWEEN" OPERAND1=":P_ITEM_LO"
OPERAND2=":P_ITEM_HI" TABLEALIAS="msib"');
exception
when srw.user_exit_failure then
srw.message(110,'Failed in before report trigger, item where. ');
raise;
end;
return (TRUE);
end;
AFTER REPORT
FUNCTION afterreport
RETURN BOOLEAN
IS
BEGIN
begin
SRW.USER_EXIT('FND SRWINIT');
exception
when srw.user_exit_failure then
srw.message(010,'Failed in before report trigger, srwinit. ');
raise;
end;
begin
SRW.USER_EXIT('FND FLEXSQL CODE="MSTK"
NUM=":P_STRUCT_NUM" DISPLAY="ALL"
APPL_SHORT_NAME="INV"
OUTPUT=":P_ITEM_FLEXDATA" MODE="SELECT"
TABLEALIAS="msib"');
exception
when srw.user_exit_failure then
srw.message(020,'Failed in before report trigger, item select. ');
raise;
end;
/*
begin
SRW.USER_EXIT('FND FLEXSQL CODE="MSTK"
NUM=":P_STRUCT_NUM" DISPLAY="ALL"
APPL_SHORT_NAME="INV" OUTPUT=":P_ITEM_ORDER_BY"
MODE="ORDER BY" TABLEALIAS="msi"');
exception
when srw.user_exit_failure then
srw.message(080,'Failed in before report trigger, item order by. ');
raise;
end;
*/
begin
SRW.USER_EXIT('FND FLEXSQL CODE="MSTK"
NUM=":P_STRUCT_NUM" DISPLAY="ALL"
APPL_SHORT_NAME="INV" OUTPUT=":P_WHERE_ITEM"
MODE="WHERE"
OPERATOR="BETWEEN" OPERAND1=":P_ITEM_LO"
OPERAND2=":P_ITEM_HI" TABLEALIAS="msib"');
exception
when srw.user_exit_failure then
srw.message(110,'Failed in before report trigger, item where. ');
raise;
end;
return (TRUE);
end;
No comments:
Post a Comment