Skip to Content

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 01, 2017 at 12:28 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 27, 2017 at 08:33 AM

    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. 
    
    Add comment
    10|10000 characters needed characters exceeded