REPORT ZSM_LOCATION.
TABLES: zvp_location.
PARAMETERS: p_locatn TYPE zvp_location-location.
DATA: lv_deleted TYPE i.
START-OF-SELECTION.
DELETE FROM zvp_location WHERE location = p_locatn.
lv_deleted = sy-dbcnt.
IF sy-subrc = 0.
COMMIT WORK.
WRITE: / 'Location record deleted successfully.'.
WRITE: / lv_deleted, 'record(s) deleted.'.
ELSE.
WRITE: / 'Error occurred while deleting location record.'.
ENDIF.
0 Comments