‎2019 Jan 23 2:18 PM
Hello,
I want to split my code into a workarea and append this to a an internal table for a later perform.
But sometimes the text contains more than 3 numbers for example 3;5;3;6;2;5 but its always 3,6,9,12... number. How can I solve the problem that I want to loop 3 times, then the next 3 numbers and so on?
DATA: text(100) type c,
it_1 TYPE STANDART TABLE LIKE text,
it_2 TYPE STANDART TABLE LIKE text,
it_3 TYPE STANDART TABLE LIKE text,
string(100) TYPE c.
text = '123;2;2'.
SPLIT text AT ';' INTO wa_1-c1 wa_1-c2 wa_1-c3.
APPEND wa_1-c1 to it_1.
APPEND wa_1-c2 to it_2.
APPEND wa_1-c3 to it_3.
LOOP at it_1 INTO string.
PERFORM task using string.
ENDLOOP.
‎2019 Jan 23 2:49 PM
F1 on SPLIT command 🙂
SPLIT text AT ';' INTO TABLE ...
https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abapsplit.htm
‎2019 Jan 24 8:11 PM
Probably the OP is not pleased with your answer as it's now posted in stackoverflow: https://stackoverflow.com/questions/54353779/how-do-i-split-multiple-times-in-abap