Application Development 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: 

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

SantiMoreno
Participant
0 Kudos

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

rosenberg_eitan
Active Contributor
0 Kudos

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

matt
Active Contributor
0 Kudos

Do you have the possibility of amending the Java program?

0 Kudos

In which way should I be able to amend it?

matt
Active Contributor
0 Kudos

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.

0 Kudos

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.

SantiMoreno
Participant
0 Kudos

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.

rosenberg_eitan
Active Contributor
0 Kudos

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. 

0 Kudos

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.

0 Kudos

Hi,

Just curious....

How the data is getting into SAP ?

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

regards. 

0 Kudos

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.

0 Kudos

Very nice !!!!.....