2015 Nov 19 9:40 AM
We have 1 java '.jar' file.
we execute it on presentation server as below :
run-> cmd
then
java -jar Filepath+Filename.jar
Now we want to execute this file from ABAP .
So what configuration we have to make in SM69 transaction so that we can execute it using function module "SXPG_COMMAND_EXECUTE".
I am confused In SM69 t code In definition block :
what to provide in :
Operating System Command parameter
and
What to provide in Additional parameter
Our Java Program accepts 3 parameters in Input ..
How we can pass this parameters using SXPG_Command_Execute function module.
Please help me with the configuration ..
Regards,
Gaurav
2015 Nov 19 9:43 AM
Hi ,
Creation of External Commands with the help of UNIX Coding in SAP - ABAP Development - SCN Wiki
did you put the full path of the JAVA command ?
C:\.....\java.exe
Fred
PS: you have a question looking like your question : How to Call Java from ABAP | SCN
2015 Nov 19 9:52 AM
Yes..I put full path ..I have provided below details in SM69 :
Command Name : Ztmp
Operating System : Windows NT
Operating System command : java -jar
Parameters for Operating System Command : here I provided full path of file
my file lies on presentation server .. so I have provided filepathand filename as below :
D:\Hello.jar
I could not execute this command from SM69 I am getting below error :
Can't execute external command (No such file or dir)
wait for singleobject failed with %d (No such device or address)
I am not calling this from function module yet, I am trying from SM69..
2015 Nov 19 9:55 AM
Sorry to ask again
could you put a screenshot or the full value you have set ?
because, in windows environment you have to specify the full path of the command.
Fred
2015 Nov 19 10:05 AM
2015 Nov 19 10:13 AM
you have to specify the full path of the command "java"
==> "C:\Program Files\Java\Exe\java.exe"
because java is unknow by your system
it's not a system command, it's an application
Fred
2015 Nov 19 10:15 AM
2015 Nov 19 10:26 AM
Hello Fred,
I have to provide full path where ? in SM69 ? for "Operating System COmmand" Parameter ?
or In my calling Program ? where I am calling Function module... Do I need to pass this full path in Function module ?
Please let me know...
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |