B2B Capabilities in SAP Cloud Platform Integration – Part 1: SAP Cloud Platform Integration released B2B capabilities (available only with Enterprise licensed tenants) for enabling the B2B customers to securely transfer the EDI documents over AS2 protocol and provision a way to split, validate and convert the EDI documents to XML.

In this three-part blog series,

  • Part 1 focuses on setting up AS2 simulation tool to simulate B2B partners, to transfer EDI message to a simple integration flow developed on SAP Cloud Platform Integration tenant.
  • Part 2 focuses on enhancing the above configured inbound scenario to securely transfer the EDI payload (using signing and encryption) and transform the EDI message to IDoc message.
  • Part 3 focuses on creating an outbound scenario that converts IDoc message to EDI message.


  • You have obtained SAP Cloud Integration tenant with SAP CP Integration, enterprise edition license
  • Message Broker is provisioned on the tenant. Refer the blog to provision a Message Broker.
  • Familiarized with AS2 protocol. For more details refer to the rfc guide

1. AS2 Mendelson Tool Installation:

For simulating the AS2 partners, I would be using the AS2 Mendelson software. You are free to use other tools.

1.Download and install Mendelson from

2. After Installation, you should see AS2 and AS2Stop shortcuts created as shown below

Image1 4168443

3.Click on AS2 to start Mendelson AS2 server.

4.Enter https://localhost:8080/as2/HttpReceiver in your browser and you should see the below message.

2. Configuring Mendelson for simulating AS2 Partners:

In this step, we would be making the necessary configuration required to post an  AS2 message from the mendelson tool to SAP Cloud integration tenant. This would involve simulating a Sender Partner (mycompany) and Receiver Partner (ABCCompany) in the mendelson tool.

2.1 Configuring AS2 Local Station

There should be at least one AS2 partner configured as a local station that acts as an initiator to post the AS2 messages to other AS2 partners.

  •       Run AS2.exe as Administrator

Image3 7055943

  •    In File menu, choose Partner and perform the steps mentioned below:

  • Select Local station (the one with Home icon) and configure the properties. You may retain the default values.

Image5 2324399

  • Choose the MDN tab and enter the MDN URL as https://:8080/as2/HttpReceiver

  • Click “Ok” to save configuration.

2.2   Configuring AS2 Partner

In this step, I am simulating an AS2 Partner called ABCCompany in the Mandelson tool. To test the connection between mendelson tool and SAP Cloud Integration tenant, the initial configuration does not include any security features (i.e. No Signature, No encryption ).

  • Choose mendelsontest and click on Clone to simulate a new AS2 partner ( mendelsontest0)

Image7 2017427

  • Edit the newly created partner. Here I have changed the partner name to ABCCompany.
  •     Configure the basic properties like Name and AS2 Id

  •     Configure Security settings as shown below

Image9 9756795

  •       Configure Send settings as shown below.

Receipt URL: /as2/as2

Payload subject: SimpleAS2

Payload content type: Application/EDI-X12

Note 5669302NOTE:  The Runtime URL can be obtained by connecting to the operations URL in the eclipse or through the Welcome Mail sent from SAP.

Image13 7244531

  •        Configure MDN settings as shown below

  •            Configure HTTP Authentication to post the AS2 messages on to Cloud integration tenant . The tenant does not accept any inbound messages coming without the authentication.

The user who has been assigned the ESBMessaging.send role on tenant iflmap application has to be mentioned in the Username field and provide the corresponding password of the user.

Image15 7883355

  •           Configure proxy settings ( Optional )

If you are getting connection timeout error after all the settings are done, it may mean that you need to configure the proxy .

Navigate to File->Preferences and set the proxy value as shown below.

Image17 7147021

Note 1 8091570More details about different AS2 headers can be found in the AS2 rfc guide

2.3   Import SSL certificate from SAP Cloud Platform Integration Tenant to Mendelson tool

This step is required to securely post the AS2 message from mendelson tool to SAP Cloud integration tenant.

NOTE: You need to have the AuthGroup.Administrator , AuthGroup.BusinessExpert ,AuthGroup.IntegrationDeveloper roles assigned to the user  on the tmn application.

Image19 9474423

For more details on task related roles, Refer SAP Cloud Platform Integration Documentation

Perform the below steps to import the root certificate:

1.Logon to Tenant Web UI URL .

2.Navigate to Monitor -> Key store.

3. Download the Root certificate as shown below

Image21 1681160

4. Import the root certificate on to the mendelson tool

a) In the mendelson tool navigate to File->Certificates -> SSL/TLS

b)  Click on Import Certificate

Image23 1093043

c) Browse the downloaded certificate and Click on Import

d) Check “Show root certificates” to view Root certificate

Image25 2333931

NOTE: Incase if the above step is not performed, you would get the SSLHandshake error as shown below.

Image26 3493469

3: Create a Simple AS2 Inbound Integration Flow

3.1 Configure and deploy a simple AS2 Integration flow

  1. Create a simple integration flow with AS2 Sender and SFTP Receiver to receive Bulk Orders pushed from the mendelson tool and post it onto SFTP receiver.

2. Configure AS2 Sender adapter as shown below.

Image28 1312429

Keep other properties related to Security, MDN and Retry to the default values.

3. Save and Deploy the integration flow

4.Check the status of the integration flow by navigating to Monitor->Manage Integration Content.

Note 3 7921199NOTE: Sometimes, Integration flow may fail after deployment with the error saying “No runtime nodes have started for this tenant”. Refer the KBA article 2520573  for the cause and resolution of the issue.

5. A Message queue named after the integration flow is created under Monitoring->Manage Stores->Message Queues.

Image31 5132815

 4. Testing a simple AS2 message post from Mendelson to SAP Cloud Integration Tenant 

1.In the account cockpit page, assign the Send role to the user on the iflmap application as shown below. This user is same as the user that we configured in mendelson tool for HTTP Authentication.

2. In the Mendelson tool, Choose File->Send File to partner

Image33 1095368

3. Choose ABCCompany from the Receiver dropdown and select a ANSI X12 message in the file name and click OK

4.You should see a successful message in the mendelson tool as shown below

Image35 2695888

5.Double click on the message to see the message that was sent and the MDN received back.

6.On the tenant, Navigate to Monitor Message processing to see a Completed message with an MPL attachments (MDN Attachment )

Image37 6502338

Take away:

We have learnt on how to install and configure Mendelson tool to post AS2 message to  SAP Cloud Integration Tenant. We have also created a simple integration flow with AS2 Sender to receive messages from mendelson tool.

In the next part of this blog series, I would extend this simple AS2 inbound scenario to post AS2 message securely ( with Signing and Encryption ) and use the EDI Flow steps to transform the ANSI X12 bulk payload to split, validate and convert to IDOC document.