Application Development 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: 

Function WS_UPLOAD to upload data from PC to SAP!

Former Member
0 Kudos

Hello at all,

in my program i used the Function WS_UPLOAD and it works correct.

But my question is, can I also exporting a filename in the function more than 1024 characters?

DATA: file(1500) TYPE c.

file = (Path/Filename with over than 1024 characters)

file = 'C:\Dokumente und Einstellungen\ETO.Transic\Desktop\test.txt'.

CALL FUNCTION 'WS_UPLOAD'

EXPORTING

codepage = 'IBM'

filename = file

filetype = 'ASC'

IMPORTING

filelength = flength

TABLES

data_tab = tab

EXCEPTIONS

conversion_error = 1

file_open_error = 2

file_read_error = 3

invalid_table_width = 4

invalid_type = 5.

IF sy-subrc NE 0.

MESSAGE e888(sabapdocu) WITH 'ERROR in Function WS_UPLOAD'.

ENDIF.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

It will not take more than 128 chars. (RLGRAP-FILENAME)

Regards,

Srini.

3 REPLIES 3

Former Member
0 Kudos

Hello,

WS_UPLOAD is a obsolete function module and is not recommended to be used anymore. Instead use GUI_UPLOAD. The filename import parameter is of type STRING. So i guess that would accept a filename greater than 1024 characters.

Vikranth

Former Member
0 Kudos

Hi,

It will not take more than 128 chars. (RLGRAP-FILENAME)

Regards,

Srini.

0 Kudos

Thank you for helpful answer.

with kind regards

ETN