cancel
Showing results for 
Search instead for 
Did you mean: 

Scenario RFC --> PI --> External Web service

Former Member
0 Kudos

Hello Guru's,

I have a scenario with RFC to Web service.  When the Webservices send the back message, we have in the response message the status of the process.

In this response message, we have a code with several possible values :  0 if ok, 1 if one data is not correct, 2 for other error.

How to put the message in error in PI following code not equal to 0. 

For the moment, PI tells that everything is OK, and I can only see the error in SAP Back End. 

Management ask me to generate an error in PI when data are not correct, to have only one point of monitoring.

This is the Service Interface

This the External Definition for the web service :

This is the RFC Definition

The code with the error (or no error) is in the Return Info from the Webservice and in the ET_RETURN.Item for the RFC

Thanks a lot for your Help

Jean-Claude

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jean-Claude,

currently your scenario does perfectly what it is supposed to do, however since the requirement is to stop at PI by throwing an error, (just a thought) try to induce an error in the response mapping, when desired values are not received from the webservice, in your case, if not Zero dont fill a mandatory field or force a similar error.

http://scn.sap.com/community/pi-and-soa-middleware/blog/2007/04/26/xipi-throwing-generic-exceptions-...

Regards

Vishnu

Former Member
0 Kudos

Hello Vishnu,

It works fine. 

I have add a check on the value, and when it's different, I don't fill a mandatoyr field.

Thanks a lot

JC

Answers (2)

Answers (2)

iaki_vila
Active Contributor
0 Kudos

Hi Jean-Claude,

Also you can throw an exception from the message mapping in the response. Check Michal Krawczyk's blog http://scn.sap.com/community/pi-and-soa-middleware/blog/2007/04/26/xipi-throwing-generic-exceptions-...

On the other side, i dont recommend to use the PI to monitor business logic problems. PI is an integrator to communicate systems, the exceptions in PI should to be problems with the communications, data syntax, etc, but the procedure semantic should to be in the endpoint, even the monitor and control of this problems. PI is for technical purposes and only technician should to monitor this enviroment and if for example a material doesn't exists it's useless to derive this information to PI consultant, from my point of view of course.

Regards.

Former Member
0 Kudos

Hello Iñaki,

I agree, but my management ask me to work like this .  I have made some recommandations, and I hope that we can follow this.

On my personal side the problem should me managed on the SAP Backend.

Thanks for your answer.

JC

Former Member
0 Kudos

Hi

In your receiver determination you could use '0' as a condition/requirement to process further to the receiving communication component. At the bottom of the receiver determination you have a section called "If no receiver is found, proceed as follows" where you can choose what to do if the message contains '1' or '2', e.g. an error message.

This is a simple solution, but not sure if it is the best.

regards Ole

Former Member
0 Kudos

Hi Ole,

  The above issue is on the "response" of a "synchronous" call to a WS, so RDet does not play a role here.

Regards

Vishnu