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

GUI_UPLOAD in Background

Former Member
0 Likes
5,656

Hello,

I am trying to upload data from the Presentation Server to the SAP System using the FM 'GUI_UPLOAD'. But the program that calls this is to run in the background, so it fails in this case, therefore could you kindly suggest me an alternative for this FM or any other method!

Quick Reply Much Appreciated

Points will be rewarded for correct answers.

Regards,

Bharath

1 ACCEPTED SOLUTION
Read only

former_member188829
Active Contributor
0 Likes
2,680

Hi Bharath,

Same thread...

Hello,

I am trying to upload data from the Presentation Server to the SAP System using the FM 'GUI_UPLOAD'. But the program that calls this is to run in the background, so it fails in this case, therefore could you kindly suggest me an alternative for this FM or any other method!

Quick Reply Much Appreciated

Points will be rewarded for correct answers.

Regards,

Bharath

7 REPLIES 7
Read only

former_member188829
Active Contributor
0 Likes
2,681

Hi Bharath,

Same thread...

Read only

0 Likes
2,680

Hello Kiran,

I do not think OPEN DATASET works for files in the Presentation Server(let alone background).

What all the suggestion have said is to upload the file first to Application Server and then read the data from there.

So I need a method to read the data from the Presentation Server in the Background.

Read only

0 Likes
2,680

Hi,

Use transaction CG3Y TO download data from application server to internal table.

Thanks

Read only

Former Member
0 Likes
2,680

Hello Bharath,

Let me first explain to you the concept. When u call the program in background mode then the program is getting executed on the server and the connection to your presentation server/desktop is not available so the program doesn't understand where to dump the file or on which presentation server the file needs to be downloaded. When u are executing the program in foreground then the connection to the desktop is avaialble and the program even though running on the server can still download the file. So coming to you problem either u have to use GUI_DOWNLOAD with foreground execution or if you need to execute it in background you have to use OPEN dataset.

Read only

Former Member
0 Likes
2,680

Hello Bharath,

Please see the below link: -

Regards,

Hk.

Read only

VikasB
Active Participant
0 Likes
2,680

Hi,

pass on the file path as constant value.

and assign the extension to it what ever your requirement is.

Regards,

Vikas.

Read only

Former Member
0 Likes
2,680

Hi,

Check this article

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb...

It gives a sample code to access text file on presentation server in background mode.

Regards

Sailaja.