Skip to Content
Technical Articles

Send test AS2 message to SAP PO via POSTMAN application

Introduction

Imagine you have developed an integration flow in SAP PO and when you move forward to do unit testing in development environment, you got to know that the sender system is not able to send messages to development environment (Sometimes Banks can’t send messages to development environment) as well as you are not authorized enough to use SAP PO test tool. In that case we try to mimic sender systems and send the messages on our own using different tools depending upon the sender adapter which we have used in our integration.

I will try to explain how we can use POSTMAN tool to send AS2 messages to SAP PO. Generally, developers use “mendelson as2” tool to send AS2 messages which is good and far better than the method I will explain below but see there are some issues with mendelson as2 tool as well. Main issue is its availability. Free open source version of mendelson tool is available only on sourceforge website and in some client network you are not allowed to download software from there. So let me show you how to send simple test message using POSTMAN tool which we generally use to test REST/API based integration flows.

Main

We need to know how AS2 messages were passed over HTTP. You can refer RFC 4130 for better understanding of AS2 protocol and how they can be transmitted over HTTP. So follow below steps to send AS2 messages to SAP PO using POSTMAN tool.

  1. First we need to find out the URL to which we are going to send AS2 message. It should be http://<host>:<port>/AS2/<PATH>. Here PATH can be replaced by the Expected URL path value you have mentioned in the AS2 sender channel.SAP%20PO%20sender%20AS2%20channel%20using%20HTTP
  2. Then in POSTMAN tool configure the headers like the below snapshot.Postman%20Header%20configuration
  3. Then you can also choose body as per your requirement. You can send EDI messages as files or raw XML.
    Raw XML BodyRaw%20XML%20body
    File bodyFile%20body
  4. Fill in all the fields as per your requirements then press send and you will able to send test AS2 messages to SAP PO system.

 

Conclusion 

For this above method, I have used encrypted EDI message so you need to remove decryption and signature validation from your sender channel. It’s just a simple example to show you that simple tools are also very powerful if you know the underlying protocols correctly. You can try to implement same for encrypted messages as well. You can also implement similar method to send AS2 messages from SAP CPI using HTTP adapter as well (Just kidding SAP CPI has it’s own AS2 adapter).

Every problem comes with a solution so just keep searching for that.

Be the first to leave a comment
You must be Logged on to comment or reply to a post.