cancel
Showing results for 
Search instead for 
Did you mean: 

How can we populate a customer exit variable with already populated customer exit variable?

0 Kudos

I have 4 variables in my query.

ZINPUT_VAR

ZRANGE_VAR

ZDATE1_CUST_EXIT

ZDATE2_CUST_EXIT

first two are user input variables which will take a single date and a range

second & third are customer exit variables which takes a date range based on the single input date.

Eg: if user input date is 01.04.2015 & range = 2, then i have written code to populate ZDATE1_CUST_EXIT as 01.04.2015 to 31.05.2015. This code works fine & value is getting populate.

Now the third variable also needs the same value, except that this variable is created on different InfoObject.

How can i read the value present in ZDATE1_CUST_EXIT & assign it to ZDATE2_CUST_EXIT? Please guide me.

Accepted Solutions (1)

Accepted Solutions (1)

Loed
Active Contributor
0 Kudos

Hi,

Why don't you copy your code in ZDATE1_CUST_EXIT and apply it to ZDATE2_CUST_EXIT? Just replace the WHERE VNAM part with your ZDATE2_CUST_EXIT variable.

LOOPAT i_t_var_range INTO loc_var_range WHERE vnam ='ZDATE2_CUST_EXIT'.

Regards,

Loed

Answers (1)

Answers (1)

kohesco
Active Contributor
0 Kudos

hi,

if you set as I_Step=2 you can look up the initial values and pass them through

example code:

CASE I_vnam.
   WHEN 'VARIABLE_TECH_NAME'. 
	IF i_step = 2. 
		LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'OTHER_VARIABLE'. 
			CLEAR: l_s_range. 
                        l_s_range-low = loc_var_range-low. 
                        l_s_range-opt = 'EQ'. 
                        APPEND l_s_range TO e_t_range. 
                 ENDLOOP. 
         ENDIF. 
ENDCASE.