07-18-2006 3:41 AM
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
07-18-2006 3:50 AM
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
07-18-2006 4:56 AM
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
07-18-2006 4:58 AM
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
07-18-2006 4:58 AM
Hello,
Use <u>cl_abap_char_utilities=>Horizontal_tab</u> for splitting your string.
Regards,
Naimesh
07-18-2006 5:07 AM
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