This sample demonstrates two uses of the SAP nodes: a SAP Input node is used to demonstrate a broker inbound scenario and a SAP Request node is used to demonstrate a broker outbound scenario.
The SAPInput node is used to capture information (for example an IDoc) that is output by the SAP system, so that it can be passed to a message flow for processing.
The following figure shows the SAP Inbound message flow used in this sample.
In this sample message flow, a message is received by the SapInput node from SAP. The message contains a Material Master IDoc. The received message is passed unmodified to an MQOutput Queue.
The SAP Connectivity sample demonstrates the following tasks:
configuring SAP to define a broker end point (RFC Program ID) configuring the broker SAP adapter to communicate with the SAP system rebuilding a bar file with the newly configured adapter deploying the bar file initiating SAP to output an IDoc for the broker to capture looking at the output data in the MQ queue
The sample provides
The message flow to process the IDoc The message set representing the IDoc structure (MATMAS05) The SAP adapter (needs to be configured to connect to your SAP system before deploying to the broker).
The SAP Request node is used to send information to the SAP system and retrieve the response from SAP. In this sample message flow, SAP Request nodes are used to invoke remote functions in SAP (BAPIs).
The following figure shows the SAP Outbound message flow used in this sample.
A message is sent to the MQInput node containing fields necessary to create a Customer object in SAP.
The first SAP Request node 'Create' invokes a Customer Create BAPI (BAPI_CUSTOMER_CREATEFROMDATA1) and SAP returns the unique identifier of the Customer object created.
The 'Set Update Msg' Compute node uses the returned identifier (customer number) and constructs a message that will allow the new Customer to be updated.
The second SAP Request node 'Update' sends this data to a Customer Update BAPI (BAPI_CUSTOMER_CHANGEFROMDATA1) and SAP sends back a return code.
The 'Set Retrieve Msg' Compute node uses the Customer identifier to construct a message that will request SAP to return the updated Customer object.
The final SAP Request node 'Retrieve' uses this data to invoke a Customer Retrieve BAPI (BAPI_CUSTOMER_GETDETAILS1) and SAP returns the Customer object, which is output to an MQ queue as an XML message.
If there is a problem with the flow the original message header and exception list data are put into an XML message and sent to a failure MQ queue.
Running the example involves the following tasks:
configuring the broker adapter to communicate with your SAP system. rebuilding a bar file with the newly configured adapter. deploying the bar file. putting data to an MQ queue to initiate the flow. looking at the output data in the MQ queue.
The sample provides the following resources:
The message flow to invoke the SAP BAPIs The message set representing the BAPI function call structures The SAP adapter (needs to be configured to connect to your SAP system) Input data for the flow