Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

delete datapackage data

Hi all,

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.

*CONTINUE.

*ELSE.

*DELETE DATA_PACKAGE.

*ENDIF.

*ENDLOOP.

Thanks a lot. Points will be rewarded later.

Lin

replied

Hi Lin,

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.

ENDIF.

ENDLOOP.

Regards,

Rohit

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question