Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Splitting a character

Former Member
0 Likes
723

Hi,

I have a source field for text which is of length 2000.

The target table field is a table type(the table type field is of 132) and it is dynamic.i.e a field symbol.

Now I have to split the field 2000 length into lines of 132 and move to the dynamic table.

i.e in this case the total number of records will be 16 in the dynamic table.Later I have to download the table(Which is a field of the main target table).

Please help how to do.

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
689

check this logic.


len = strlen( lv_string ).
lv_offset_mx = 131.
lv_offset_mn = 0.

div = CEIL(len / 132).

do div times.
clear wa.
wa-line = lv_string+lv_offset_mn(lv_offset_mx).
append wa to itab.
lv_offset_mn = 131.
enddo.

5 REPLIES 5
Read only

Former Member
0 Likes
689

Hello

FM RKD_WORD_WRAP with outputlen = 132

Read only

0 Likes
689

Please not that I am working in CRM environment and few FM like 'RKD_WORD_WRAP ' does not exist.

Read only

0 Likes
689

check [this web log |http://wiki.sdn.sap.com/wiki/x/S4adAw]

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
690

check this logic.


len = strlen( lv_string ).
lv_offset_mx = 131.
lv_offset_mn = 0.

div = CEIL(len / 132).

do div times.
clear wa.
wa-line = lv_string+lv_offset_mn(lv_offset_mx).
append wa to itab.
lv_offset_mn = 131.
enddo.

Read only

0 Likes
689

Hi ther is a small change

lv_offset_mn = lv_offset_mn + 131.