cancel
Showing results for 
Search instead for 
Did you mean: 

Get the Error-Message-Number from RFC to SOAP

Former Member
0 Kudos

Hi All,

we have implemented a synchronous SOAP-Call to RFC over XI. How can I get the message-number from the raised exception in the RFC-function Module to the SOAP-Caller?

Thanks a lot

Matthias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Naveen,

thanks a lot. This means, that all logical error don't raise any error. Only the Bapi-Structure will be filled. The SOAP-Caller has to check the Bapireturn-Table to get any errors?

Is this quit ok?

Thanks a lot

matthias

Former Member
0 Kudos

Hi Matthias,

Yes, this is a standard design pattern. Soap user has to check bapireturn for any errors.

We have many scenarios in production with this pattern.

Bye,

Naveen

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Naveen,

I've implemented the BAPIRETURN-Table with the errors. After Import in XI there was'nt any rfc.exception-structure.

thanks a lot

matthias

Former Member
0 Kudos

Matthias,

For you to have an exception structure when an rfc is imported into Xi, the rfc should have an exception defined. Usually we define an ApplicationError as one of the exceptions.

The idea is that if there was an exception which you didnt handle in your rfc (BAPI return will be emplty), the exception will be returned to XI and shown in SXMB_Moni as hard error(of course there should be a message mapping avaliable in XI )

In all the other cases, since you are populating BAPIReturn which is tables parameter, you should be able see the filled structure in your response message from RFC.

Regards,

naveen

Former Member
0 Kudos

HI,

if you define BAPIRETURN as tables parameter in your RFC, you could fill this structure with any errors in the RFC. When you import RFC into XI, XI generates an exception message for the BAPIRETURN, usually its RFC.Exception.

In XI you could then map RFC.Exception to your fault message in INterface mapping.

Hope it helps,

Naveen