Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

It has been a while since i wrote a blog, had a feeling that i have learnt nothing new to share :), but then, i remember developing an integration
scenario some time back, i believe, is worth sharing.

The UseCase was to validate data entered in a transaction(a Ztransaction) in SAP by interfacing with a third party tool.Sounds like a standard
usecase for XI!!, you may ask, but the interesting part here was that this third party tool had a TCP/IP Socket interface.This third party tool was
a Bank SortCode/AccountNo verification tool, which accepted the BankSortCode/AccountNo details as string input,written to a specific port
on which the Socket Server is listening to.

The Solution: I implemented this interfacing putting to use the S/A bridge mechanism of ccBPM and Java Mapping as the means to connect
to the Socket Server.I had decided to send the details entered in the SAP screen to XI by means of a synchronous RFC call, parse the RFC
request parameters in XI to create the TCP/IP request string, open a socket connection to the third party verification tool, write the request
string to the socket, parse the response from the socket server and send the result of validation back to SAP via the RFC response.The
response time, though not excellent, is acceptable. I used Java Mapping as the means to open the socket connection and talk to the Socket
server.The Java Code goes something like given below(rather something of a pseudocode i would say).

The socket server was capable of giving me an xml response.If that is not your case, then you have to build the xml response using XML
APIs and fit the data returned by the third party tool in it.

An overview of Integration Repository Objects I had Used

  1. Two Data & Message Types, one for the tcp/ip socket request structure & the other for the xml response returned by the third party tool.
    If the third party tool provides the XSD for the xml response returned by the socket server, then you can import it.
  2. Two abstract asynchronous message interfaces, one for the request & other for the response MTs created in the above step. And then an
    abstract syncronous interface with the ouput & input message referring to the request & response message types created in the above step.
  3. Two message mappings, one message mapping will transform the RFC Request XML to the request structure of socket server and the second
    message mapping will transform the socket server response to the RFC response structure to be sent back to SAP.
    • RFC Request Structure -> Socket Request Structure(created in Step 1 above)
    • Socket Response Structure(Created in Step 1 above) -> RFC Response Structure
  4. A Java Mapping that will parse the tcp/ip socket request string from the incoming xml message, send a request to server socket, get the xml
    response and flush the response out as the output of Java Mapping. This is done in the execute method of the Java Mapping where in i had
    access to both the request & response xmls and also by way of Java.net package APIs could make a TCP/IP request.
  5. Two interface mappings.
    • Source interface is the RFC & target interface is the abstract synchronous interface created in step 2 above).Both message mappings
      created in step 3 above will be referred in the request/response tabs
    • Source interface & Target interfaces refer to the request and response abstract asynchronous message interfaces created in step 2
      above. The Java mapping created in step 4 above is used here.
  6. A ccBPM with 3 steps like below,
    • a recieve step(Mode - opens s/a bridge & synchronous interface referred is the one created in step 2 above)
    • a transformation step, the interface mapping specified here will call the Java Mapping program used to send the request to
      socket server and get the xml response.
    • a send step(Mode - closes S/A bridge , the Message reference in this step will refer the output structure of the Java Mapping)

An overview of Integration Directory Objects I had Used

  1. I created a Sender RFC Communication channel under the Business System imported from SLD(the Source SAP system from
    where the request originates).
  2. A quick checklist of what configuration is required in the source SAP system to send the RFC request
    is below.
    • Create an RFC destination(type T) in the SAP system from where you will initiate the RFC request to XI, specify the programid,
      gateway host(your SAP system host name) & gateway service parameters.
    • Create an RFC sender communication channel in your XI integration directory and specify the RFC Server parameters, make sure
      these parameters match what you have mentioned in the above step and activate the communication channel.
    • Try a test connection of the RFC destination created in your SAP system and make sure it is working fine.
  3. The remaining configuration steps are based on what is depicted below in a pictorial form.


  4. Now, if you had noticed, there is no Business System that needs to be registered in SLD for the third party tool. The request originates from
    Source SAP system , the receiver system is your integration process(The transformation step takes care of connecting to the target third party
    tool).

    Now, i think it makes sense of me to mention the names of one or two tools, if you happen to wonder whether there is ever a need for this interfacing
    mechanism. I happen to know atleast two vendors, One is Albany Verify and then there is BankWizard and there could be others.

6 Comments