Sunteți pe pagina 1din 4

If any one want to use Flexfield in report, there is minimum steps you have to follow to

make things Functional. These are the standard steps as per AOL guide.
Step 1 Define your Before Report Trigger
ere you suppose to call F!" #$%I!IT from the &efore $eport Trigger like '
#$%.(#)$*)+IT,-F!" #$%I!IT-./
This user exit sets up information for use 0y flexfields, user profiles, the concurrent
manager, and other Oracle Applications features as discussed in one of previous post.
Step 2 Define your After Report Trigger
!ext, is you need to call F!" #$%)+IT from the After $eport Trigger like '
#$%.(#)$*)+IT,-F!" #$%)+IT-./
Step 3 Define your required parameters
In this step you need to define the parameters your report needs 0y using the "ata 1odel
2ainter. 3ou use these parameters in the user exit calls and #4L statements.
Lexical 2arameters
2*5O!5*$)4()#T*I"
2*FL)+"ATA
3ou must always create the 2*5O!5*$)4()#T*I" lexical parameter. 6F!"
#$%I!IT6 uses this parameter to retrieve information a0out the concurrent re7uest that
started this report.
The 2*FL)+"ATA parameter holds the #)L)5T fragment of the #4L 7uery. The initial
value is used to check the validity of a 7uery containing this parameter and to determine
the width of the column as specified 0y the column alias. Its initial value is some string
that contains columns with a cumulative width more than the expected width re7uired to
hold the data. 1ake sure the width of this column is sufficient. If there are total 89
segments in the ta0le then the safest initial value will 0e'
,#):1)!T;<<-=n-<<#):1)!T><<-=n-<<#):1)!T8 ... #):1)!T89.
3ou determine the width 0y determining the length of that string. That length is roughly
the num0er of characters in the ta0le alias plus the length of the column name, times the
num0er of segments your code com0inations ta0le contains, times the num0er of
structures you expect, plus more for delimiter characters as shown in the string a0ove.
Step 4 Define your rest other parameters
3ou define the rest of the parameters your report needs 0y using the "ata 1odel 2ainter.
3ou use these parameters in the user exit calls and #4L statements.
Step 5 Call !D "#$S%" from your Before Report Trigger to populate
&'"#$DATA
!ext, given that you want to display flexfield information like concatenated values and
descriptions, and arrange them in order, you make one call to F!" FL)+#4L from the
&efore $eport Trigger specifying the lexical parameters. This call changes the value of
the lexical parameter 2*FL)+"ATA at runtime to the #4L fragment that selects all
flexfields value data. For example, the parameter changes to ,#):1)!T;<<-=n-<<
#):1)!T><<-=n-<<#):1)!T8<<-=n-<<#):1)!T?..
%hen you incorporate this lexical parameter into the #)L)5T clause of a 7uery, it
ena0les the 7uery to return the concatenated segment values that are needed as input to
other AOL user exits. These exits then retrieve the actual flexfield information for display
purposes.
ere is an example F!" FL)+#4L call. !otice that the arguments are very similar to
other flexfield routine calls/ 5O")@ and !(1@ designate the key flexfield and its
structure, respectively. For a report on a different key flexfield ,such as the #ystem Items
flexfield., you would use a different 5O") and !(1.
#$%.$)F)$)!5),'2*#T$(5T*!(1./
#$%.(#)$*)+IT,-F!" FL)+#4L
5O")@6:LA6
!(1@6'2*#T$(5T*!(16
A22L*#O$T*!A1)@6#4L:L6
O(T2(T@6'2*FL)+"ATA6
1O")@6#)L)5T6
"I#2LA3@6ALL6-./
3ou should always reference any source columnBparameter that is used as a source
for data retrieval in the user exit. This guarantees that this columnBparameter will contain
the latest value and is achieved 0y 6#$%.$)F)$)!5)6 call as shown a0ove.
Step ( Call !D "#$S%" from your Before Report Trigger to populate other
parameters
%hat you suppose ti do here is Cust need to call F!" FL)+#4L once for every lexical
parameter.
Step ) Define your report query or queries
"efine your report 7uery 4*;'
#)L)5T D2*FL)+"ATA 5*FL)+"ATA
F$O1 5O")*5O1&I!ATIO!#*TA&L)
%)$) 5O")*5O1&I!ATIO!#*TA&L).#T$(5T($)*")FI!I!:*5OL(1!
@ D2*#T$(5T*!(1
The 7uery fetches the data re7uired to 0e used as input for the FL)+I"EAL user exit
later.
%hen the report runs, the call to F!" FL)+#4L fills in the lexical parameters. As a
result the second 7uery would look something like'
#)L)5T ,#):1)!T;<<-F-<<#):1)!T><<-F-<<#):1)!T8<<-F-<<
#):1)!T?. 5*FL)+"ATA
F$O1 5O")*5O1&I!ATIO!#*TA&L)
%)$) 5O")*5O1&I!ATIO!#*TA&L).#T$(5T($)*")FI!I!:*5OL(1! @
;9;G BFO!T H
Step * Create formula +olumns
!ow create columns 5*FL)+FI)L" and 5*")#5*ALL ,and any others your report
uses. corresponding to the values and descriptions displayed in the report. They all are in
group :*;.
Step , &opulate segment -alues formula +olumn
!ow you need to retrieve the concatenated flexfield segment values and description
which you incorporate the flexfields user exits in these columns. In the column definition
of 5*FL)+FI)L", you incorporate the F!" FL)+I"EAL user exit call in the formula
field. 3ou pass the concatenated segments along with other information to the user exit,
and the user exit populates the concatenated values in this column as specified 0y the
EAL() token. A typical call to populate segment values in this column looks as follows'
#$%.$)F)$)!5),'2*#T$(5T*!(1./
#$%.$)F)$)!5),'5*FL)+"ATA./
#$%.(#)$*)+IT,-F!" FL)+I"EAL
5O")@6:LA6
!(1@6'2*#T$(5T*!(16
A22L*#O$T*!A1)@6#4L:L6
"ATA@6'5*FL)+"ATA6
EAL()@6'5*FL)+FI)L"6
"I#2LA3@6ALL6-./
$)T($!,'5*FL)+FI)L"./
$efer this how to ena0le user exits in reports.
Step 1. &opulate segment des+riptions/ 0STR1!23
To populate the segment description use ")#5$I2TIO!@65*")#5*ALL6 instead of
EAL()@65*FL)+FI)L"6 as in the previous call. The user exit call 0ecomes'
#$%.$)F)$)!5),'2*#T$(5T*!(1./
#$%.$)F)$)!5),'5*FL)+"ATA./
#$%.(#)$*)+IT,-F!" FL)+I"EAL
5O")@6:LA6
!(1@6'2*#T$(5T*!(16
A22L*#O$T*!A1)@6#4L:L6
"ATA@6'5*FL)+"ATA6
")#5$I2TIO!@6'5*")#5*ALL6
"I#2LA3@6ALL6-./
$)T($!,'5*")#5*ALL./
3ou have created parameters and columns that are containers of all the values to 0e
displayed. !ow, in the following steps, you create the layout to display these values on
the report.
Step 11 Create your default report layout
First choose "efault Layout to generate the default layout. "eselect 5*FL)+"ATA.
#pecify a 6La0el6 and a reasona0le 6%idth6 for the columns you want to display.

S-ar putea să vă placă și