Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Re : upload

Former Member
0 Likes
765

hi

how to upload data from presentation server to internal table with out using Gui_upload ws_upload upload.

with regards

mani

5 REPLIES 5
Read only

rainer_hbenthal
Active Contributor
0 Likes
735

strange requisit - but you can call methods from cl_gui_frontend_services

Read only

Former Member
Read only

GauthamV
Active Contributor
0 Likes
735

hi,

try to use the function module UPLOAD_FILES.

Read only

Former Member
0 Likes
735

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

Read only

Former Member
0 Likes
735

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