'SXPG_COMMAND_EXECUTE'

Question:
Hi.
I need to call a DOS coomand script (.cmd) from ABAP in a scheduled background process.
Foreground, from presentation server, WS_EXECUTE works fine.
In background, I know I have to use FM 'SXPG_COMMAND_EXECUTE'.
But calling it, how can I detail the network path where I saved the script?
Thanks
Jenny
Answer:
Jenny,
I'm a little confused as to why you would want to call a DOS program from a background task. What exactly are you trying to execute ?
I believe that FTP allows you to execute remotely. So I guess it's possible to execute FTP on your app server with an ftp script that logs onto your DOS machine (using FTP) and executes the program.
But, you're asking for trouble here. What happens when the DOS machine is not available. Fortunately the FTP script can be read from ABAP and it can be determined that the DOS based machine is not available.
It would be a little more resilient if you could you use a network server instead to run whatever command is required. But then I don't exactly what the reason for the running the DOS command is.
Can you fill in the missing pieces for us.
Dr Sidewalk
_________________
"In the middle of difficulty lies opportunity" - Albert Einstein
"Money isn't everything in life, unless you don't have it". David King
"Fail to plan, plan to fail"
"Success is a journey, not a destination."
Answer:
Thanks for the help.
Here I provide some details.
I have to downlaod a file to a protected directory on an external AS400 system.
SAP, running on a windows Nt server, cannot access the directory because AS400 username and password for drectory are requested.
So, I wrote a simpel DOS script (NET FILE Etc. etc.) passing them.
In foreground, calling the DOS script via FM WS_EXECUTE; this way works.
Any idea?
JEnny
Answer:
Jenny, assuming your application server is Windows based and the script is on the application server, read this thread
.
If the above assumption is incorrect, disregard this message and deal with Dr. Sidwalk's message.
_________________
Sudhi Karkada
Answer:
Thanks a lot !!!

More Articles:

selection text and logon language?
Uploading data from Excel to Database table?
how to delete the value in table Konv?
how download an itab to a .txt file and keep blanks?
Reversing technology?
Table indexes?