Skip to Content
author's profile photo Former Member
Former Member

BW exit problem

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 28, 2007 at 02:36 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 28, 2007 at 03:52 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.