Hi Experts,
I am trying to implemet a BADI and below is the code in the implementation method.
could you please let me know what is wrong in this code?
i am getting errors like Tables cannot be used in BADIs etc....could you correct me.
Appreciate your help
METHOD xyz~t.
tables : x,y.
types: begin of l_tab1,
whno type x-whno,
cnter type x-cnter,
end of l_tab1.
types: begin of l_tab2,
whno type y-whno,
trtype type y-trtype,
end of l_tab2.
DATA: ITAB1 type table of l_tab1.
DATA: ITAB2 TYPE TABLE OF l_tab2.
SELECT x-whno, x-cnter FROM x INTO CORRESPONDING FIELDS OF TABLE itab1
WHERE x-LGTYP = z-WSTYP and z-whno = z-whno.
IF sy-subrc EQ 0.
REFRESH itab2.
SELECT whno, TRTYPe FROM y
INTO CORRESPONDING FIELDS OF TABLE itab2
FOR ALL ENTRIES IN itab1
WHERE y-cnter = itab1-cnter and y-whno = itab1-whno.
IF sy-subrc EQ 0.
z-mv = 0.
ENDIF.
ENDIF.
ENDMETHOD.
thanks