cancel
Showing results for 
Search instead for 
Did you mean: 

Call Function WS_UPLOAD error

Former Member
0 Kudos

hi,

need help. i called the function WS_UPLOAD from a custom report. and ran the report on both foreground and background. but i received above error messsage while running on the background. running the same program on the foreground don't yield any error messages.

thanks,

rico

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

In the code you will find this:

IF sy-batch = 'X'.

RAISE NO_BATCH.

ENDIF.

So that's that!

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

That's because WS_UPLOAD uploads a file from the Presentation Layout (The User's PC).  When something runs in the background, there is no connection to a prestionation layer. From the background you can access the file system of the application server your SAP system is running on. Often this might mean mounting a remote file directory to your SAP Server or doing a FTP on the file after it is written. Look at the help on OPEN DATASET, TRANSFER TO DATASET, and CLOSE DATASET for examples of writting to file in the background.