cancel
Showing results for 
Search instead for 
Did you mean: 

Customer exit on variable

Sujai
Participant
0 Kudos

Hi

i am trying to write a customer exit on a variable, but the problem is that i have to get the values of the variable at runtime and do the processing. How can i get the values of the variable in the code?

thanx

sujai

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

You should understand the concept of <b>I_STEP</b> in the coding .

Go thru :

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/59069d90-0201-0010-fd81-d5e...

Look at below code :

-


*

User Exit: ZVCCYTDX

  • Input: ZVCPAXRG

  • Output: Jan of Accident Year Range

  • Logic Description:

----


WHEN 'ZVCCYTDX'.

<u><b>if i_step = 2.</b></u>

<b>clear loc_var_range.

loop at i_t_var_range into loc_var_range WHERE vnam = 'ZVCPAXRG'.</b>

    • if sy-subrc = 0.

curr_year = loc_var_range-low(4).

concatenate curr_year '001' into jan_accidentyear.

CLEAR L_S_RANGE.

L_S_RANGE-LOW = jan_accidentyear.

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'EQ'.

append l_s_range to e_t_range.

exit.

**endif.

endloop.

endif.

<b>** Code calculates YTD values from user entered Fiscal Period.</b>

Message was edited by:

Jr Roberto

Sujai
Participant
0 Kudos

Hi Roberto,

thankyou for the reply. I have already tried with I_STEP but it didnt work. My requirement is something like this.

The query has just one field (0fiscper) in the columns section and at runtime, a caluculation is done on the fiscper and it displays the next fiscal months in 10 columns. Now i have to convert these fiscal months into calendar months.

With the code that i have now it changes only for the first column and not for the others. I need to find a way so i can get the values in the columns which are like fiscper1, fiscper2, ..... so on, and get the calendar months for these columns.

when i give I_STEP = 2, the value of the first column is repeated in all other columns. I_STEP 1 and 3 displays the value in the first column and shows the variable name in the other columns.

sujai

Message was edited by:

Sujai S

Former Member
0 Kudos

code in query exit in I_STEP 3