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 Module for Data upload in background

Former Member
0 Likes
2,647

Hi,

I want to upload data from a flat file in background . I tried the function module ws_upload but its giving an error when program is executed in background .

I am working on sap 4.6b .

Can any one help me alternate function module or any other way by which i can upload data in background in this version of sap.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,884

Hi,

You CANNOT use any front end application func. modules to be executed in BACKGROUND. It will give an error.

Use OPEN DATASET to upload from the app.server.

Regards,

Subramanian

12 REPLIES 12
Read only

Former Member
0 Likes
1,884

Hi

UPLOAD and WS_UPLOAD are used in older versions.in the new versions of SAP GUI_UPLOAD is used for uploading data.this is well know to every one.

GUI_UPLOAD Replaces WS_UPLOAD. Upoad file from presentation server to the app server

Regards

Lakshman

Read only

0 Likes
1,884

Hi Lakshman ,

My problem is not the function module. I am aware that ws_upload is now old. But the problem is sy-batch check which is used in all this upload function modules either it be ws_upload , gui_upload or upload. all these function modules doesnot work in background.

Is there any other way out.

Read only

0 Likes
1,884

Hi Sujit,

GUI_UPLOAD and WS_UPLOAD function module doesnot work in background,if you want to upload data in bakground than you need to to transfer file to application server,and after you need to use DATASET(Open,Read,close).

Thanks

Ankur Sharma

Read only

Former Member
0 Likes
1,884

Use tcode SM37 to schedule job in background.

Read only

Former Member
1,884

Hi Sujit,

You can use the FM ARCHIVFILE_CLIENT_TO_SERVER to upload file from Presentation Server to your Application Server.

Hope it helps.

Reward with Points if helpful.

Regards

Hemant Khemani

Read only

0 Likes
1,884

Hi Hemant,

Thanks for your reply . But i am afriad your solution suggested will not work as the function module you suggested uses WS_upload in its coding so this will again give error in background.

Read only

0 Likes
1,884

Hi Sujit,

You can use the FM specified by me to put your file on the Application Server and then you can use OPEN DATASET statement in SE38 program and schedule that to run in background.

Regards

Hemant Khemani

Read only

0 Likes
1,884

Hi hemant,

my main concern is that i have to upload a file after every 10 minutes say . So my main concern is to upload this file very frequently so i cant upload this file in forground i have to use some other technique. What right now i have used is i have created a program that executes in foreground and submits the program after every 10 min using the function module . This is what you call a jugad . but i want a permanent solution.

Read only

Former Member
0 Likes
1,885

Hi,

You CANNOT use any front end application func. modules to be executed in BACKGROUND. It will give an error.

Use OPEN DATASET to upload from the app.server.

Regards,

Subramanian

Read only

0 Likes
1,884

Hi Subramainiam ,

thanks for reply .

Isnt it possible without using dataset.

Due to some restrictions i dont want to use datasets.

Read only

Former Member
0 Likes
1,884

hi...

you can upload your file on application server.Then you can use open dataset to upload data from this file on application server and schedule this program in background.

i have done a similar kind of program.

you can try this method.

Read only

0 Likes
1,884

Hi Shelsa,

Thanks for reply.

Can you give me details of your coding steps .

Like fm used to upload data to application server and later.

And if possible any other methods because i dont want to use dataset in my program.