Skip to Content
0
Former Member
Dec 04, 2006 at 09:12 AM

How to delete the records from database table without using work area

20 Views

Hi all,

The purpose of the down program is to delete the entire contents from all the tables. The deletion of the table should be in sorted manner. Is there any other way to write the code more efficiently,

TABLES: ZFFMCTL_AP, ZFFMHDR_AP, ZFFM_CHANGE_LOG, ZFFMDTL_AR, ZFFMHDR_AR, ZFFMDTL_JV, ZFFMHDR_JV, ZFFMDTL_SKF,ZFFMHDR_SKF,ZFINVOICE_DETAIL, ZFFMMASTER, ZFFMLOGREAD_CLUS, ZFFMCTL.

DELETE ZFFMCTL_AP.

IF SY-SUBRC = 0.

DELETE ZFFMMHDR_AP.

IF SY-SUBRC = 0.

DELETE ZFFM_CHANGE_LOG.

IF SY-SUBRC = 0.

DELETE ZFFMDTL_AR.

IF SY-SUBRC = 0.

DELETE ZFFMHDR_AR.

IF SY-SUBRC = 0.

DELETE ZFFMDTL_JV.

IF SY-SUBRC = 0.

DELETE ZFFMHDR_JV.

IF SY-SUBRC = 0.

DELETE ZFFMDTL_SKF.

IF SY-SUBRC = 0.

DELETE ZFFMHDR_SKF.

IF SY-SUBRC = 0.

DELETE ZFINVOICE_DETAIL.

IF SY-SUBRC = 0.

DELETE ZFFMMASTER.

IF SY-SUBRC = 0.

DELETE ZFFMLOGREAD_CLUS.

IF SY-SUBRC = 0.

DELETE ZFFMCTL.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

Waiting for response,

Thanks in advance

John