Skip to Content
0
Former Member
Oct 07, 2009 at 10:39 AM

Problem in Text file Format while transferring data from SAP

37 Views

Dear Friends,

i am downloading the Text file with data on Unix server . But though i have two lines in internal table both the Lines are getting Concaniteted .

Please check the following code

DATA : BEGIN OF it_data OCCURS 0,

f1(250) TYPE c,f2(250) TYPE c,f3(250) TYPE c, f4(250) TYPE c,

f5(250) TYPE c,f6(250) TYPE c,f7(250) TYPE c, f8(250) TYPE c,

f9(250) TYPE c,f10(250) TYPE c,f11(250) TYPE c, f12(250) TYPE c,

f13(250) TYPE c,f14(250) TYPE c,f15(250) TYPE c, f16(250) TYPE c.

DATA : END OF it_data.

LOOP AT it_download_bank_details INTO wa_download_bank_details.

APPEND wa_download_bank_details TO it_data.

ENDLOOP.

OPEN DATASET p_unixfn FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc NE 0.

errflag = 'X'.

MESSAGE i002(mg) WITH p_unixfn.

MESSAGE a099(mg).

ENDIF.

LOOP AT it_data.

TRANSFER it_data TO p_unixfn.

IF sy-subrc NE 0.

errflag = 'X'.

MESSAGE i001(mg) WITH p_unixfn.

MESSAGE a099(mg).

ENDIF.

ENDLOOP.

CLOSE DATASET p_unixfn .

Please suggest me a solution.

Regards

Nilesh