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

Tab delimited

Former Member
0 Likes
757

HI Group,

I have to upload one '#'delimited file from application server to internal table.I used open dataset command and

read data set to get the file content in one string,after

that when I use the SPLIT command its not spliting the columns at '#'.

I used the following logic

split wa_string at '#' into wa_itab-col0

wa_itab-col1

.....

.....

wa_itab-col64.

Please suggest

HI Group,

I have to upload one '#'delimited file from application server to internal table.I used open dataset command and

read data set to get the file content in one string,after

that when I use the SPLIT command its not spliting the columns at '#'.

I used the following logic

split wa_string at '#' into wa_itab-col0

wa_itab-col1

.....

.....

wa_itab-col64.

Please suggest

5 REPLIES 5
Read only

Former Member
0 Likes
721

Hi,

Instead of # try the following

split wa_string at <b>cl_abap_char_utilities=>Horizontal_tab</b>

into wa_itab-col0

wa_itab-col1.

or

<b>CONSTANTS : c_tab TYPE x VALUE '09'.</b>

split wa_string at <b>C_tab</b>

into wa_itab-col0

wa_itab-col1.

Best regards,

Prashant

Message was edited by: Prashant Patil

Read only

Former Member
0 Likes
721

Hi,

You can use this.

Data: c_carr type cl_abap_char_utilities=>cr_lf.

split wa_string at c_carr1(1) into wa_itab-col0 wa_itab-col1....

Hope this helps.

Please reward points for helpful answers.

Regards,

Sandeep

Read only

0 Likes
721

Hi,

You can use this.

Data: c_carr type cl_abap_char_utilities=>cr_lf.

split wa_string at <b>c_carr+1(1)</b> into wa_itab-col0 wa_itab-col1....

Hope this helps.

Please reward points for helpful answers.

Regards,

Sandeep

Read only

naimesh_patel
Active Contributor
0 Likes
721

Hello,

Use <u>cl_abap_char_utilities=>Horizontal_tab</u> for splitting your string.

Regards,

Naimesh

Read only

Former Member
0 Likes
721

HI

GOOD

SPLIT Split character fields

SPLITsets SY-SUBRC to 0 if size of target fields is sufficient, otherwise 4.

GO THROUGH THIS LINK FOR BETTER UNDERSTANDING OF SPLIT

http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2cff358411d1829f0000e829fbfe/content.htm

GO THOUGH THIS LINK FOR A EXAMPLE USING SPLIT AND YOU CAN IMPLEMENT SIMILARLY IN YOUR REPORT.

http://sap.ionelburlacu.ro/abap/sap2/Beautify_Source_Code.html

THANKS

MRUTYUN