on 12-28-2007 1:36 PM
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.
Hi Shibaji,
If you put a breakpoint on line:
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZVAR_SUPPLY_PLANT'.
Could you check if your internal table I_T_VAR_RANGE contains an entry for VNAM = 'ZVAR_SUPPLY_PLANT'? Because your coding seems to be allright this could be the only reason why the parameter doesn't get populated.
Regards,
John.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shibaji,
Looks like the exit is not being called with correctly populated interface parameter. I_T_VAR_RANGE is an importing parameter and cannot be modified within the exit. If it is supposed to have a value then that should be there at the time of the call to the exit.
You need to check the place where you define the parameter interface for the exit and how it should be populated. There seems to be no problem in the code.
Hope this helps.
Thanks
Sanjeev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.