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

Interface concept

Former Member
0 Likes
461

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
441

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.

2 REPLIES 2
Read only

Former Member
0 Likes
442

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.

Read only

Former Member
0 Likes
441

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.