Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Delete records without loop comparing two internal table...

Hi Experts,

I have written two select statement shown below. In it_vbap the whole data is comming apart from auart = 'ZBEO' or auart = 'ZBOR' or auart = 'ZOLD' or auart = 'ZOEO' . In it_vbak it is comming O.K. I want to delete records apart from ZBEO,ZBOR,ZOLD, & ZBEO comparing from it_vbap without loop comparing it_vbap and it_vbak. How to write ? Pl. help me.

SELECT * FROM vbap client specified

INTO CORRESPONDING FIELDS OF TABLE it_vbap

WHERE mandt = sy-mandt and

erdat IN dt1 AND

matnr IN matnr1 AND

gsber = 'HIP' AND

vstel = 'BSP'.

SELECT * FROM vbak INTO CORRESPONDING FIELDS OF TABLE it_vbak

FOR ALL ENTRIES IN it_vbap WHERE vbeln = it_vbap-vbeln

and ( auart = 'ZBEO' or auart = 'ZBOR'

or auart = 'ZOLD' or auart = 'ZOEO' ) .

Yusuf

Former Member
Not what you were looking for? View more on this topic or Ask a question