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: 

i need a help for DATA transfer

Former Member
0 Kudos
112

i want to data transfer ITAB to application server(linux)

through OPEN dataset.

i face a problem with error:

u see the code:

OPEN DATASET W_EXTRACT FOR OUTPUT FILTER 'compress'.

IF NOT T_FINAL[] IS INITIAL.

LOOP AT T_FINAL.

transfer t_final to '/dataintg/kltcm/test.txt'.

ENDLOOP.

ENDIF.

plz tell me

what is the problem with code.

6 REPLIES 6

Former Member
0 Kudos
86

OPEN DATASET W_EXTRACT FOR OUTPUT FILTER 'compress'.

IF NOT T_FINAL[] IS INITIAL.

*Transfer the data from internal table

LOOP AT T_FINAL.

  • transfer t_final to '/dataintg/kltcm/test.txt'.

TRANSFER T_FINAL TO W_EXTRACT.

IF SY-SUBRC <> 0.

MESSAGE E999(ZMM) WITH 'File not Transfered'(011).

ENDIF.

ENDLOOP.

ENDIF.

*For Close dataset.

CLOSE DATASET W_EXTRACT.

Former Member
0 Kudos
86

What is your error?

Rob

0 Kudos
86

file not transfer ' DATASET_CANT_CLOSE'

0 Kudos
86

abap runtime error 'DATASET_PIPE_CLOSED '

0 Kudos
86

Try:

OPEN DATASET w_extract FOR OUTPUT FILTER 'compress'.

CHECK sy-subrc = 0.

IF NOT t_final[] IS INITIAL.

*Transfer the data from internal table
  LOOP AT t_final.

* transfer t_final to '/dataintg/kltcm/test.txt'.
    TRANSFER t_final TO w_extract.

  ENDLOOP.
*For Close dataset.
  CLOSE DATASET w_extract.
ENDIF.

IF sy-subrc <> 0.
  MESSAGE e999(zmm) WITH 'File not Transfered'(011).
ENDIF.

Rob

0 Kudos
86

yes sy-subrc = 0.

but error is come in transfer t_final to w_extract.