2009 Sep 14 7:34 AM
Hello All,
My requirement is to trigger a file on different server in Background.
WS_EXECUTE function module is working perfectly in Front End but failing in background.
Please can you guide the way out.
Regards,
Shantanu R. Godbole
Hello All,
My requirement is to trigger a file on different server in Background.
WS_EXECUTE function module is working perfectly in Front End but failing in background.
Please can you guide the way out.
Regards,
Shantanu R. Godbole
2009 Sep 14 7:37 AM
Hi,
WS_EXECUTE is used to execute a front end program like WORD, EXCEL, etc. This will not work in background. Since SAP will not allow any GUI based interactions in the background it will not work.
Regards,
Vikranth
Edited by: Vikranth.Reddy on Sep 14, 2009 12:11 PM
2009 Sep 14 7:50 AM
Hello Vikranth,
So is there any solution to call a file in Background?
Regards,
Shantanu R. Godbole
2009 Sep 14 7:52 AM
you have to upload file on application server using tcode CG3Z and then use open data set statement to access the file..
2009 Sep 14 7:41 AM
2009 Sep 14 7:48 AM
Hello Venkatachalam,
CL_GUI_FRONTEND_SERVICES->execute does not work even. What has to be done to call a file in Background Specifically?
Regards,
Shantanu R. Godbole
2009 Sep 14 7:55 AM
2009 Sep 14 7:56 AM
What kind of program do you want to execute on the application server? In Background there is not GUI and therefore there is no connection to a/the presentation server.
What OS is running on your apllication server? Windows? Unix?
2009 Sep 14 8:06 AM
Hi All,
I have to trigger a VB Script on a different Server (Windows Non SAP) form a SAP (Linux) server.
It is successful by passing '
(IP addess)\folder\file' in the 'PROGRAM' Parameter of WS_EXECUTE function module and similar function Modules , but in Front end only. So could you please suggest how can we call it in Backgorund.
Regards,
Shantanu R. Godbole
2009 Sep 14 8:36 AM
Again, you can not use any of the WS_EXECUTE oder GUI Services in Background. You can process files on the application server depending on the OS.
Another way is to trigger another program via HTTP.
2009 Sep 14 8:15 AM
Hi Shantanu, <li>It is not possible to deal with front end when program is run in background. <li>Download, upload, ws_download, ws_upload, gui_download, gui_upload,ws_execute, cl_gui_frontend_services=>upload, cl_gui_frontend_services=>download functions,which interact with front-end are not supported in background. <li>If you want to download or upload in background, you need to use OPEN DATASET, TRANSFER or READ DATASET, CLOSE DATASET statements. Thanks Venkat.O
2009 Sep 14 8:54 AM
Indeed you cannot use the GUI functions and you have to use the OPEN DATASET and CLOSE DATASET.
If you placed the file(s) on the SAP server, there is no problem accessing it with these statements.
If you place the file(s) on a network share for example you have give 2 users read/write access to the network share on Windows NT level. Maybe your system administrator has to do this.
The users are <SID>ADM and SapService<SID> where <SID> is the system ID of the system you are working on. These users should be domain users, then it will always work. If they are created locally on the SAP system during installation, you also have to create them in the domain and link them together in one way or another..
Grtz Marcel
2009 Sep 14 9:06 AM
>
> Indeed you cannot use the GUI functions and you have to use the OPEN DATASET and CLOSE DATASET.
> Grtz Marcel
I can not see how this should trigger a VB Script...
2009 Sep 14 9:12 AM
My fault, i didn't read the question right. I thought "read" a file instead of "execute" a file.
Sorry.
2009 Sep 14 11:44 AM
Hi All,
Open Dataset / Close Dataset cant be used as I just have to trigger a File on another Server and not read it.
any connection possible through RFCs , etc
Regards,
Shantanu R. Godbole
2009 Sep 14 12:19 PM
>
> Open Dataset / Close Dataset cant be used as I just have to trigger a File on another Server and not read it.
> any connection possible through RFCs , etc
Yes, you can call an RFC which will call the VB application which will reside on the relevant server.
In our systesm , we have an RFC to which we pass some params which calls a VB application which writes a file to the server.
BR,
Suhas
2009 Sep 14 9:05 AM
Setup an external oss command in transaction SM69
And from your programm excecute it by calling the FM SXPG_STEP_COMMAND_START
2009 Sep 14 11:57 AM
Hi Shatanu,
The best way to this woul be using open dataset nad locse datat set.Using this you can trnsafer and pick
the file susung application server.
This will work in the backgroun.
However before uploading the file just check if the contents of the file are manitained properly and the fileds are in the correct sequence..
thanks...
2009 Oct 20 10:43 AM
Hi Suhas,
Can you please provide the VB script that your using, we can use this to get pdf file also?
Please update me.
Thanks,
Hari