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: 

Alternative for TCP Socket Communication

Sm1tje
Active Contributor
0 Kudos

Hi All,

we have to connect to an external server (non-SAP) and this server can be triggered by sending a tag stream over a socket connection. We are currently on release 7.40 SP 9 ((SAPKA74009 / SAPKB74009) and I am aware that communication via websockets is now possible. But as far as I can see this is not relevant for my scenario.

And I also know that pure socket communication is possible as of release 7.50. But upgrading now is not an option right now.

So now I'm looking for an alternative approach to get communication from SAP to the external server up and running.

Possible options I came up with are:

  1. Use of middleware; we don't have PI but some proprietary software which takes quite some time to integrate on such a short notice.
  2. Via OS command / scripts; but that seems a bit far fetched to me.

Please, kindly suggest possible options.

Hope to hear from you soon.

Kind regards,

Micky.

1 ACCEPTED SOLUTION

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mickey,

> 1.Use of middleware; we don't have PI but some proprietary software which takes quite some time to integrate on such a short notice.

Let me suggest the SAP Business Connector as one option. Perhaps it can be used here. It is a middleware like PI, but free of charge and more "lightweight". Installation files and documentation can be downloaded from SMP: https://service.sap.com/sbc-download

On the SAP BC you can create custom Java or C/C++ functions which get triggered by RFC calls from R/3 and which perform the direct socket communication with the external server.

Installing and setting up SAP BC for RFC communication with the SAP server is a matter of minutes. Then you need a day or so to learn how custom development can be done on it. Let me know, if you have more specific questions as to how to try a POC.

Best Regards, Ulrich

8 REPLIES 8

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mickey,

> 1.Use of middleware; we don't have PI but some proprietary software which takes quite some time to integrate on such a short notice.

Let me suggest the SAP Business Connector as one option. Perhaps it can be used here. It is a middleware like PI, but free of charge and more "lightweight". Installation files and documentation can be downloaded from SMP: https://service.sap.com/sbc-download

On the SAP BC you can create custom Java or C/C++ functions which get triggered by RFC calls from R/3 and which perform the direct socket communication with the external server.

Installing and setting up SAP BC for RFC communication with the SAP server is a matter of minutes. Then you need a day or so to learn how custom development can be done on it. Let me know, if you have more specific questions as to how to try a POC.

Best Regards, Ulrich

0 Kudos

Hi Ullrich,

thanks for the quick reply. Indeed, this would be an option, haven't thought of that before. On the downside, that would involve some Java / C/C++ developments. That might be an issue.

Micky.

0 Kudos

Hi Mickey,

> On the downside, that would involve some Java / C/C++ developments.

Will something like this not be unavoidable in such a case? This is a very specific low-level requirement, and since the SAP system is not able to "speak" to that external server out-of-the-box, some socket programming will be necessary. The easiest case would be, if the external product already comes with some kind of high-level "client library" that takes care of the low-level byte-shifting. But even in that case you would need some custom development to use that library and to feed the data from SAP into it.

(BTW: the fact that SAP BC supports both, Java and C/C++, would make it easy to use such a "client library" in SAP BC, if one exists.)

Best Regards, Ulrich

0 Kudos

Hi Ullrich,

I guess you're right about everything you are saying (and I was already afraid of that). But still, that's not what I was looking for in the first place. Probably against better judgement I'm hoping for a solution that doesn't involve these sort of developments. Like, for example, calling such a library straight from SAP.

Thanks again.

Micky.

0 Kudos

Hi Micky,

do you have such a library? And is there maybe even some online documentation available for it (or for the external server itself) that I can take a look at? Perhaps I can give more detailed tips, if I can take a look at what actually needs to be done in order to establish communication with that external system.

Regards, Ulrich

0 Kudos

Hi Ullrich,

We don't have any library yet, but I can ask the supplier if such a library is available. Meanwhile, I do have some documentation myself which I attached. The entire document is a pdf, but I can't attach it to the discussion. So I made a screenshot of the only relevant page which talks about triggering of the unibox.

But it's not very elaborate. All of the Netherlands had a day off yesterday, but I will ask our contact person if some other documentation is available for communication with the unibox, like for example a library (sdk of some sort or whatever).

Kind regards,

Micky.

0 Kudos

Hi Micky,

interesting. Can you also attach page 6?

And it means: the target system is actually outside of your corporate network, so you need to communicate through your firewall. -- That adds an extra level of complexity...

In that case WebSockets would be an option, if the target system supports it. You may also want to ask your Unibox contact about this. (Otherwise a Business Connector installed in the DMZ of your network might indeed be your only option.)

Best Regards, Ulrich

0 Kudos

Ullrich,

the picture in the documentation is a bit misleading. The GLS server is indeed outside of our corporate network, but the Unibox is within it. And that's the server we are trying to communicate with.

Both servers, however, do not support websocket communication.

Attaching page 6 won't do you no good. Paragraph 5 (starting at the top of page 6) is about 'Label dimensions and templates (Unibox returns information about the label we have to print in our warehouse).

Like I said, documentation is not quite comprehensive / elaborate.

Regards,

Micky.