Skip to content

This is Part 2 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, as well as generating sample XML documents based on those schemas. In this post we will walk you through executing the Material Availability BAPI and the Get Customer RFC. The steps here require you to have completed the steps in Part 1 of the series.

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

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

Using the Neuron ESB SAP Connector – Part 4: Sending IDocs

Executing a BAPI on SAP

In Part 1 you imported the schema and sample XML for executing the Material – Availability BAPI on SAP. You can use this sample XML to test the BAPI call. 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 BAPI_MATERIAL_AVAILABILITY_BAPI_MATERIAL_AVAILABILITY 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 Sematic to Request 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 request message you have to set some of these fields:
    • <MATERIAL>100-100</MATERIAL>
    • <PLANT>1000</PLANT>
    • <UNIT>ST</UNIT>

All of the other elements can remain nil or you can delete them. If you choose to delete them, you must leave the parent elements like <MATERIAL_EVG>, <WMDVEX> and <WMDVSX>. This would be the minimal XML that you can send:

<BAPI_MATERIAL_AVAILABILITY xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://Neuron.Esb.Connectors.SAP/BAPI/BUS1001/AVAILABILITY/BAPI_MATERIAL_AVAILABILITY">
<MATERIAL>100-100</MATERIAL>
<MATERIAL_EVG></MATERIAL_EVG>
<PLANT>1000</PLANT>
<UNIT>ST</UNIT>
<WMDVEX></WMDVEX>
<WMDVSX></WMDVSX>
</BAPI_MATERIAL_AVAILABILITY>
  1. Click the Send button. Once the call completes, navigate to the Receive tab. You should see a response similar to this:
Neuron ESB Test Client

Note – this example expects the SAP demo data to be installed. If you do not have the demo data, you will need to set the Material, Plant and Unit values to valid values for your SAP implementation.

Executing an RFC on SAP

You previously imported the schema and sample XML for executing the SD_RFC_CUSTOMER_GET RFC on SAP. You can use this sample XML to test an RFC call.

  1. In Neuron ESB Explorer, navigate to Repository->XML Documents. Select the document SD_RFC_CUSTOMER_GET_SD_RFC_CUSTOMER_GET 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. If you already have an instance of the Test Client started and connected with the Party Id TestPublisher, skip to step 4. Otherwise, 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 Sematic to Request 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 request message you have to set one of these fields:
    • <NAME1>K*</NAME1>

All of the other elements can remain nil or you can delete them. If you choose to delete them, you must leave the parent <CUSTOMER_T>. This would be the minimal XML that you can send:

<SD_RFC_CUSTOMER_GET xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://Neuron.Esb.Connectors.SAP/RFC/SD_RFC_CUSTOMER_GET">
<KUNNR></KUNNR>
<NAME1>K*</NAME1>
<CUSTOMER_T></CUSTOMER_T>
</SD_RFC_CUSTOMER_GET>
  1. Click the Send button. Once the call completes, navigate to the Receive tab. You should see a response similar to this:
Neuron ESB Test Client

Note – this example expects the SAP demo data to be installed. If you do not have the demo data, you will need to set the Name1 value to a valid value for your SAP implementation.

To see how to receive IDocs from SAP, check out the third part to this series – Using the Neuron ESB SAP Connector – Part 3: Receiving IDocs

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...