Skip to content

This is Part 4 of the four-part series on using the new Neuron ESB SAP Connector. In Part 1, we showed you how to set-up the SAP Connector and then use it for importing schemas based on SAP BAPIs, RFCs and IDocs and generating sample XML documents based on those schemas. In Part 2, we showed you how to call BAPIs and RFCs. In Part 3, we showed you how to set-up SAP to send a Material Master IDoc and how to receive it in Neuron ESB. In this post we will walk you through sending a Status update IDoc back to SAP. The steps here require you to have completed the steps in Parts 1 & 3 of the series.

Using the Neuron ESB SAP Connector – Part 1: Setup and Schema Generation

Using the Neuron ESB SAP Connector – Part 2: Executing BAPIs and RFCs

Using the Neuron ESB SAP Connector – Part 3: Receiving IDocs

Modify the Partner Profile in SAP

Sending IDocs to SAP also requires a little setup on SAP. You’ll need to add an inbound parameter to the partner profile previously created.

  1. Modify the Neuron Partner Profile – In the SAP GUI use transaction WE20 to modify the partner profile:
SAP Partner Profiles
  1. Click the green plus to add an Inbound parameter. Set the Message type to STATUS and the Process code to STA1. Save the changes:
SAP Partner Profiles - Inbound Parameters

 Create the Neuron Subscribing Connector Endpoint

  1. In Neuron ESB Explorer, navigate to Connections->Connector Endpoints and click the New button
  2. Set the Name of the Connector Endpoint to SAPIDOCOutboundEndpoint. This Connector Endpoint will be used to IDocs to SAP
  3. Set the Party Id to SAPIDOCSubscriber
  4. Set the Connector to SAPConnector
  5. Set the Mode to Subscribe
SAPIDOCOutboundEndpoint
  1. Click on the Properties tab
  2. Under the category Connection set the properties necessary for connecting to SAP. You will need all the same properties as you set in the first Connector Endpoint:
SAPIDOCOutboundEndpoint Properties
  1. Click the Apply button, then save the Neuron solution. If the Neuron ESB service is already configured to host this solution and is currently running, the Connector Endpoint will automatically start. Check the status of the Connector Endpoint using Neuron ESB’s Endpoint Health monitor.

Send an IDoc to SAP

In the first post of this series you imported the schema and sample XML for sending a status IDoc to SAP. You can use this sample XML to test the IDoc. These steps assume you have saved the previous changes, configured the Neuron ESB runtime to host this solution and started the Neuron ESB Service.

  1. In Neuron ESB Explorer, navigate to Repository->XML Documents. Select the document Idoc_Send_SYSTAT01_SYSTAT01 and click the XML tab. Copy the contents of the XML document. If you want to format the XML before copying, right-click in the text area and select Format.
  2. Start the Neuron ESB Test Client from Start->All Programs->Neudesic->Neuron ESB V3 (<instance name>)->Neuron Test Client.
  3. In the Test Client select TestPublisher as the Party Id and click the Connect button:
Neuron ESB Test Client
  1. Navigate to the Send tab. Set the Topic to SAP.IDOC.Outbound, the Sematic to Multicast and paste the contents of the XML document into the message area:
Neuron ESB Test Client
  1. At this point you have an XML request with no real data in it. All of the elements are empty. Before using this message you have to set some of these fields:
    • Under the element <idoc>:
      • <MESTYP>STATUS</MESTYP>
      • <RCVPRN>T90CLNT090</RCVPRN>
      • <RCVPRT>LS</RCVPRT>
      • <SNDPOR>NEURON</SNDPOR>
      • <SNDPRN>NEURON</SNDPRN>
      • <SNDPRT>LS</SNDPRT>
    • Under the element <idoc><E1STATS>:
      • <DOCNUM>0000000001082755</DOCNUM>
      • <LOGDAT>20150713</LOGDAT>
      • <LOGTIM>133000</LOGTIM>
      • <STATUS>12</STATUS>

Note – the DOCNUM value must match the value of the DOCNUM you received with the material master IDoc in the previous step!All of the other elements can remain nil or you can delete them. This would be the minimal XML that you can send:

 <SYSTAT01 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://Neuron.Esb.Connectors.SAP/IDOC/Send/SYSTAT01/">
        <idoc>
               <MESTYP>STATUS</MESTYP>
               <RCVPRN>T90CLNT090</RCVPRN>
               <RCVPRT>LS</RCVPRT>
               <SNDPOR>NEURON</SNDPOR>
               <SNDPRN>NEURON</SNDPRN>
               <SNDPRT>LS</SNDPRT>
               <E1STATS>
                       <DOCNUM>0000000001082801</DOCNUM>
                       <LOGDAT>20150713</LOGDAT>
                       <LOGTIM>133000</LOGTIM>
                       <STATUS>12</STATUS>
               </E1STATS>
        </idoc>
</SYSTAT01>
  1. Click the Send button. There will not be a response message.
  2. To verify the receipt of the status IDoc in SAP, use transaction code BD87. The default values in the Select IDocs screen will display all IDocs sent today. Click the execute button to see the list. The IDoc you sent earlier will now have a status of 12.
SAP Status Monitor

And that’s it for now!  In this series we demonstrated how to use the Neuron ESB SAP Connector to generate schemas and XML samples, execute functions like BAPIs and RFCs and receive and send IDocs.  As we add more features to the SAP Connector we will build upon this series.

[addtoany]

About the Author

Author's Name
Joe Klug

Solution Architect, Peregrine Connect

Joe Klug is a Solution Architect for Peregrine Connect, responsible for pre-sales engineering, post-sales support, training, architectural reviews, product development and consulting. Prior to joining the team, he spent a number of years at Microsoft.

Read more about Peregrine Connect

articles
  • Rabbit MQ Topics

    Introduction Due to the open-source nature of RabbitMQ and constant updates, it is...

  • Port Sharing

    One of Neuron ESB’s scalability features is the ability to install multiple...

whitepapers
  • The Integration Journey to...

    The Integration Journey to Digital Transformation with Peregrine Connect

  • Saving Time and Money by...

    Neuron ESB Application Integration and Web Service Platform: A Real-World Example...

casestudies
  • Elektro Gorenjska

    Peregrine Connect Eliminates Over 30% of Point-to-Point Integrations and reduces...

  • D&H Distributing

    Modernizing operations integration to increase volume transactions by 2X

video
  • video-icons-wrapper

    Decision Test Data Mapping

    - Use decisions to drive the execution of...

  • video-icons-wrapper

    Map Testing

    Learn how to utilize FlightPath's testing functions...