How can I stop delivering a SAP PI/PO message if it will be empty?

Facebooktwittergoogle_pluslinkedintumblr

In some cases, you are able to determinate if the message should be delivered before it is mapped. It is the case if you have to perform a validation for each line if it has some specific property. If you can do an XPath to validate if the message contains valid line items it is best to do in the Receiver Determination step.

 

There are three ways to do it.

  1. Have an advanced receiver determination which is a message mapping. Here you can select which end system the message should be delivered to. Then it will only be run if that system is filled out. So you can perform the same filtering there. If your lookup is costly you will have to perform it multiple times so it is not recommended.
  2. You map the document normal way. Then you sent it into another ICO with the SOAP adapter. In the second ICO, you can then use a normal receiver determination to validate if the message is there if it is delivered to the receiver otherwise to end the message.
  3. Make a multi-mapping. You will need to the the original message as 0:1 and then you add a dummy message as 0:1. If you get enough valid lines you fill in the root element for the original message. If not you only fill end the dummy. The dummy message will then need to be delivered to some dummy system either a file /dev/null or just save it somewhere else.

Do you have any other questions regarding SAP Integration? Please, join my FREE weekly QA session. Just go to http://figaf.com/qa

Facebooktwittergoogle_pluslinkedintumblr

Comments are closed.