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

Executing a Command in a Local Computer (not the app server).

SantiMoreno
Participant
0 Likes
2,126

Hi ABAPers.

Hope you could help me.

I need to execute a Java program via which is in a local computer (let's say my laptop) which, obviously, is not the application server. That's because such Java program must access to a serial port in that local computer to get certain values.

I've seen that for executing external commands I can use RFC destinations... can I set my local computer as a RFC destination (and how) to directly execute the command? Would there be any alternatives -no way with executing the command in the app server- to execute that Java command?

Thanks in advance.

Kind Regards.

Santiago.

1 ACCEPTED SOLUTION
Read only

rosenberg_eitan
Active Contributor
0 Likes
1,975

Hi,

There is also a way to use external commands I have used this approach here:

The benefit is that you can run it in back ground job.

Do you need to get data from the PC to SAP ?

Do a google using search operators:

site:scn.sap.com JCO

Can you modify the java program code ? do you know Java ?

Regards. 

10 REPLIES 10
Read only

matt
Active Contributor
0 Likes
1,975

Do you have the possibility of amending the Java program?

Read only

0 Likes
1,975

In which way should I be able to amend it?

Read only

matt
Active Contributor
0 Likes
1,975

If you can't amend it, then there's only one solution cl_gui_frontend_services=>execute, If you can, then you can use all kinds of connection technologies - it depends how secure you want things to be.

Read only

0 Likes
1,975

As said above, that's the solution we've decided since the other one brougth a security gap in our architecture.

Thanks for your helping.

Santiago.

Read only

SantiMoreno
Participant
0 Likes
1,975

Hi Again.

I've found an alternative to execute the program (but I don't know whether it's secure).

It consists on launching the command with cl_gui_frontend_services=>execute, passing java as the command and the rest of the calling parameters as a string in parameters.

Have any of you ever tried this?

Kind Regards.

Santy.

Read only

rosenberg_eitan
Active Contributor
0 Likes
1,976

Hi,

There is also a way to use external commands I have used this approach here:

The benefit is that you can run it in back ground job.

Do you need to get data from the PC to SAP ?

Do a google using search operators:

site:scn.sap.com JCO

Can you modify the java program code ? do you know Java ?

Regards. 

Read only

0 Likes
1,975

Hi Eitan.

Answers to your question:

- Yes, some data read from the serial port got to be sent back to SAP.

- No, cannot program Java by myself but got a programmer with me.

Anyway, we've made some tests encapsulating the Java command (with all the parameters) in a .bat file at OS level, and it's working properly.

Kind Regards.

Santiago.

Read only

0 Likes
1,975

Hi,

Just curious....

How the data is getting into SAP ?

Ask your Java programmer to look into SAP JCO (Looks good.....)

regards. 

Read only

0 Likes
1,975

Just with a RFC call that populates one table... as simple as that...

in fact, we're using SAP Jco itself for invoking the RFC call.

Kind Regards,

Santiago.

Read only

0 Likes
1,975

Very nice !!!!.....