7 Oct 2008

ABAP routine in infopackage for Multiple Selections

Requirement : 0plant should be restricted in the infopackage level using routine picking only selective plants ( say under some country or region )
Following is the code, i tried and working fine.
Solution
data: l_idx like sy-tabix.
DATA : IT_PLANT LIKE TABLE OF /BI0/PPLANT.
data : it_plant_wa type /BI0/PPLANT.

read table l_t_range with key
fieldname = 'PLANT'.
l_idx = sy-tabix.

SELECT * FROM /BI0/PPLANT INTO TABLE IT_PLANT WHERE COUNTRY = 'BE'.

LOOP AT IT_PLANT INTO IT_PLANT_WA.
l_t_range-low = IT_PLANT_WA-PLANT.
l_t_range-SIGN = 'I'.
l_t_range-OPTION = 'EQ'.
append l_t_range.
ENDLOOP.

modify l_t_range index l_idx.
p_subrc = 0.

No comments: