ABAP – Deleting from the a table

Deleting from the table for example T777F depending on some condition

 

TABLES:T777F.

DATA: IT_T777F TYPE STANDARD TABLE OF T777F.

SELECT * FROM T777F INTO TABLE IT_T777F WHERE FCODE = <value>.

IF SY-SUBRC EQ 0.
  DELETE  T777F FROM TABLE IT_T777F.
  COMMIT WORK.
ENDIF.

IF SY-SUBRC EQ 0.
  WRITE: ‘RECORDS DELETED SUCCESSFULLY’.
ENDIF.

0 Comments

Leave A Reply