‎2007 Jul 19 11:50 AM
‎2007 Jul 19 11:53 AM
Hi,
I think you can do this way;
Do...
read dataset....
enddo.
Hope it works,
Thanks,
Sandeep.
‎2007 Jul 19 11:54 AM
when you talk about loop....a loop is meant to traverse multiple entries....for example in a table...we can loop on rows...
what exactly do you mean by looping on a string array (As such there are no arrays in ABAP).
if you have multiple strings, you can put each string in an internal table and then loop through this internal table using the LOOP AT....ENDLOOP statements.
in case of a single string, you can traverse it using offsets
eg : STR+0(10) ---> which means start from position 0 and read 10 characters.
please clarify a bit more on your requirement.
‎2007 Jul 19 12:01 PM
DATA : TEXT(50) VALUE 'TEST STRING',
LEN TYPE I,
POS TYPE I,
V_CHAR.
COMPUTE LEN = STRLEN( TEXT ).
DO LEN TIMES.
V_CHAR = TEXT+POS(1).
POS = POS + 1.
ENDDO.
HERE V-CHAR CONTAINS THE LETTRS OF THE STRING FOR EACH LOOP PASS.
REGARDS
SHIBA DUTTA
‎2007 Jul 19 12:08 PM
i mean there's a inbulit data type sesf_string_tab which holds a list of strings and i want to loop through it
‎2007 Jul 19 12:18 PM
declare an internal table of type sesf_string_tab.
data itab type sesf_string_tab with header line.
loop at itab.
write:/ itab-string. "If string is a field in the structure sesf_string_tab
endloop.