If you use the businesstobusiness add-on of SAP NetWeaver Process Integration / SAP NetWeaver Process Orchestration in order to connect to your business partners and networks, you may benefit from the latest enhancements that we have shipped with SP02 of the B2B add-on, see announcement in blog B2B Add-on SP2 released. Also refer to SAP note 1911897 and B2B Release Notes SP2 on help.sap.com.

In the current blog series, I would like to focus on the improvements that we have introduced helping you to better monitor and track your B2B business transactions. Besides new capabilities that have been shipped within the local monitors of PI, we have introduced a new central monitor with SAP Solution Manager 1.0 SP10, the so called Message Flow Monitoring, which provides you an end-to-end insight into the correct closure of your A2A and B2B conversations.

The blog series is divided into three parts:

  1. I will introduce the new features along a typical B2B scenario. In the first part which is covered in this blog, I will describe the business scenario. I won’t go in detail, I will only describe that much that is required to understand the monitoring features that I will introduce in the other two parts of the blog series.
  2. In part 2 of the blog series, I will show you how to monitor the scenario by means of the local monitoring tools.
  3. In part 3 of the blog series, I will show you what value the new Message Flow Monitoring of SAP Solution Manager will add.

Order to Invoice B2B Scenario

A trading partner sends you an EDI bulk message containing multiple EDI 850 Purchase Orders. You have agreed with the partner to use the AS2 protocol. Within your PI system you split the bulk message into individual orders, and forward them to your backend system. Once you have processed the orders in your backend system, you send corresponding EDI 810 Invoices to the partner.

For all messages that you exchange with your partner, the AS2 protocol mandates to return a Message Disposition Notification (MDN). The MDN is a technical acknowledgment indicating that the message has been successfully received by the receiving party, and that the receiving party has verified the integrity of the data exchanged.

To confirm the receipt of the EDI 850 and that the order was syntactically correct, you return an EDI 997 Functional Acknowledgment to your trading partner. The same applies to the EDI 810 that you send to your trading partner. Here you expect that your trading partner confirms the receipt via an EDI 997. See also blog about 997 FA (Functional Acknowledgement) Status Reporting in SAP PI 7.31 B2B add-on.

The sequence diagram in figure 1 below shows how this scenario is implemented in PI

01_01_Scenario.png

Figure 1: Business scenario as sequence diagram

We have configured the following Integration Flows in the Process Integration Designer perspective in the SAP NetWeaver Developer Studio:

01_02_IflowList.png

Figure 2: List of all Integration Flows

Integration Flow #1 (see figure 3) receives the bulk message via AS2 protocol, and routes the original message to the EDI separator adapter on PI outbound (receiver channel). Upon successful receipt of the 850 bulk message, the AS2 sender adapter signs the MDN and returns the same to the trading partner. The EDI separator receiver adapter creates a 997 FA and routes it to the EDI separator adapter on PI inbound (sender channel) of Integration Flow #3 (see figure 5). Furthermore, it splits the 850 bulk into individual 850 purchase orders, and routes them to the EDI separator adapter on PI inbound of Integration Flow #2 (see figure 4).

/wp-content/uploads/2014/01/01_03_iflow1_bulk_367805.png

Figure 3: Integration Flow #1 – receiving bulk 850 message

Integration Flow #2 (see figure 4) receives the individual 850 orders. In the EDI separator sender adapter, the EDI 850 order is transformed into an XML representation of the 850. Depending on a routing condition, the message is sent to different backend systems. In our case, the lower path is taken. The message is mapped to the respective inbound interface and routed to the backend system via ABAP proxy.

/wp-content/uploads/2014/01/01_04_iflow2_order_367806.png

Figure 4: Integration Flow #2 – routing the single orders to the backend system

Integration Flow #3 (see figure 5) routes the 997 to the trading partner via AS2 protocol. The trading partner confirms the receipt of the 997 with returning an MDN.

/wp-content/uploads/2014/01/01_05_iflow3_997_367807.png

Figure 5: Integration Flow #3 – routing the 997 FA to the partner

Once the order has been processed in the backend system and a corresponding invoice has been created, the invoice is sent via ABAP proxy to PI. Integration Flow #4 (see figure 6) maps the invoice to 810 XML, and routes it to the trading partner. In the AS2 adapter, the 810 XML is transformed into EDI 810. The trading partner confirms the receipt of the 810 with returning an MDN.

/wp-content/uploads/2014/01/01_06_iflow4_invoice_367808.png

Figure 6: Integration Flow #4 – routing the invoice to the partner

Integration Flow #5 sends the MDN from the partner to a file share (optional, not captured in swim lane).

Integration Flow #6 sends the 997 from the partner to a file share (optional).

Now that we have understood the business scenario and how it has been implemented in PI, let’s continue with part 2 of the blog series where I show how to monitor the scenario within the local monitoring of PI.

To report this post you need to login first.

11 Comments

You must be Logged on to comment or reply to a post.

  1. John Pawski

    Alexander,

    Do you happen to know if the B2B capabilities are an additional plug-in and require additional license fees?   It seems it is something that would “dovetail” with PI and then could aid in a Process scenario, maybe special orders, exceptions or hand-off from the process it self.   Please let me know.   Thx

    (0) 
  2. Ryan Crosby

    Hi,

    I have a question regarding the validation that is performed when the option for “receipt and validation” is selected with the TPM.  We are testing out a scenario where we have a mandatory field missing from the partner side but we are still getting an “accepted” response within the 997.  Does the system not wait to ensure that any mapping has completed successfully and that an IDoc (in this case) has been posted to the back end system?

    Ryan

    (0) 
    1. Piyush Gakhar

      Hello Ryan,

      B2B Add-On does syntactical validation on the incoming EDI messages against the runtime rules (.b2b files). If any mandatory field is missing, it should generate a 997 (as per specifications definition). But mapping and ERP posting is independent of 997 generation. Please check from EDI content Manager if that field is defined as mandatory. It should work. In case you still face issues, raise an OSS ticket with SAP.

      Please make sure if you are on latest Service Pack and patches.

      Regards,

      Piyush

      (0) 
      1. Ryan Crosby

        Hi Piyush,

        Thanks for the reply.  I did find that it executes the validations based on the structure defined in the content manager.  We were hopeful that we could execute our own validations as well so we could generate an attachment log via mapping with a full list of errors to send to our partner.  The one thing that we did find is that a custom mandatory field designation did not generate a 997 with rejected status so we raised a message via OSS yesterday.

        Regards,

        Ryan Crosby

        (0) 
  3. Otto Frost

    Hi Alexander,

    Great blog. You should put a link on the help.sap.com pointing to this blog as it was hard to find this blog. Anyone starting to work with B2B should start with this blog.

    Do you have a description on what the following paramters do (with example)?

    ediseparator reciver channel

    Formatting – Indent messages (for me the edifact contrl was pretty printed)

    Formatting – Enable Plain (?)

    Formatting – enable XML (if not checked it does not work but edifact2XML happens on sender side, how does it fit together? )

    Formatting – enable Default (what does this mean?)

    Routing – Route on Error

    Routing –  Create a copy and route

    I’m also wondering about the logic behind converting edifact2xml or xml2edifact. What is triggering the GenericConverterModule to convert in one direction or the other? Is it checking ASMA, payload, if sits in sender or receiver adapter or some other logic?

    Which checks are applied to determine if to send negative or positive CONTRL for edifact? we need the following checks and no other checks

    ************************************************

    -all segments marked M (mandatory) exists

    -format of dataelements is correct

    -number of repetitions of segments/segmentgroups is correct

    -the number of fields within a segment or within a composite data element is correct -the number of segments within UNH-UNT matches counter in UNT

    -number of messages in the interchange matches the counter in UNZ -the separators match the UNA

    -interchangeid matches between UNB and UNZ

    -messageid matches between UNH and UNT

    -interchangeid is unique from sender (duplicate check)

    in alpha numeric fields leading zeroes are allowed,

    but in numeric fields leading zeroes are not allowed

    allowed characters according to ISO 8859-1

    if one or more check fails -> negative contrl

    if all checks ok -> positive contrl.

    ************************************************

    Are these checks available in the b2b addon?

    Best regards

    Otto

    (0) 
    1. Alexander Bundschuh Post author

      Hi Otto,

      for a description of the module parameters, see:

      Configuring Adapter Modules – SAP Process Integration, business-to-business add-on Configuration – SAP Library

      The converter is generic, it checks the payload, conversion is based on EDI header segment

      The following error codes gives you a good indication what kind of checks are carried out:

      Error Codes of 997 FA Message – SAP Process Integration, business-to-business add-on Configuration – SAP Library

      Error Codes of EDIFACT CONTRL Message – SAP Process Integration, business-to-business add-on Configuration – SAP Library

      Regards

      Alex

      (0) 
      1. Otto Frost

        Hi Alex,

        Thanks for the links, I had already found them and studied them carefully. Unfortunately it is still not very clear. Why does the “Formatting – enable XML” has to be checked when sending in edifact?

        I found no docs for

        Routing – Route on Error

        Routing –  Create a copy and route

        can you explain?

        (0) 
        1. Jacob Vandborg

          Hi Alex,

          I’m also very much interested in knowing what ‘Route on Error’ and ‘Create a copy and route’ is doing.

          Best regards,
          Jacob

          (0) 
  4. Klaus Stenbæk

    Dear Alexander Bundschuh

    As others request, could you please let us know the functionality of the check boxes in the Routing section of the General tab on the EDISepatator sender channel. I have not been able to find anything about it online.

    best regards
    Klaus Stenbæk

    (0) 
  5. Alexander Bundschuh Post author

    Hi Klaus,

    sorry, this is missing in the documentation, will be added soon.

    Create Copy and Route will create a copy of the bulk message and will send it to an EDI Separator Sender channel with Message Protocol ‘Copy’.

    Route on Error: whenever an error occurs a copy of the bulk message will be created and it will be sent to an EDI Separator Sender channel with Message Protocol ‘Error’.

    This means that you need an additional integration flow with EDI Separator Sender channel with Message Protocol Copy or Error and a receiver channel that will deal with the message – either send it to the Partner or keep it somewhere on a file system.

    Alex

    (1) 

Leave a Reply