You are on page 1of 3

1)Call the user ext from before report trigger SRW.

USER_EXIT('FND SRWINIT'); 2)Call Another User Exit from After Report Trigger SRW.USER_EXIT('FND SRWEXIT'); 3)Define the following parameters 1)P_CONC_REQUEST_ID 2)P_FLEXDATA 3)P_STRUCT_NUM

4)Call another User exit from before report trigger SRW.USER_EXIT('FND FLEXSQL'); 5)Define the Quiery like follows SELECT &P_FLEXDATA FROM KFF Table WHERE KFF Structure Column = :P_STRUCT_NUM; 6)Define Formula COlumn and CALL another User Exit from formula column SRW.USER_EXIT('FND FLEXIDVAL');

1)P_FLEXDATA : It is a Lexical parameter we are suppose to define to hold the de fault value combnation of all the segment columns. we will use this Parameter in the SELECT clause becuase client may change the structure from the front end any time that time we do not need to chage the re port query every time if we use all the segments concatination. Datatype : Character Width : min 600 Default value : (GCC.SEGMENT1||'\n'||GCC.SEGMENT2||'\n'||GCC.SEGMENT3......) 2)P_STRUCT_NUM : We will capture the KFF structure number here. if KFF is having multiple struc tures default : 101 3)Call the User Exit from Before Report trigger called FND FLEXSQL which will populate the segment columns in the SELECT clause according to that data will be selected from database. Syntax: SRW.REFERENCE(:P_STRUCT_NUM); SRW.USER_EXIT('FND SRWINIT'); SRW.USER_EXIT('FND FLEXSQL CODE = "GL#"

APPL_SHORT_NAME NUM OUTPUT MODE DISPLAY return (TRUE);

= = = = =

"SQLGL" ":P_STRUCT_NUM" ":P_FLEXDATA" "SELECT" "ALL" ');

SRW.Reference: This Will be used to refer the Bind variables or Source columns which we are using in the User Exit.to make sure that we will get the Updated val ue from the Variable and source column. 4)Call another User Exit from the Formula Column called FND FLEXIDVAL SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA); SRW.USER_EXIT('FND FLEXIDVAL CODE APPL_SHORT_NAME NUM DATA VALUE MODE DISPLAY IDISPLAY RETURN(:CF_KFF); Change the Structure Number Dynamically : ========================================== 1)if we know Whcih set of Book user is using then we can find out the structure number(CHART_OF_ACCOUNTS_ID) 2)Goto Before Report Trigger define local variable and retrive the SOB name int o the variable by using Profile API. l_name:=fnd_Profile.Value('GL_SET_OF_BKS_NAME'); 3)Write the following SELECT statement to findout the Structure number based on the SOB name. SELECT CHART_OF_ACCOUNTS_ID INTO :P_STRUCT_NUM FROM GL_SETS_OF_BOOKS WHERE NAME = l_name; SRW.REFERENCE(:P_STRUCT_NUM);

= = = = = = = =

"GL#" "SQLGL" ":P_STRUCT_NUM" ":C_FLEXDATA" ":CF_KFF" "SELECT" "ALL" "ALL" ');

You might also like