Skip to Content
0

ABAP Transaktion in Launchpad HTML generated // 1610 // file_open_dialog // gui_upload

Jul 13, 2017 at 03:30 PM

78

avatar image
Former Member

Hello all,

First to say:

i am a develloper in a S4HANA 1610 Project.

My Application works in the Gui not in the Launchpad.

Surroundings:

I build an ZTransaction in ABAP.

There is a Parameter on the SelectionScreen with an F4 Help.

When you push the F4 Help the method

cl_gui_frontend_services=>file_open_dialog

gets called.

In Launchpad u get an different Explorer. (Virtuel with Z:// Path)

When i transfer the selected path to my parameter.

The Parameter now says Z:/[filename]

Fine!!!

Now i press F8 and the Method.

cl_gui_frontend_services=>gui_upload

Is called.

Under Gui it works.

Under Lunchpad it says now:

"

Fehler: Frontend-Service-Methode: Datei "Z:\[filename]" hochladen.

Abrufen von Datei "Z:\[filename]" fehlgeschlagen:

A requested file or directory could not be found at the time an operation was processed.

"

Any Experience?

Thanks,

Luis

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Jörg Knaus Jul 13, 2017 at 09:31 PM
0

hi

in support.sap.com/notes you will find several notes on ITS UpDown,

for example

2257886 - ITS Up/Down: Error message during download via WEBGUI

try different browsers/jre and check if special characters in filename

check if newest sap kernel is installed for its version

hope this helps

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks,

i will try and give feedback.

Luis

0
avatar image
Former Member Aug 10, 2017 at 03:28 PM
0

Hello Jörg,

the error was easy fixed.

Here you can see the Coding.

To make it WEBGUI and FIORI Launchpad able you just have to add.

"Lowercase"

PARAMETERS: ds_name TYPE string lowercase.
*&---------------------------------------------------------------------*
*& Report zlf_test
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zlf_test.


data: gt_table type truxs_t_text_data.


SELECTION-SCREEN BEGIN OF BLOCK filename WITH FRAME TITLE TEXT-003.
PARAMETERS: ds_name TYPE string
            DEFAULT 'C:\'.
SELECTION-SCREEN END OF BLOCK filename.


INITIALIZATION.


AT SELECTION-SCREEN ON VALUE-REQUEST FOR ds_name.
  PERFORM f4_path.


AT SELECTION-SCREEN.


  perform gui_upload.


FORM f4_path.


DATA: lt_file_table TYPE TABLE OF file_table,
      ls_file_table like LINE OF lt_file_table,
      lv_rc TYPE i.


  CALL METHOD cl_gui_frontend_services=>file_open_dialog
*    EXPORTING
*      window_title            =     " Titel des Datei-Öffnen Dialogs
*      default_extension       =     " Vorschlagserweiterung
*      default_filename        =     " Vorschlagsdateiname
*      file_filter             =     " Filterstring für Dateierweiterung*      with_encoding           =     " file encoding
*      initial_directory       =     " Ausgangsverzeichnis
*      multiselection          =     " Mehrfachselektion möglich
    CHANGING
      file_table              =    lt_file_table " Tabelle, die selektierte Dateien enthält
      rc                      =    lv_rc" Rückgabewert: Anzahl Dateien oder -1 falls Fehler auftritt
*      user_action             =     " Benutzeraktion( s. Kl.konstanten ACTION_OK, ACTION_CANCEL)
*      file_encoding           =
    EXCEPTIONS
      file_open_dialog_failed = 1
      cntl_error              = 2
      error_no_gui            = 3
      not_supported_by_gui    = 4
      others                  = 5
    .
  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 table lt_file_table INTO ls_file_table INDEX 1.
  ds_name = ls_file_table-filename.


ENDFORM.


form gui_upload.


  CALL METHOD cl_gui_frontend_services=>gui_upload
    EXPORTING
      filename                = ds_name    " Name der Datei
*      filetype                = 'ASC'    " Dateityp (Ascii, Binär)
*      has_field_separator     = SPACE    " Spalten durch TAB getrennt bei ASCII Upload
*      header_length           = 0    " Länge des Headers bei Binärdaten
*      read_by_line            = 'X'    " Die Datei wird zeilenweise in die interne Tabelle geschriebe
*      dat_mode                = SPACE    " Zahl- und Datumsfelder werden im 'DAT' Format des ws_downloa
*      codepage                =     " Zeichenrepräsentation für Ausgabe
*      ignore_cerr             = ABAP_TRUE    " Gibt an, ob Fehler bei der Zeichensatzkonvertierung ignorier
*      replacement             = '#'    " Ersatzzeichen für nicht-konvertierbare Zeichen.
*      virus_scan_profile      =     " Viren-Scan-Profil
*    IMPORTING
*      filelength              =     " Dateilänge
*      header                  =     " Header der Datei bei binärem Upload
    CHANGING
      data_tab                = gt_table    " Übergabetabelle für Datei-Inhalt
*      isscanperformed         = SPACE    " File ist bereits gescannt
    EXCEPTIONS
      file_open_error         = 1
      file_read_error         = 2
      no_batch                = 3
      gui_refuse_filetransfer = 4
      invalid_type            = 5
      no_authority            = 6
      unknown_error           = 7
      bad_data_format         = 8
      header_not_allowed      = 9
      separator_not_allowed   = 10
      header_too_long         = 11
      unknown_dp_error        = 12
      access_denied           = 13
      dp_out_of_memory        = 14
      disk_full               = 15
      dp_timeout              = 16
      not_supported_by_gui    = 17
      error_no_gui            = 18
      others                  = 19
    .
  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.
Share
10 |10000 characters needed characters left characters exceeded