cancel
Showing results for 
Search instead for 
Did you mean: 

Customer Exit Variable

Former Member
0 Kudos

I defined this code in order to fill VALID_TO variable with 0P_KEYDT but it doesn't work. when I execute the query, it says "specify a value for variable". what is wrong? please help??

WHEN 'VALID_TO'.

data: yy(4).

IF i_step = 2.

LOOP AT i_t_var_range INTO loc_var_range

WHERE iobjnm = '0P_KEYDT'.

CLEAR l_s_range.

l_s_range-low = loc_var_range-low.

l_s_range-high = loc_var_range-high.

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

APPEND l_s_range TO e_t_range.

endloop.

ENDIF.

Accepted Solutions (1)

Accepted Solutions (1)

former_member205352
Active Contributor
0 Kudos
WHEN 'VALID_TO'.
data: yy(4).
IF i_step = 2.
LOOP AT i_t_var_range INTO loc_var_range
WHERE iobjnm = '0P_KEYDT'.
CLEAR l_s_range.
l_s_range-low = loc_var_range-low.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
endloop.
ENDIF.

Can you try the above code ?

loc_var_range-high is available from variables which are intervals and not single values.

Former Member
0 Kudos

Thanks, but when I change the default date at 0P_KEYDT, VALID_TO doesn't change.

former_member205352
Active Contributor
0 Kudos

What kind of a variable is 'VALID_TO' ?

Single value , interval etc ?

If its single value then it should work, can you try putting a break point to your code and executing query using RSRT transaction and see how the values are getting manipulated ?

Former Member
0 Kudos

It takes single value but I defined <= at query.

former_member205352
Active Contributor
0 Kudos

Can you try this, I am more used to "READ TABLE"

(or

in your code use VNAM instead of iobjnm.)


WHEN 'VALID_TO'.
data: yy(4).
IF i_step = 2.
READ TABLE I_T_VAR_RANGE INTO loc_var_range WITH KEY VNAM = '0P_KEYDT'.

IF SY-SUBRC = 0.
CLEAR l_s_range.
l_s_range-low = loc_var_range-low.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
ENDIF.

ENDIF.

P.S: I assume your loc_var_range is defined as below

DATA: loc_var_range TYPE RRRANGEEXIT.

Former Member
0 Kudos

definition is

DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.

I changed code but result is same. should I use replacement path?

former_member205352
Active Contributor
0 Kudos

Your VALID_TO should be of type "Customer Exit" & 'Ready for Input" should not be ticked.

Why not try debug the code ?

Former Member
0 Kudos

thanks Praveen but when I debug, I see different values for both of them. should I change i_step = 2 statement?

former_member205352
Active Contributor
0 Kudos

i_step = 2 is fine.

Can you give an example of values of

loc_var_range-low =

and l_s_range-low =

When you debug ?

Former Member
0 Kudos

I debugged rsrt-> execute debug. I couldn't find loc_var_range-low and l_s_range-low in abap. when I look key figure definition, it shows different dates. how can I look these values?

former_member205352
Active Contributor
0 Kudos

Set a break point in your ABAP code and just run your query using VALID_TO and 0P_KEYDT variable via RSRT transaction.

Also, How have you defined VALID_TO ? What is the reference char you have used ?

when I look key figure definition, it shows different dates.

Where are you doing this ?

Query designer ? If so how ?

Former Member
0 Kudos

I defined variable at query designer.

processing by: customer exit

referance charactheristic: valid to (my cube has this value)

variable is: mandatory

variable is ready for input

I'm looking variable values via rsrt ->execute. at the key figure definition button, I can see key figure's value detail.

former_member205352
Active Contributor
0 Kudos

>

> referance charactheristic: valid to (my cube has this value)

> variable is ready for input

>

> I'm looking variable values via rsrt ->execute. at the key figure definition button, I can see key figure's value detail.

VALID_TO infoobject is referencing 0DATE ?

Make the variable "Not ready for input", so uncheck the check box.

First set the break point in the code, later execute query in RSRT, once you enter variable values and execute it should taken you to the break point this is where you can see the values.

Search some threads on debugging customer exit using RSRT.

Former Member
0 Kudos

Thanks a lot Praveen. it's working.

Former Member
0 Kudos

Exactly what I wnted to explain in my post from 12.12 PM.

I_STEp = 2 is exclusively porcessed with these settings of variable.

Joe

Former Member
0 Kudos

thanks j.f.b for your attention. I can assing just one solved point. thanks again. I defined very helpful answer for your participation.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Did you check this settings for varaible ''VALID_TO'?

Variable should not be marked as u201Cready for inputu201D and should be set to u201Cmandatory variable entry".

Regards

Joe

Edited by: J.F.B. on Aug 24, 2009 12:12 PM