Skip to Content
0
Former Member
Apr 10, 2008 at 04:14 AM

Downloading to a file

15 Views

Hi,

I am using the following code to download to a file.In debugging everything seem to be transferred but I am unable to find such a file in the c:/

Kindly help.

Thanks.

data : ofile(128) TYPE c VALUE

'C:\train_status1.txt'.

OPEN DATASET ofile FOR OUTPUT IN BINARY MODE.

IF sy-subrc <> 0.

MESSAGE i204 WITH ofile.

EXIT.

ENDIF.

LOOP AT it_output.

TRANSFER it_output TO ofile.

IF sy-subrc <> 0.

MESSAGE e000 WITH 'Unable to write data in file' ofile.

ENDIF.

ENDLOOP.

CLOSE DATASET ofile.

IF sy-subrc <> 0.

MESSAGE e000 WITH 'Error while closing file-' ofile.

ENDIF.

SKIP.

WRITE:/ 'Data Download Completed Successfully.'.