Previous | Next | Contents | Index | Navigation | Glossary | Library |
Note: Line numbers listed above are for explanation purposes only and do not appear in report output.
SRW.USER_EXIT('FND SRWINIT');
SRW.USER_EXIT('FND SRWEXIT');
Define the following parameters using the Data Model Painter. You use these parameters in the user exit calls and SQL statements.
Lexical Parameters | ||||
---|---|---|---|---|
Name | Data Type | Width | Initial Value | Notes |
P_CONC_REQUEST_ID | Number | 15 | 0 | Always create |
P_FLEXDATA | Character | 600 | Long string | Cumulative width more than expected width required to hold data |
P_STRUCT_NUM | Character | 15 | 101 | Contains structure number |
Table 1 - 70. (Page 1 of 1) |
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"');
Define your report query Q_1:
SELECT &P_FLEXDATA C_FLEXDATA FROM CODE_COMBINATIONS_TABLE WHERE CODE_COMBINATIONS_TABLE.STRUCTURE_DEFINING_COLUMN = &P_STRUCT_NUM
When the report runs, the call to FND FLEXSQL fills in the lexical parameters. As a result the second query would look something like:
SELECT (SEGMENT1||'-'||SEGMENT2||'-'||SEGMENT3||'-'|| SEGMENT4) C_FLEXDATA FROM CODE_COMBINATIONS_TABLE WHERE CODE_COMBINATIONS_TABLE.STRUCTURE_DEFINING_COLUMN = 101
Now create columns C_FLEXFIELD and C_DESC_ALL (and any others your report uses) corresponding to the values and descriptions displayed in the report. They all are in group G_1. Be sure to adjust the column width as appropriate for the value the column holds (such as a prompt, which might be as long as 30 characters).
To retrieve the concatenated flexfield segment values and descriptions, you incorporate the AOL user exits in these columns. In the column definition of C_FLEXFIELD, you incorporate the FND FLEXIDVAL user exit call in the formula field.
SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA); SRW.USER_EXIT('FND FLEXIDVAL CODE="GL#" NUM=":P_STRUCT_NUM" APPL_SHORT_NAME="SQLGL" DATA=":C_FLEXDATA" VALUE=":C_FLEXFIELD" DISPLAY="ALL"'); RETURN(:C_FLEXFIELD);
To populate the concatenated segment descriptions use DESCRIPTION="C_DESC_ALL" instead of VALUE="C_FLEXFIELD" as in the previous step. The user exit call becomes:
SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA); SRW.USER_EXIT('FND FLEXIDVAL CODE="GL#" NUM=":P_STRUCT_NUM" APPL_SHORT_NAME="SQLGL" DATA=":C_FLEXDATA" DESCRIPTION=":C_DESC_ALL" DISPLAY="ALL"'); RETURN(:C_DESC_ALL);
You have created parameters and columns that are containers of all the values to be displayed. Now, in the following steps, you create the layout to display these values on the report.
First choose Default Layout to generate the default layout. Deselect C_FLEXDATA. Specify a "Label" and a reasonable "Width" for the columns you want to display.
Default Layout Column Settings | ||
---|---|---|
Column | Label | Width |
C_FLEXFIELD | Accounting Flexfield | 30 |
C_DESC_ALL | Flexfield Description | 50 |
Table 1 - 71. (Page 1 of 1) |
Oracle Reports takes you to the layout painter. Generate and run the report.
Report Summary | ||
---|---|---|
Lexical Parameters | Columns | FND User Exits |
P_CONC_REQUEST_ID | C_FLEXDATA | FND FLEXIDVAL |
P_FLEXDATA | C_DESC_ALL | FND FLEXSQL |
P_STRUCT_NUM | FND SRWINIT | |
FND SRWEXIT | ||
Table 1 - 72. (Page 1 of 1) |
Previous | Next | Contents | Index | Navigation | Glossary | Library |