cancel
Showing results for 
Search instead for 
Did you mean: 

Carryout validations in PI and return errors to sender from PI itself

Former Member
0 Kudos

Hi,

I have the below requirement. File adapter is used to pick the goods orders etc from various vendors and PI has to perform various validations like vendor exists or goods in stock etc in PI itself. Then if any errors like vendor does not exist results, the error needs to be sent to the sender back may be in a file format again. Any erroneous orders must not reach R3 at all.

For this, I am planning to use RFC lookups in mapping to carryout the validations. But when an error like vendor does not exists occurs, how do i send the error back to the sender assuming that I have the proper error format defined in data types and message types already. Is it possible to raise exceptions from with in the mapping and use the exception block to create the error message and send it back to sender?

Please advice me with the best possible solution for this. Thanks in advance.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

There is one alternative -

Use the Extended Receiver determination feature here .

There would be mapping which is between your source input structure and the SAP defined type'Receiver Determination'.Perform RFc lookups to check your validations and based onthe response from the RFC,route it to the sender system or the receiver ECC.

What is it that you are planning to use on the ECC side - RFC/Idoc/Proxy ? If it is proxy then you can do the whole set of validations in the inbound proxy side and send back the error format data in the form of another abap proxy to XI which finally routes it back to the sender system

ie

File - > XI -> Abap proxy(this does the validations,incase of invalid data,send it back to XI)

ie

Erroneous data(proxy)- > XI ->file

Hence,internally you would have two scenarios.

If you could

Regards/Priyanka

Former Member
0 Kudos

Let me check those blogs. Thanks

justin_santhanam
Active Contributor
0 Kudos

Good! Go ahead with the references provided above. If you have any queries do reply back.

raj.

Former Member
0 Kudos

Hi !

You can use BPM to receive the files, make sync lookups to R3 for validation/verification and if all is ok, send the data to R3 via RFC, if not, send a message to a FILE.

Maybe you also can do it without BPM, with multimapping, that is a mapping program that receives 1 message type and outputs 2 different message types, one for an RFC (data is good) and one for a file (data has errors).

Check this out:

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

Regards,

Matias.

Former Member
0 Kudos

Hi,

This is nice scenario, here you could either send the mail notification and revert back the response with the help of BPM or define the Alerts for it and intentionally fail the interface if the vendors will not be validated.

For e.g. Suppose if the vendor is validated you could process it further to the interface. If in case the vendor validation is failed you could raise smart exception to fail the scenario. thus in Alert Notification you could trace it and send the notification. If you need to send the details as response of Synchornous scenario then you need to handle it with BPM, here the logic will be to catch that smart exception and pass it as response through BPM.

Refer below links, it will help in some of above steps

SAP Network Blog: Throwing Smart Exceptions in XI Graphical Mapping

/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping

SAP Network Blog: XI/PI: Throwing Generic Exceptions from any type of Mapping

/people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping

SAP Network Blog: Property File: A Smart use in XI context.

/people/sap.user72/blog/2006/06/07/property-file-a-smart-use-in-xi-context

Thanks

Swarup

justin_santhanam
Active Contributor
0 Kudos

SVK,

Are u using BPM to achieve this?

raj.

Former Member
0 Kudos

Hi Raj,

I am ok to use BPM for this.

Former Member
0 Kudos

Hi Swarup and Matias for the immediate replys. I would try these option and go ahead. Would definetly reach you guys again if I need any more help.

Thanks.