Application Development 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: 

LineFeed Conversion

Former Member
0 Kudos

Hello Everybody,

I have a requirement to read the Mail body as soon it comes into SAP.

For that I have set up the exits in SO50 and its working fine.

When I look at the mail content , I see that the Mail lines are separated with #.

When I am trying to split at # , the character is not recognised in SAP.

Can someone tell me how can recognise the Linefeeds from the mail body so that I split the data

accordingly.

Please help me on this.

Thanks,

Sneha Sing.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

try splitting at cl_abap_char_utilities=>horizontal_tab. or vertical_tab or CR_LF (for line feed)

like

split x1 at cl_abap_char_utilities=>CR_LF into ab cd ef. try other attributes(hor tab, vrt tab as well)..

http://help.sap.com/saphelp_nw04s/helpdata/en/79/c554d9b3dc11d5993800508b6b8b11/frameset.htm

Edited by: Soumyaprakash Mishra on Oct 29, 2009 1:29 AM

4 REPLIES 4

Former Member
0 Kudos

try splitting at cl_abap_char_utilities=>horizontal_tab. or vertical_tab or CR_LF (for line feed)

like

split x1 at cl_abap_char_utilities=>CR_LF into ab cd ef. try other attributes(hor tab, vrt tab as well)..

http://help.sap.com/saphelp_nw04s/helpdata/en/79/c554d9b3dc11d5993800508b6b8b11/frameset.htm

Edited by: Soumyaprakash Mishra on Oct 29, 2009 1:29 AM

former_member191735
Active Contributor
0 Kudos

>

> I have a requirement to read the Mail body as soon it comes into SAP.

If you just want to read it.... why do you need to split. I think, when the mail comes into SAP the mail content will be in internal table....

The table is type of SOLI where you have only field which is line. The other one you see is not from the table but it is SAP internal.

You can read it. If you want to alter it you would have to copy it into internal table. (not sure even if it works).

>

> For that I have set up the exits in SO50 and its working fine.

> When I look at the mail content , I see that the Mail lines are separated with #.

> When I am trying to split at # , the character is not recognised in SAP.

>

Try to find some function modules for read text or similar to this. You may have to pass internal table into the FM.... Also check for any convertion function modules

0 Kudos

I am already reading it from SOLI.

I am looking to split the line at the Linefeed because the mail contains valid data.

I need to do some actions based on the data from the mail.

0 Kudos

declare a constant like:

data: lv_feed type c value cl_abap_char_utilities=>CR_LF.

now use:
do.
split <your email text > into line1 <your email text >
 if sy-subrc ne 0.
exit.
endif.
 append table.
enddo.