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

regarding GUI_UPLOAD

Former Member
0 Likes
1,036

Hi,

Need some information regarding GUI_UPLOAD function module.

Please can you tell me if GUI_UPLOAD function module can be used while we run the program in background.

As while I am trying to run this program to upload the data from an excel file in the background it is giving sy-subrc execption value as 3.

The description in the FM says "Front-End Function Cannot Be Executed in Backgrnd".

Thanks.

9 REPLIES 9
Read only

bpawanchand
Active Contributor
0 Likes
1,001

Hi

Use

ALSM_EXCEL_TO_INTERNAL_TABLE

Function module

regards

Pavan

Read only

Former Member
0 Likes
1,001

Please SEARCH - this has been asked millions of times before.

Read only

Former Member
0 Likes
1,001

Hi,

GUI_UPLOAD will never work in background.

If u wantto run in back ground, go for DATASETS...

and for this the file shud be in Application server ( tcode AL11) and not in presentastion server.

revert back if any issues.

regards,

Naveen

Read only

GauthamV
Active Contributor
0 Likes
1,001

hi,

u cannot use gui function modules while running in background.

Read only

Former Member
0 Likes
1,001

Hi,

Pls Go throtu The Below Link Documentation-

Read only

Former Member
0 Likes
1,001

Hi Dolly.

GoTo->SM36

If you know to do it, then schedule the program as a background here.

Reward points if helpfull.

Regards

Harsh

Read only

Former Member
0 Likes
1,001

Yes, YOu cannot use this FM in background.

Transfer this file on to the application server using the transaction: CG3Z and then use the statements

OPEN dataset/ transfer/ close dataset in your program.

sample code:

OPEN DATASET file FOR OUTPUT IN TEXT MODE. 

loop at itab.
concatenate itab-field1 itab-field2 into v_data.
  TRANSFER v_data TO file. 
endloop.

CLOSE DATASET file.

Regards,

Ravi

Read only

Former Member
0 Likes
1,001

I AGREE COMPLETELY WITH GARETH IT HAS BEEN ASKED MANY TIMES BEFORE, TRY TO UTILIZE THE SEARCH FUNCTIONALITY OF SDN BEFORE POSTING

Read only

Former Member
0 Likes
1,001

Hello Dolly,

When scheduling a job in the background the appropriate statement to read in your file is OPEN DATASET, and the file must be on the file system that the SAP server can see.

At anytime, a user can switch of the Personal Computers even though the job is still running in the background. Therefore GUI_* and WS_* function modules are not designed to work in that way, as they need to access your personal computer file.

Hope this helps you

Regards

Indu.