‎2008 Apr 16 12:50 PM
Hi all,
i have a tab delimited file i have to upload it into the application server and from there i have to get it into the internal table.
when i upload the file to the application server then tab is disguished by the character #.
but when i get that file into the program by using open dataset then i will get the entire line but how to break it.
‎2008 Apr 16 12:56 PM
Hi,
The special charecter will be stored in the field cl_abap_char_utilities=>horizontal_tab .So to split the string at this field
Ex:
LOOP AT it_data INTO wa_data.
SPLIT wa_data-record AT cl_abap_char_utilities=>horizontal_tab INTO wa_input-zplant
wa_input-zsloc
wa_input-zsupploc
wa_input-zspeckey.
append wa_input to it_input.
endloop.
‎2008 Apr 16 12:56 PM
Hi,
The special charecter will be stored in the field cl_abap_char_utilities=>horizontal_tab .So to split the string at this field
Ex:
LOOP AT it_data INTO wa_data.
SPLIT wa_data-record AT cl_abap_char_utilities=>horizontal_tab INTO wa_input-zplant
wa_input-zsloc
wa_input-zsupploc
wa_input-zspeckey.
append wa_input to it_input.
endloop.
‎2008 Apr 16 12:56 PM
use the offset values...
data: outrec(200) type c .
OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE encoding DEFAULT.
loop at it_final.
outrec+0(8) = it_final-pernr.
outrec+8(40) = it_final-nachn.
outrec+48(40) = it_final-vorna.
outrec+88(30) = it_final-usrid.
outrec+118(40) = it_final-usrid_long.
transfer outrec to p_file.
clear outrec.
endloop.
CLOSE DATASET OUTREC.
regards,
venkat.