Skip to Content
0
Former Member
Jul 18, 2008 at 07:03 AM

Formula Variable

27 Views

Hi Experts,

We need some help with cmod code - we are in a situation where we want to assign a fixed value to a formula variable based on the user input in the report.

Suppose user input is Jan2007 (001.2007) then Formula variable (FVAR) should be assigned a fixed value of 999. We have created a ABAP code to implement this but it seems it does function as per the expectation.

User input variable name is ZVFISPE and formula variable name is FVAR (Customer exit formula variable)

The code is given below

CASE i_vnam.

WHEN 'FVAR'. "Formula Var with Customer exit

IF I_STEP = 2 . "After popup

LOOP AT I_T_VAR_RANGE INTO loc_var_range WHERE VNAM = 'ZVFISPE'.

IF loc_var_range-low = '001.2007' .

ZL_S_RANGE-LOW = '999'.

APPEND ZL_S_RANGE TO E_T_RANGE.

ENDIF.

ENDLOOP.

ENDIF.

ENDCASE

Can anyone pls help.

Regards,

Dipali