Home > Default > Error in downloading a file

Error in downloading a file

October 11Hits:0
Advertisement
Hi Experts,
I have a program that can download an excel. Using 'WS_DOWNLOAD' I have specified the right parameter. I separated the fields using ",".
Filename =  C:\TEMP\TEST.CSV   
Data_Tab = D,S,00000000,ADJUSTMENTS,,,,,,         0.0000,         0.0000,         0.0000,         0.0000,155905000,07/31/2007
Error: Error when opening a download file.
Help me. Thanks!

Answers

      Concatenate int_Dtl-RecType
                  int_Dtl-TranType
                  int_Dtl-Tin
                  int_Dtl-CusName
                  int_Dtl-LastNm
                  int_Dtl-FirstNm
                  int_Dtl-MidNm
                  int_Dtl-Street1
                  int_Dtl-Street2
                  int_Dtl-GexSales
                  int_Dtl-GzSales
                  int_Dtl-TaxSales
                  int_Dtl-ToTax
                  int_Dtl-Tin2
                  int_Dtl-RepPer
      Into        int_TxtHdr-NText
      Separated   By ','.
      Append int_TxtHdr.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
    FILENAME                      = pa_File
    FILETYPE                      = 'ASC'
    MODE                          = ' '
  TABLES
    DATA_TAB                      = int_TxtHdr
EXCEPTIONS
   FILE_OPEN_ERROR               = 1
   FILE_WRITE_ERROR              = 2
   INVALID_FILESIZE              = 3
   INVALID_TYPE                  = 4
   NO_BATCH                      = 5
   UNKNOWN_ERROR                 = 6
   INVALID_TABLE_WIDTH           = 7
   GUI_REFUSE_FILETRANSFER       = 8
   CUSTOMER_ERROR                = 9
   OTHERS                        = 10.
IF SY-SUBRC <> 0.
   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Read other 13 answers

Tags:

Related Articles

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.579 s.