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: 

Background job fails

aidaj_hilton
Participant
0 Kudos

I am trying to run my program in background which uploads files using GUI_UPLOAD and creates orders. I can process this program in foreground without any problems but the job log shows the following message "Failed to upload from input file " when I execute a background job.

5 REPLIES 5

Former Member
0 Kudos

Hi Jill,

Are you uploading a input file from an application server. In that case Please use Data sets to upload the input file .

When you are uploading file from application server GUI_UPLOAD doesn't work for you.

Please check SDN there are several threads on same issue.

Lanka

Former Member
0 Kudos

I believe that you cannot GUI_UPLOAD in background. It is for uploading file froms from your PC.

Try open dataset, read dataset & close dataset...

0 Kudos

Ofcourse your file has to be in the app server.

Former Member
0 Kudos

Dear Jill,

GUI_upload function module runs on the presentation server.as its run in background its not done on ur pc and its done on the application server.

for this u can use OPEN DATASET, TRANSFER DATASET,READ DATASET etc.

find the help typing any of the above in ABAP editor.

Do rewar points if it is helpful.

Regards,

Suresh

Former Member
0 Kudos

Hi !

As postet bevor the GUI_UPLOAD functions are part of the SAP-GUI running on the presentation-server (PC, Mac ...).

If ther programm is running in the background there ist not presentation-server and no GUI-function support.

So you'll have to redesign your programm.

First make sure to transfer your file to the application-server that runs your job (or to a "mounted" directory to with the server has access).

You cand transfer the file by using FTP oder the SAP CG3Z Transaction.

Then change your programm using the "OPEN DATASET..."

statement reading the file on the SAP-application-server.

That should work...

Regards

Rainer

Message was edited by: Rainer Bonenberger