Application Development 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: 

Modify iternal table data

Former Member
0 Kudos

Hi all,

l like to modify the content of my internal table before sending line to dataset, and each field separate by coma (;).

example:

000000000000000700 ;KPC;KPC; 1; 1; 1

The file will be in text mode.

Thank's

Robert

1 ACCEPTED SOLUTION

Former Member
0 Kudos

concatenate all the fields in each record seperated by; this should do.

syntax concatenate f1 f2 f3... into v_str seperated by ';'.

regards,

Srini.

3 REPLIES 3

Former Member
0 Kudos

Hi,

Try this...

data: v_string type string.

DATA: begin of wa,

FIELD1 type char10 value '10112121',

field2 type char2 value 'ab',

field3 type char4 value 'asdf',

end of wa.

DATA: itab like wa occurs 0 with header line.

append wa to itab.

clear: wa.

field-symbols: <fs>.

loop at itab into wa.

clear: v_string.

DO 3 times.

ASSIGN component sy-index of structure wa

to <fs>.

if sy-index = 1.

concatenate v_string <fs> into v_string.

else.

concatenate v_string <fs> into v_string

separated by ';'.

endif.

enddo.

write: / v_string.

endloop.

Thanks,

Naren

Former Member
0 Kudos

concatenate all the fields in each record seperated by; this should do.

syntax concatenate f1 f2 f3... into v_str seperated by ';'.

regards,

Srini.

Former Member
0 Kudos

Hi,

You can you CONCATENATE Statment with SEPARETED BY ';'.

CONCATENATE F1 F2 F3 F4 F5 ... into ITAB-LINE SEPARETED BY ';'.

Regards

Sudheer