on 2010 Dec 27 2:02 PM
Hello,
I try to read a date from the filter of a dtp and propagate this value during the transformation in a routine. this is my code
DATA:
*Date parameter from DTP
i_calday type /BI0/OICALDAY,
i_date(16) type n.
data: t_filter_values type RSBK_TH_RANGE,
l_filter_values like line of t_filter_values.
t_filter_values = p_r_request->GET_TH_RANGE( ).
* get DTP
LOOP AT t_filter_values into l_filter_values.
move l_filter_values-high to i_date.
EXIT.
ENDLOOP.
I_calday = i_date+8(8).
RESULT = I_CALDAY.
but when dubbing my code t_filter_values is always empty and I do not see the selections from the dtp. please do you have an idea what is wrong?
thanks
Please go through this blog...
/people/shlomi.weiss2/blog/2010/11/10/how-to-get-selection-criteria-in-transformations-routines
It States
The information is not available during simulation!
During simulation the system creates a DTP_SIMULATION that does not hold that information.
rgds, Ghuru
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the below code..
data: t_filter_values type RSBK_TH_RANGE,
l_filter_values like line of t_filter_values.
t_filter_values = p_r_request->GET_TH_RANGE( ).
read table t_filter_values into l_filter_values with key
FIELDNM = '<INFOOBJECT TECHNICAL NAME>'.
IF SY-SUBRC = 0.
RESULT = l_filter_values-LOW.
ENDIF.
i tested it from my end and it works perfectly...just change the <INFOOBJECT TECHNICAL NAME> to your corresponding infoobject which you have restricted in DTP....
rgds, Ghuru
Hello
I found the error thanks to Ghuru Balaji S,
now the code is working:
DATA:
t_filter_values type RSBK_TH_RANGE,
i_filter_values like line of t_filter_values ,
i_calday type /BI0/OICALDAY,
i_date(16) type n.
t_filter_values = P_R_REQUEST->get_TH_RANGE( ).
READ TABLE t_filter_values with KEY
FIELDNM = 'DATEFROM' into i_filter_values.
move i_filter_values-high to i_date.
I_calday = i_date+8(8).
RESULT = I_CALDAY.
problem was that I had other selection in the dtp
Edited by: Margit Schütz on Dec 27, 2010 4:08 PM
User | Count |
---|---|
67 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.