‎2007 Aug 10 8:06 AM
Hi all,
Requirement is to read a file from the application server and process it.
The file has the TAB spacings and seen from AL11 shows # for tabs.
I have read the line in a character of 1024. Now on splitting at delimiter '/h/' as seen in debug it does not split the line as reqired.
How to split the columns with tab space.
appreciate your inputs.
Thanks,
Stock
‎2007 Aug 10 8:08 AM
Hi,
1. SPLIT f AT g INTO h1 ... hn.
e.g.
DATA: ONE(10) TYPE C,
TWO(10) TYPE C,
SPLIT FIELD AT '#' INTO ONE TWO.
regards
Nicole
‎2007 Aug 10 8:08 AM
Hi,
1. SPLIT f AT g INTO h1 ... hn.
e.g.
DATA: ONE(10) TYPE C,
TWO(10) TYPE C,
SPLIT FIELD AT '#' INTO ONE TWO.
regards
Nicole
‎2007 Aug 10 8:09 AM
Split the line at the special character cl_abap_char_utilities=>horizontal_tab.
SPLIT lv_line AT cl_abap_char_utilities=>horizontal_tab INTO TABLE itab.
Please mark points if the solution was useful.
Regards,
Manoj
‎2007 Aug 10 8:10 AM
hi stock,
i'm not quite shur if it works, but try this:
CONSTANTS:
CON_NEWL TYPE ABAP_CHAR1 VALUE ABAP_CHAR_UTILITIES=>NEWLINE,
CON_TAB TYPE ABAP_CHAR1 VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
and split with CON_TAB. Perhaps it helps.
Regards, Dieter
‎2007 Aug 10 8:16 AM
I tried with the above statements, but get the error as
Class CL_ABAP_CHAR_UTILITIES is unkonwn.
i am workin on SAP 4.6c.
‎2007 Aug 10 8:22 AM
Use this code.
data lv_tab type char1 value %_HORIZONTAL_TAB.
split lv_line at lv_tab into table itab.Please mark points if the solution was useful.
Regards,
Manoj
‎2007 Aug 10 8:35 AM
Hi stock,
sorry but you can use
CONSTANTS: CON_NEWL TYPE X VALUE '0D', "OK for non Unicode
CON_TAB TYPE X VALUE '09'. "OK for non Unicode
or
CONSTANTS: CON_NEWL TYPE X VALUE %_NEWLINE,
CON_TAB TYPE X VALUE %_HORIZONTAL_TAB.
Regards, Dieter
‎2007 Aug 10 8:38 AM
Hi ,
%_HORIZONTAL_TAB is not accepted without quotes ' ' .
If given with quotes it takes only the 5 character and the split does not work.
How it has to be declared.
‎2007 Aug 10 8:42 AM
Hi,
i'm not sure if it works in your system. Try '09'.
Regards, Dieter
‎2007 Aug 10 10:55 AM
‎2007 Aug 10 12:55 PM
hi,
i tried with 09 even ....but didnt work for tabs
Regards,
stock