Skip to Content
0
Former Member
Dec 28, 2007 at 01:36 PM

BW exit problem

89 Views

Hi Experts,

I was trying to make a exit in BW but the code is not working properly. The problem is ...it is not populating ZVAR_SUPPLY_PLANT into I_T_VAR_RANGE , which is a SAP defined parameter.As because of that the code fails.How to make the value to be populated in I_T_VAR_RANGE ?

the code is:

When 'ZVAR_SUPPLY_PLANT'.

IF I_STEP = 1.

REFRESH lt_plant.

SELECT PLANT INTO CORRESPONDING FIELDS OF TABLE lt_plant

FROM /BI0/PPLANT

WHERE OBJVERS = 'A'

AND PLANT LIKE '%P'.

  • Process all selection for variable

LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZVAR_SUPPLY_PLANT'.

If SY-SUBRC <> 0.

  • Process all plant

LOOP AT lt_plant INTO ls_plant.

  • Fill LOW and HIGH,

IF ls_plant-high IS INITIAL.

ls_plant-high = ls_plant-low.

ENDIF.

CLEAR l_s_range.

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

l_s_range-low = ls_plant-plant.

APPEND L_S_RANGE TO E_T_RANGE.

ENDLOOP. " lt_plant

ENDIF.

ENDLOOP. " i_t_var_range

EXIT.

ENDIF.

Please help me on this.

Thanks,

Shibaji.