Skip to Content

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

delete records from z-table

Hi ,

delete statement is not working .

i am using the logic like this .

loop at itab into work_area.

delete z-table from work_area .

endloop.

but i am unable to delete the records from the z-table .

could you please look into this.

Thanks,

kumar.

Tags:
Former Member
Former Member replied
Delete Z-TABLE from TABLE itab.

==================================================

PARAMETERS p_carrid TYPE sflight-carrid. 

TYPES: BEGIN OF sflight_key, 
         mandt  TYPE sflight-mandt, 
         carrid TYPE sflight-carrid, 
         connid TYPE sflight-connid, 
         fldate TYPE sflight-fldate, 
      END OF sflight_key. 

DATA sflight_key_tab TYPE TABLE OF sflight_key. 

SELECT carrid connid fldate 
       FROM sflight 
       INTO CORRESPONDING FIELDS OF TABLE sflight_key_tab 
       WHERE carrid = p_carrid AND 
             fldate = sy-datum AND 
             seatsocc = 0. 

DELETE sflight FROM TABLE sflight_key_tab.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question