Professional Documents
Culture Documents
Delete From
Delete From
First declare a work area as the line structure of database table and populate the work area with the specific key that we want to delete from the database table. Then delete the entries from the database table using DELETE statement. The syntax for the DELETE statement is as follows. DELETE <database table> FROM <work area> If the database table contains a line with the same primary key as specified in the work area, the operation is completed successfully and SY-SUBRC is set to 0. Otherwise, the line is not deleted, and SY-SUBRC is set to 4.
DATA: gwa_employee TYPE zemployee. gwa_employee-id gwa_employee-name gwa_employee-place gwa_employee-phone gwa_employee-dept_id = = = = = 6. 'JOSEPH'. 'FRANKFURT'. '7897897890'. 5.
We can also multiple lines from the table using the WHERE clause in the DELETE statement.