on 04-06-2006 8:49 PM
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
Try this....
DATA: data_pkg_idx like sy-tabix.
LOOP at DATA_PACKAGE.
data_pkg_idx = sy-tabix.
IF <your condition>
CONTINUE.
ELSE.
DELETE DATA_PACKAGE index data_pkg_idx.
ENDIF.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.