Skip to Content
0
Former Member
Jan 30, 2007 at 03:29 PM

for all entries

26 Views

Hi all ,

I have two tables mara and ztable . i need to compare ztable-zwevtbky+0(18).

this is my code.

SELECT * FROM mara INTO TABLE t_mara WHERE spart = p_spart.

IF p_spart IS NOT INITIAL.

SELECT * FROM zwplcsctbud INTO TABLE t_zwplcsctbud_i

WHERE zwpldt LT sy-datum

OR ( zwpldt EQ sy-datum

AND zwpltm LE sy-uzeit ).

LOOP AT t_zwplcsctbud_i .

READ TABLE t_mara WITH KEY MATNR = t_zwplcsctbud_i-zwevtbky+0(18).

IF sy-subrc <> 0.

DELETE t_zwplcsctbud_i .

CLEAR t_zwplcsctbud_i.

ENDIF.

ENDLOOP.

*ELSEIF p_spart IS INITIAL..

ELSE.

  • Extracting data from ZWPLCSCTBUD(PLC Scheduled Table Update)

SELECT * FROM zwplcsctbud INTO TABLE t_zwplcsctbud_i

WHERE zwpldt LT sy-datum

OR ( zwpldt EQ sy-datum

AND zwpltm LE sy-uzeit ).

ENDIF.