Klasse CL GUI FRONTEND SERVICES, Methode GUI DOWNLOAD

Aus SAP-Wiki
Wechseln zu: Navigation, Suche

Die Methode GUI_UPLOAD speichert Daten von SAP als Download zum Frontend/PC.

Upload/Download Datei Frontend

Download PDF-Datei

*&---------------------------------------------------------------------*
*&      Form  DOWNLOAD_PDF
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM download_pdf  USING    piv_laenge    TYPE i
                            piv_filename  TYPE string
                            pct_pdf       type tsfixml.

  CALL METHOD cl_gui_frontend_services=>gui_download
    EXPORTING
      bin_filesize            = piv_laenge
*     filename                = '\\da.net\user\HLW\muellemr\Documents\merged.pdf' " Name der Datei
      filename                = piv_filename
      filetype                = 'BIN'
    CHANGING
      data_tab                = pct_pdf       " Übergabetabelle
    EXCEPTIONS
      file_write_error        = 1
      no_batch                = 2
      gui_refuse_filetransfer = 3
      invalid_type            = 4
      no_authority            = 5
      unknown_error           = 6
      header_not_allowed      = 7
      separator_not_allowed   = 8
      filesize_not_allowed    = 9
      header_too_long         = 10
      dp_error_create         = gc_11
      dp_error_send           = gc_12
      dp_error_write          = gc_13
      unknown_dp_error        = gc_14
      access_denied           = gc_15
      dp_out_of_memory        = gc_16
      disk_full               = gc_17
      dp_timeout              = gc_18
      file_not_found          = gc_19
      dataprovider_exception  = gc_20
      control_flush_error     = gc_21
      not_supported_by_gui    = gc_22
      error_no_gui            = gc_23
      OTHERS                  = gc_24.

  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE   sy-msgty
                        NUMBER sy-msgno
                        WITH   sy-msgv1
                               sy-msgv2
                               sy-msgv3
                               sy-msgv4.
  ENDIF.

ENDFORM.                    " DOWNLOAD_PDF

Download CSV-Datei

Web-Links