GUI_UPLOAD method of cl_gui_frontend_services to upload data to SAP within ABAP reportThe cl_gui_frontend_services=>gui_upload abap method is used to upload a file into SAP. This is supposed to be the recomended way of uploading files into SAP but to be honest it just executes the gui_upload function module so using this should be the same as using the upload FM. Having said that I guess SAP could change this in the future and add differnt functionality to the method. Its also good that all functionality is grouped together within the cl_gui_frontend_services class. *Selecting a Directory
DATA: datatab TYPE table_of_strings,
wa_datatab LIKE LINE OF datatab,
ld_lines TYPE i,
ld_file TYPE string.
PARAMETERS: p_file(300) TYPE c.
ld_file = p_file.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = ld_file
filetype = 'ASC'
CHANGING
data_tab = datatab
EXCEPTIONS
OTHERS = 1.
|
||||