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

File Upload on application server

Former Member
0 Likes
745

I do not have CG3Z (4.0B) on my system.

Need to upload a heavy file , Do we have any method other than ws_upload FM.

Regards

Alok Pathak

3 REPLIES 3
Read only

andreas_mann3
Active Contributor
0 Likes
588

Hi,

CG3Z uses ws_upload too.

-so there's no better solution

another fm's are: GUI_UPLOAD and UPLOAD

and program: GRUPDL00

A.

Message was edited by: Andreas Mann

Read only

Former Member
0 Likes
588

Hi Alok,

For application server, you can use the following commands.

DATA: line TYPE string,

file(20) TYPE C value '/usr/test.dat'.

OPEN DATASET file IN TEXT MODE FOR INPUT.

DO.

READ DATASET file INTO line.

IF sy-subrc <> 0.

EXIT.

ENDIF.

WRITE: / line.

ENDDO.

for writing data to application server

use transfer statement:

Regards,

Ravi

Read only

Former Member
0 Likes
588

Check out if this FM will help you

CALL FUNCTION 'C13Z_UPLOAD'

EXPORTING

  • CODEPAGE = ' '

FILENAME = L_FILENAME

FILETYPE = LC_FILEFORMAT_ASCII

  • HEADLEN = ' '

  • LINE_EXIT = ' '

  • TRUNCLEN = ' '

  • USER_FORM = ' '

  • USER_PROG = ' '

  • DAT_D_FORMAT = ' '

IMPORTING

FILELENGTH = L_FILELENGTH

TABLES

DATA_TAB = L_DATA_TAB

EXCEPTIONS

CONVERSION_ERROR = 1

FILE_OPEN_ERROR = 2

FILE_READ_ERROR = 3

INVALID_TYPE = 4

NO_BATCH = 5

UNKNOWN_ERROR = 6

INVALID_TABLE_WIDTH = 7

GUI_REFUSE_FILETRANSFER = 8

CUSTOMER_ERROR = 9

NO_AUTHORITY = 10

BAD_DATA_FORMAT = 11

HEADER_NOT_ALLOWED = 12

SEPARATOR_NOT_ALLOWED = 13

HEADER_TOO_LONG = 14

UNKNOWN_DP_ERROR = 15

ACCESS_DENIED = 16

DP_OUT_OF_MEMORY = 17

DISK_FULL = 18

DP_TIMEOUT = 19

NOT_SUPPORTED_BY_GUI = 20

ERROR_NO_GUI = 21

OTHERS = 22

You can use this FM to upload it into an internal table a

and then as Ravi suggested write it to the application server