Skip to Content
Technical Articles
Author's profile photo Fernando Alonso

EDIFACT and SAP ByDesign

SAP Business ByDesign has no “EDI” connectivity, so you need to develop your own piece of software that links between your EDI partner and SAP ByD.

This piece of software will need to do several things. But, first of all, we need to receive and send EDI messages. Today, I’ll try to share a way to get it

Here, you can read how to validate EDI and generate acknowledgements with the EDIFACT message decoder for Azure Logic Apps with Enterprise Integration Pack




Creating your Integration Account:


Some info about limits in each type of Pricing Tier:


When the creation process has finished you receive a message in Azure Portal:

And the integration account is ready:


Creating a Logic App in Azure

We need a Logic App linked with the integration account, to manage EDI messages.

Your Integration Account contains your B2B artifacs, such as trading partners, agreements, maps and schemas.

Remember: Your Logic App contains code to manage messages and needs access to your integration account. Both of them must exist in the same Azure region.

Once your Logic App has been created, you need to link your automation account. Go to Settings by clicking on the name of your Logic App.

Select your Integration Account and Save your workflow settings:

Please, see details on how to manage your integration account link here:

“Now your logic app can use any and all the artifacts in your integration account plus the B2B connectors, such as XML validation and flat file encoding or decoding”


Create Trading Partners

“Partners are entities that participate in business-to-business (B2B) transactions and exchange messages between each other. Before you can create partners that represent you and another organization in these transactions, you must both share information that identifies and validates messages sent by each other. After you discuss these details and are ready to start your business relationship, you can create partners in your integration account to represent you both.”

What roles do partners play in your integration account?

To define details about the messages exchanged between partners, you create agreements between those partners. However, before you can create an agreement, you must have added at least two partners to your integration account. Your organization must be part of the agreement as the host partner. The other partner, or guest partner represents the organization that exchanges messages with your organization. The guest partner can be another company, or even a department in your own organization.

After you add these partners, you can create an agreement.

Receive and Send settings are oriented from the point of view of the Hosted Partner. For example, the Receive settings in an agreement determine how the hosted partner receives messages sent from a guest partner. Likewise, the Send settings on the agreement indicate how the hosted partner sends messages to the guest partner.

Go to your integration account:

and click on Partners button:

We can choose diffent types of qualifiers in Azure Partner definition. We’re going to use DUNS (Data Universal Numbering System), i.e. Partner identification code assigned by Dun & Bradstreet:



Here you can find information about EDIFACT specs to this value:


Create a partner for each company, the selling company and the buying company




Create Agreegements

Here you can find info about creating agreements:

“This article shows how to create an AS2, EDIFACT, or X12 agreement that you can use when building enterprise integration solutions for B2B scenarios by using the Enterprise Integration Pack and Azure Logic Apps. After you create an agreement, you can then use the AS2, EDIFACT, or X12 connectors for exchanging B2B messages.”

“A trading partner agreement helps organizations and businesses communicate seamlessly with each other by defining the specific industry-standard protocol to use when exchanging business-to-business (B2B) messages”

Go to your integration account and select “Agreements”:

Add a new agreement:

We’re going to select “EDIFACT” Agreement Type, but you can use AS2 or X12.

In our case the Host Partner will be the buying Company and the Guest Partner the Selling Company.

Press “OK” and your new agreement will be created:


Working with EDIFACT messages

Go to your logic application:

The Encode EDIFACT message connector doesn’t have triggers, so you must add a trigger for starting your logic app, like a Request trigger. In the Logic App Designer, add a trigger, and then add an action to your logic app.

Select “When a HTTP request is received”, and then press “+ New step”:

Search “EDIFACT” actions:

We select “Decode EDIFACT message by agreement name” action:

Name your connection and select your integration account to enable “Create” button. Press the button to create the action:

A new window is showed:

You need EDIFACT flat file message to decode

In this article you can find some EDIFACT sample messages attached in the demo program:


EDIFACT sample messages


Here you can see an EDIFACT sample message:

In this message, identification type 14 and these are the codes for receiver and sender:

receiver (type 14): 7080000426829

sender (typ 14): 7080000000012

These values must mach with the values you have created in your integration account to identify partners. If you have differente values, you can edit your agreement and change the values:



Some errors with EDIFACT decoding

You can get some errors with EDIFACT decoding. You can find bad messages in your logic app “Runs history” outputs.


Here you can find some valuable information about errors with EDIFACT:

“Invalid count specified at interchange, group, or message levels”


What’s next?

As we said in the beginnig, this piece of software needs to perform a few more tasks (as says John Meadows in this answer)

  • Map data from EDI to SAP friendly
  • Post into ByD (using an appropriate Webservice, probably managesalesorderin)
  • Receive the confirmation from ByD that the order has been created and send the sales order number to your EDI provider.
  • Send to EDI your outputs from ByD (for example shipping status from the appropriate web service)
  • Handle errors


Here, you can find useful information to create saled orders in ByD usign web services to complete the process (thanks Knut Heusermann).




Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo John Meadows
      John Meadows

      Thanks Fernando Alonso for a very informative article.