‎2009 Oct 23 8:28 AM
Hi,
Is there any method of TCP socket programming in ABAP? For example is there any function module for creating a socket for a IP address and port number. After that, is it possible to send binary/text data to a connected IP/port destination. I need such a solution because I need to send raw data (native commans) to barcode printer on our network which has a static IP address and listens incoming data through a fixed port number specified in its documentation. For a solution, I coded some .NET VB and built a small application that acts as a RFC server program which can be called by SAP according to definitions I made in SM59 (I defined a new TCP connection and it works well sometimes!). In this application, data coming from SAP are transferred to the barcode printer. This is achived by the .NET Socket class library. This solution works well but after a few subsequent call from SAP, connection hangs! SAP cannot call the application anymore, I test the connection in SM59 and it also hangs, so I need to restart the VB application, but this is unacceptable in our project.
As a result, I decided to code the program that will send data to the printer in ABAP as a function module or subroutine pool, so is there any way to create a socket in ABAP and connect to specific IP/port destination? I searched for possible function modules in SE37 and possible classes in SE24 but unfortunately I could not find one. For example, do know any kind of system function in ABAP (native commands executed by CALL statement), that can be used for this purpose?
Love,
Jerome
‎2009 Oct 28 9:04 AM
‎2009 Nov 11 12:48 PM
Hi,
I have no idea technically but I heard something like CPI-C interface in SAP. May be you can give it a try
Regards,
Murali
‎2010 Jan 11 6:55 PM
Did you ever find a solution to your problem? I have a similar need. I have a mobile device that I need to communicate with via TCP/IP utilizing the command format specified by the device. I would like to write an ABAP application to handle this communication. Handling the interface to SAP from within the ABAP application shouldn't be a problem. Any help would be appreciated!
‎2010 Jan 12 12:07 AM
Hi,
I guess that top open low level network connection in ABAP is not possible. If you have a look at TCP/IP connections in SM59 you can see that it always call some external program. So I guess you need to develop/install some utility and call it from SAP for example by using OS commands (SM69).
Cheers
‎2010 Jan 12 1:14 PM
Thanks so much for taking the time to respond. Your answer reinforces what I have been seeing as I have investigated this. It is unfortunate for me in my situation but I will just have to find another avenue.
Thanks again for taking the time to share your knowledge, much appreciated!!
Norm