Skip to Content
0
Former Member
May 22, 2009 at 09:52 AM

pipe delimited file on application server.

1215 Views

Hi , i m creating a text file on application server, i have written below code and file is getting created correctly. however, i want to create pipe delimited file. is there any method for this?

DATA : lv_line(173).

DATA : l_wa_itab_length(4) TYPE c VALUE '173'.

IF NOT p_tab[] IS INITIAL.

SORT p_tab.

OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE.

IF sy-subrc NE 0.

MESSAGE 'Error on output file read' TYPE 'E'.

ELSE.

LOOP AT p_tab.

lv_line = p_tab.

TRANSFER lv_line TO p_file LENGTH l_wa_itab_length.

CLEAR p_tab.

CLEAR lv_line.

ENDLOOP.

CLOSE DATASET p_file.

ENDIF.

ENDIF.

REFRESH p_tab.