cancel
Showing results for 
Search instead for 
Did you mean: 

Error in HTTP to RFC secnario

Former Member
0 Kudos

Hi,

Hi,

I am working on a HTTP-RFC scenario. The bapi that I am using is BAPI_PR_GETDETAIL. If I send a PR number from my HTTP client, I am supposed to get the details of that PR as my response. But I am getting this error: "<SAP:Category>Application</SAP:Category>

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

<SAP:P1>com/sap/xi/tf/_MM_PRGETDETAIL_RESPONSE_</SAP:P1>

<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>

<SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>

. I crossed checked my mapping, its perfect. Can anybody tell me if I am going wrong anywhere else? If yes, where might it be?

Cheers,

Nidhi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Praveen,

The PR we are using is an existing one and we have tested it at back end also.

former_member181985
Active Contributor
0 Kudos

Hi,

Can you give the PR number which workd in R/3 system(SE37)

Check the size of PR number in R/3 system, i guess it should be 10 digits.

Assume if you are giving a PR number as 123456789 from XI on behalf of HTTP Sender, then prefix a ZERO i.e., PR number should be 0123456789 from HTTP request.

I hope this will solve your issue.

Thanks,

Gujjeti

Edited by: Praveen Gujjeti on May 7, 2008 9:33 AM

Former Member
0 Kudos

Hi Praveen,

Your suggestion has solved my problem. Thank you. But I am wondering why was I getting mapping error for this. Let me know about this, if there is any reason behind it.

Points awarded!

Thank you

Nidhi.

former_member181985
Active Contributor
0 Kudos

Hi,

I faced this issue during my initial days of learning XI.

Even if you give a correct PR number without correct no. of digits it wont be converted to a PR number prefixed by zeros since it is a remote functional call. However when you exeucte the same in R3 system(SE37) it internally gets prefixed with zeros and gets executed.

And the R3 system says PR number doesnt exist returning the error message structure. Since you have done mapping case only for success case your scenario fall into a mapping error.

As I said earlier you have to use a proper if else combination with exists function for the two root message structures(detail and return) on the bapi response to httpresponse. This is a good practice since your scenario is synchronous atleast the end user will know the PR number is incorrect. Of course you can add your own custom message when it returns error structure.

Thanks,

Gujjeti.

Answers (6)

Answers (6)

sumesh_k2
Participant
0 Kudos

Hi Nidhi,

Are you using an XSD from Http client. May be XSD had validation on PR number for length = 10.

former_member187563
Contributor
0 Kudos

hi nidhi,

There is some exception during the execution of your mapping program.

You first put your data in the mapping (stand alone test)

then check what error is coming.

You can right clicl on your objects in mapping graphical editor and go to display queue.there u can check which object is not giving desired output.

reward points if helpful

regards,

ujjwal kumar

Former Member
0 Kudos

Hi,

its exactly mapping error. check ur data and take the payload and test manually in Repoistery.

Regards,

Sateesh

Former Member
0 Kudos

HI,

/people/community.user/blog/2006/12/12/http-to-rfc--a-starter-kit

rEGARDS

Former Member
0 Kudos

The above error clearly says that there is a problem in MM_PRGETDETAIL_RESPONSE mapping ir response mapping.

Take the payload of Response of BAPI and test using test tab in the message mapping.You can understand the problem...

former_member181985
Active Contributor
0 Kudos

Hi,

If the PR doesnt exist it will simply returen error structure.

Make sure that in your mapping program is properly done means it should work in both cases sucess or failure.

Use if else condition along with exists function in the message mapping, then it will be solved

Thanks

Gujjeti

Edited by: Praveen Gujjeti on May 7, 2008 8:27 AM