‎2008 May 30 11:13 AM
hi
how to upload data from presentation server to internal table with out using Gui_upload ws_upload upload.
with regards
mani
‎2008 May 30 11:15 AM
strange requisit - but you can call methods from cl_gui_frontend_services
‎2008 May 30 11:16 AM
‎2008 May 30 11:17 AM
‎2008 May 30 11:23 AM
hi
1) u can do that with the help of class and methods
2) the class name for this purpose is CL_GUI_FRONTEND_SERVICES.
3) this class has many methods, the method spcific to ur requirement is FILE_OPEN_DIALOG
4) click pattern in ur report/prog. and then select ABAP OBJECTS PATTERN and press enter.
5) in the next window give ur class and method name and press enter.
6) the parameters of that method wil be included to ur prog. form here is normal passing of values.
reward if helpful
regards
mano
‎2008 May 30 11:24 AM
Hi,
U can use the following functiin module if file is xls or csv with header.
Upload filedata into internal file.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = li_raw
i_filename = l_file
TABLES
i_tab_converted_data = i_filedata[]
EXCEPTIONS
conversion_failed = 1
OTHERS = 2 .
IF i_filedata[] IS INITIAL.
IF sy-subrc EQ 1.
MESSAGE s004(zfi_credit) WITH l_file. u201CInvalid file path & entered
LEAVE LIST-PROCESSING.
ENDIF.
MESSAGE .............
LEAVE LIST-PROCESSING.
ELSEIF NOT i_filedata[] IS INITIAL.
Used of displaying total number of records uploaded.
CLEAR : w_tot_rec.
DESCRIBE TABLE i_filedata LINES w_tot_rec.
endif.
with regards..........
sunil