FND SRWINIT:
FND SRWINIT sets your profile option values and allows Oracle AOL user exits to detect that they have been called by a Oracle Reports program.[Before Report trigger, P_CONC_REQUEST_ID lexical parameter]. We should always call FND SRWINIT from the Before Report Trigger
SRW.USER_EXIT(‘FND SRWINIT’);
FND SRWEXIT:
FND SRWEXIT ensures that all the memory allocated for Oracle AOL user exits has been freed up properly. [After Report trigger]. You always call FND SRWEXIT from the After Report Trigger
SRW.USER_EXIT(‘FND SRWEXIT’); Note:- Mandatory Parameter with SRWINIT AND SRWEXIT is P_CONC_REQUEST_ID. Datatype Should be Number(15).
FND FORMAT_CURRENCY:
FND FORMAT_CURRENCY is used for MULTIPLE CURRNECY REPORTING (MRC)[formula Column, P_MIN_PRECISION lexical parameter]
SRW.USER_EXIT(‘FND FORMAT_CURRENCY ‘);
FND FORMAT_CURRENCY
CODE=”:column containing currency code”
DISPLAY_WIDTH=”field width for display”
AMOUNT=”:source column name”
DISPLAY=”:display column name”
[MINIMUM_PRECISION=”:P_MIN_PRECISION”] [PRECISION=”{STANDARD|EXTENDED}”] [DISPLAY_SCALING_FACTOR=””:P_SCALING_FACTOR”
DESCRIPTION:
CODE – Specify the column which contains the currency code for the amount. The type of this column is CHARACTER.
DISPLAY_WIDTH – Specify the width of the field in which you display the formatted amount.
AMOUNT – Specify the name of the column which contains the amount retrieved from the database. This amount is of type NUMBER.
DISPLAY – Specify the name of the column into which you want to display the formatted values. The type of this column is CHARACTER.
MINIMUM_PRECISION – Specify the precision to which to align all currencies used in this report region. You specify the MINIMUM_PRECISION token in mixed currency report regions to ensure all currency values align at the radix character for easy readability. Your user can adjust the report by setting an input parameter when submitting the report to specifically tailor the report output to a desired minimum precision or accept the default which is determined from the profile option
CURRENCY:MIXED_PRECISION (Currency: Mixed Currency Precision). Your report submission must pass the value as a report argument. You use P_MIN_PRECISION as the name of this lexical.
PRECISION – If specified as STANDARD, then standard precision is used
DISPLAY_SCALING_FACTOR- Optionally, specify the scaling factor to be applied to the amount in that column. If this token is not specified or is negative no scaling is performed. You use
P_SCALING_FACTOR as the name of this lexical parameter.
FND FLEXSQL:
FND FLEXSQL this API is used for get SELECT/WHERE/HAVING/ORDER BY/GROUP BY from flex field tables. This call changes the value of the lexical parameter P_FLEXDATA at runtime to the SQL fragment that selects all flexfields value data. For example, the parameter changes to (SEGMENT1||’n’||SEGMENT2||’n’||SEGMENT3||’n’||SEGMENT4).
SRW.REFERENCE(:P_STRUCT_NUM);SRW.USER_EXIT(‘FND FLEXSQL CODE=”GL#” NUM=”:P_STRUCT_NUM”APPL_SHORT_NAME=”SQLGL” OUTPUT=”:P_FLEXDATA” MODE=”SELECT” DISPLAY=”ALL”‘);
FND FLEXIDVAL:
FND FLEXIDVAL this API is used for get descriptions from flex fields gets input from FND FLEXSQL.
Call this user exit to populate fields for display. You pass the key flex fields data retrieved by the query into this exit from the formula column. With this exit you display values, descriptions and prompts by passing appropriate token (VALUE/DESCRIPTION/APROMPT/LPROMPT).
it will take inputs from columns of query , the columns are defined by FND FLEXSQL.
SRW.USER_EXIT(‘FND FLEXIDVAL’)
FND FLEXIDVALCODE=”flexfield code”APPL_SHORT_NAME=”application short name”DATA=”:source column name”[NUM=”:structure defining source column/lexical”][DISPLAY=”{ALL|flexfield qualifier|segment number}”][IDISPLAY=”{ALL|flexfield qualifier|segmentnumber}”][SHOWDEPSEG=”{Y | N}”][VALUE=”:output column name”][DESCRIPTION=”:output column name”][APROMPT=”:output column name”][LPROMPT=”:output column name”][PADDED_VALUE=”:output column name”][SECURITY=”:column name”]CODE means Key flexfield code(GL# is for Accounting Flex field, for all other check the table FND_ID_FLEXS)NUM is the structure of the key flex field(Chart of Accounts Number)DATA is where you store the retrieved data (your sql output).