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

Function WS_UPLOAD to upload data from PC to SAP!

Former Member
0 Likes
755

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
Read only

Former Member
0 Likes
726

Hi,

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

Regards,

Srini.

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.

3 REPLIES 3
Read only

Former Member
0 Likes
726

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

Read only

Former Member
0 Likes
727

Hi,

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

Regards,

Srini.

Read only

0 Likes
726

Thank you for helpful answer.

with kind regards

ETN