delete datapackage data
Anyone can help me check what's wrong with the following code? I am trying to delete records from ODS datapackage. Those records are not in an internal table.
*LOOP AT DATA_PACKAGE ASSIGNING <fs>.
*READ TABLE INTERNALTABLE ASSIGNING <fsit>.
*IF <fs>-/BIC/id = <fsit>-id AND
<fs>-/BIC/password = <fsit>-password.
Thanks a lot. Points will be rewarded later.
Rohit Bhargava replied
It depends on the size of the internal table. The code you should write:
DATA: v_indx like sy-tabix.
LOOP at DATA_PACKAGE.
v_indx = sy-tabix.
Read table internaltable where id = DATA_PACKAGE-/BIC/id and password = DATA_PACKAGE-/BIC/password .
If sy-subrc ne 0.
DELETE DATA_PACKAGE index v_indx.