‎2007 May 11 12:20 PM
hi all,
i do the following:
i have concatenated a bunch of fields into s1 separated by "#".
then i split it at "#" into itab.
now, in some of the itabs i have values that can be like
"Max Müller Str." and this is what i do now:
i do split itab into itab2 at space.
So i have kind of nested loop and my question is, how could i have that more efficient or faster done ?
is there a way of removing empty lines from itab ?
points will surely be awarded, thank you!
‎2007 May 11 12:27 PM
Hi!
DELETE itab WHERE field = ''.
or
DELETE itab WHERE field = SPACE.
Regards
Tamá
‎2007 May 11 12:27 PM
Hi!
DELETE itab WHERE field = ''.
or
DELETE itab WHERE field = SPACE.
Regards
Tamá
‎2007 May 11 12:30 PM
Hi Tamas,
i tried that, but ( what i forgot to mention is ) that this itab and itab2 are string - itabs, i defined them as
itab LIKE STANDARD TABLE OF s1 WITH HEADER LINE,
itab2 LIKE STANDARD TABLE OF s1 WITH HEADER LINE.
how can i then access them ?
‎2007 May 11 1:15 PM
Hi,
If u are declaring itabs with header lines then Try this codes:
loop at itab.
if itab-fieldname eq space.
delete itab.
endif.
endloop.
"OR simple use following command
DELETE ITAB WHERE FIELDNAME IS INITIAL.
This statement will delete all occureances of itab where fieldname is empty.
Jogdand M B
‎2007 May 11 1:34 PM
Hi Clemens,
If what you want is to remove empty lines from an itab, you can read previous replies (DELETE ... WHERE f IS INITIAL).
But I understand that your empty lines will look like this:
#########
Being as much "#" as fields you have for each line. So, if the amount of fields is constant, you can compare S1 against "#########" and voilá, you have your empty lines without splitting anything.
Good luck!
Fernando