cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP Adapter - Unusual error returned ?

Former Member
0 Kudos

Hello All, In my scenario,

SOAP Client (soap call)> XI (RFC)> R/3 backend

which is synchronous all the way there & back, I get the correct data back when I enter the correct input in the SOAP request's variable parameters that the R/3 backend expects. It expects a number.

Now if I enter a string instead, I get the error at the bottom "NO_MAPPINGPROGRAM_FOUND".

Does anyone know why it would be such an unusual error ? Why am I interested, so I can return a more relevant error that will clearly tell the caller what they should be using (good programming). Any way to intercept errors before returning them ?

(If I go into the R/3 backend screen directly and type "my_string", I get the error 'Notification MY_STRING does not exist')

Also 3 messages appear in MONI as opposed to just 2 when the input is correct. Any idea why ?

The second message contains the correct error in it's Main payload (can't interpret string as a number). The 3'rd message contains this 'no mapping program found' error and it's the one that is returned to the SOAP client.

It's a z fm I'm using in the backend.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- Request Message Mapping

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">

<SAP:Category>XIServer</SAP:Category>

<SAP:Code area="MAPPING">NO_MAPPINGPROGRAM_FOUND</SAP:Code>

<SAP:P1>urn://maptest MI_POC_RFC_WS_RR</SAP:P1>

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>Unable to determine name of mapping program</SAP:Stack>

<SAP:Retry>N</SAP:Retry>

</SAP:Error>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Like you said, the RFC expects a number. But since you are specifying a string, the RFC is throwing an error/exception.

When the exception is passed as a negative response to XI, there is an error.

This is because, XI synchronous interface is expecting a response message and not a error/exception message.

Try providing a fault message in the rfc synchronous interface. This way, the fault message/exception received from the R/3 would be displayed in the client.

Looking at the response of the rfc request, in moni, will give you the actual error/exception returned by the rfc.

Regards,

Smitha.

Former Member
0 Kudos

Hello All, Thanks for your inputs. The problem remains. I have refreshed the cache, ensured quality of service is 'Best effort' SOAP sender adapter, ensured a fault type exists, ensured the return portion of the message is getting mapped correctly, ensured that the map works correctly when I test it independently within ID etc.

Nonetheless, I believe you guys are correct in that the sync call is not being able to populate the error from r/3 into the fault message and hence it complains 'no mapping program found'. The problem is I don't see the place where such a map can be inserted.

So to simplify the problem, here's what I need to find out now:

I have a sync interface with a fault message in it.

The maps I have, 1) map the request MT to the backend r/3 and 2) map the r/3 response to the response MT. I have not specified anywhere how the 'fault' MT will be populated.

Q1: Do I need to ? (or is this usually done automatically by XI).

Q2: If yes, where would I do this ?

Thank you.

Ciao, Bhishma

stefan_grube
Active Contributor
0 Kudos

Try to change and reactivate your mapping. If this does not help copy your mapping program to a new name and assign the new one in ID.

Regards

Stefan

Former Member
0 Kudos

In researching this problem of 'mapping the backend r/w error back to the fault message in a sync interface', I have come across the following blog on the topic.

/people/sap.user72/blog/2006/01/16/xi-propagation-of-meaningful-error-information-to-soap-client

In it Naveen replies to Matthew (in the q&a section at the bottom), "if the RFC has a defined exception as simple as Application Exception, when you import the rfc into xi, it generated rtc.exeception. you can use this for mapping with FaultMessage".

I checked out the RFC I'm calling in r/3 and it does not have any entries in the 'Exceptions' tab. In fact, I could not find any exceptions being thrown even in the SAP standard RFCs and I randomly checked around 10 of them. Post the import, the Request & Response drop-downs while viewing the imported RFC MT, have objects present within them, but the Fault drop-down is empty.

The only RFC from SAP that I found an entry in the exception tab was 'RFC_RAISE_ERROR' (not surprising).

Any ideas on how to report errors from these standard RFC's back to XI ?...or does xi report 'no mapping program' error back on all these rfc's when they throw an error !

Ciao, Bhishma

Former Member
0 Kudos

So when I imported 'RFC_RAISE_ERROR' into XI, it shows an object within the 'Fault' drop down; fantastic !

Then I did a mapping for the RFC exception object to the XI fault msg in the response MT.

The corresponding Interface Mapping also nicely produces a 'Fault' tab then once I click the 'read interfaces' btn.

Hence I believe this is where the source of my problem lies; the RFC I'm calling does not have entries in the 'Exceptions' tab in SAP.

So the last question in the chain then is:

Does anyone know how to catch an error being thrown by a RFC if it does not have any entries in the 'Exceptions' tab in SAP ?

Ciao, Bhishma

moorthy
Active Contributor
0 Kudos

Hi,

if you want to get the ApplicatioN Error, then it should be populated by RFC in the Exception structure,. or warp it with BAPI for the validations and send the response

But if you want any Adapter level errors etc, you can set up alerting for the adapters.

Rgds,

Moorthy

Answers (3)

Answers (3)

STALANKI
Active Contributor
0 Kudos

Have u checked this one out?

https://weblogs.sdn.sap.com/pub/wlg/3408. [original link is broken] [original link is broken] [original link is broken] [original link is broken]

Check ur mapping.It is the problem with ur mapping.

Former Member
0 Kudos

Yes, we observed this kind of problems before. Mostly because of inconsistency in the versions of objects. We did the full cache refresh but it started working fine only after retstarting the J2EE engine. I didnt understand why we need to restart, but hey , it worked.

--Archana

moorthy
Active Contributor
0 Kudos

Hi,

1) check the Quality of Service of the SOAP request. It should BE

as it is a sync call

2) test the mapping independenlty with the data from SXMB_MONI in the integration repositroy

3) Refresh the cache in SXI_CACHE

4) Also go to Cache Notifications under RWB and check it

Hope this helps,

Regards,

Moorthy