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

Configure SM69 for calling external command

Former Member
0 Likes
7,404

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

In SM69 or in My calling Program  ?

7 REPLIES 7
Read only

FredericGirod
Active Contributor
0 Likes
3,609

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

Read only

0 Likes
3,609

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..

Read only

0 Likes
3,609

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

Read only

0 Likes
3,609

Read only

0 Likes
3,609

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

Read only

0 Likes
3,609

In SM69 or in My calling Program  ?

Read only

Former Member
0 Likes
3,609

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...