‎2008 Jun 30 12:58 PM
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.
‎2008 Jun 30 12:59 PM
Hi
Use
ALSM_EXCEL_TO_INTERNAL_TABLE
Function module
regards
Pavan
‎2008 Jun 30 1:01 PM
Please SEARCH - this has been asked millions of times before.
‎2008 Jun 30 1:01 PM
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
‎2008 Jun 30 1:02 PM
hi,
u cannot use gui function modules while running in background.
‎2008 Jun 30 1:02 PM
‎2008 Jun 30 1:02 PM
Hi Dolly.
GoTo->SM36
If you know to do it, then schedule the program as a background here.
Reward points if helpfull.
Regards
Harsh
‎2008 Jun 30 1:03 PM
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
‎2008 Jun 30 1:04 PM
I AGREE COMPLETELY WITH GARETH IT HAS BEEN ASKED MANY TIMES BEFORE, TRY TO UTILIZE THE SEARCH FUNCTIONALITY OF SDN BEFORE POSTING
‎2008 Jun 30 1:11 PM
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.