Skip to Content
0
Former Member
Apr 21, 2007 at 03:38 AM

Open Dataset - file downloading problem

12 Views

Hello friends,

I am trying to download a file in the application sever.But I am getting the error "Error in downlaoding file".What is the mistake in the following code?

Regards,

Hari prasath.

DATA : BEGIN OF ITAB OCCURS 0,

KUNNR LIKE KNA1-KUNNR,

END OF ITAB.

DATA : FN LIKE RLGRAP-FILENAME.

SELECT KUNNR FROM KNA1 INTO CORRESPONDING FIELDS OF TABLE ITAB UP TO 5 ROWS.

FN = 'i2\data\debitnote\kunnr'.

CALL FUNCTION 'WS_DOWNLOAD'

EXPORTING

FILENAME = FN

FILETYPE = 'DAT'

TABLES

DATA_TAB = ITAB.

OPEN DATASET FN FOR OUTPUT IN TEXT MODE.

CLOSE DATASET FN.