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

string to table with seperators

Former Member
0 Likes
1,734

Hello,

I have a string which I want to convert to an table char132. I used FM SOTR_SERV_STRING_TO_TABLE which is working quiet good. But sometimes I get a string with "cl_abap_char_utilities=>NEWLINE" as line break.

Now I could use SPLIT at "cl_abap_char_utilities=>NEWLINE" into table. But I dont know before how the string looks like, sometimes I get a mixture of both.

Is there a function module which does both: Splitting the string after 132 characters or if exists after "cl_abap_char_utilities=>NEWLINE" .

If there is no FM for this, any ideas what to do?

thankx and regards

stefan

3 REPLIES 3
Read only

Former Member
0 Likes
1,174

HI,

try using..

SPLIT V_FILEDATA_OUT AT CL_ABAP_CHAR_UTILITIES=>CR_LF INTO TABLE I_FILE.

Thanks

Mahesh

Read only

Former Member
0 Likes
1,174

Try other FM's :

call function 'SWA_STRING_SPLIT'

EXPORTING

input_string = vs_heat -> this string field

max_component_length = 132

TABLES

string_components = itab_sd. -> Internal table

Thanks

Seshu

Read only

former_member194669
Active Contributor
0 Likes
1,174

Hi,

Try with fm SCMS_FTEXT_TO_TEXT

and also check function group SCMS_CONV

aRs