2 weeks ago
Hello,
I need inputs on below scenario:
I have a changing parameter in the method of a Class which is table <ch_table_name> where I would like to process records in this table. The entries in the table are of same type with different data like, every 19 entries, type of data is same but values will be different.
I would like to delete data in this table if it meets the condition. suppose, continuously for couple of times if condition is satisfied.
I will delete these entries and loop iteration HAS to start from beginning to check data again. Is it possible, if Yes, How can I achieve this?
say,
LOOP <ch_table_name> ASSIGNING <fs_> WHERE <condition>.
IF <cond>.
<logic to check entries and set index lv_start and lv_end to delete data>.
ELSE.
DELETE <ch_table_name> FROM lv_start TO lv_end.
<logic to start iteration from beginning> . ""=> How to handle this?
ENDIF.
ENDLOOP.
Thanks in Advance!!
Request clarification before answering.
Hello,
for me personally it is bad practice to use changing parameters. Better is using importing and returning. Furthermore a delete statement is preferable over looping and deleting entries in the same time. When you use importing and returning parameters you can fill the returning table easy with the needed values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
45 | |
9 | |
8 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.