Skip to Content
0
Former Member
Mar 02, 2006 at 09:26 PM

Transporting an internal table

29 Views

Hi,

I'm trying to write the contents of an internal table to the application server, this is my code

OPEN DATASET txt_out

FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc = 0.

LOOP AT it_global_data INTO wa_global_data.

TRANSFER wa_global_data TO txt_out.

ENDLOOP.

WRITE: / 'data was written to ', txt_out.

ELSE.

WRITE: / 'Error, sy-subrc is: ', sy-subrc.

ENDIF.

CLOSE DATASET txt_out.

Now, I want to do 2 things:

1) Remove all the unnecessary spaces after each field (is there a function to do that?)

2) Between each field I want to have a ';' in my output file

The trick is performance is a big issue because the file can be huge (200,000+ lines) so I don't think parsing each field and manually placing a ';' after it will be very fast.