cancel
Showing results for 
Search instead for 
Did you mean: 

Response not coming from bapi

Former Member
0 Kudos

hi all,

I am sending a request from XI to bapi and it is going but the response is not coming from the BAPI.Below is the structure of the response bapi which is required

<i><?xml version="1.0" encoding="UTF-8" ?><ns0:ZLS_BAPI_SAMPLE_DUE_DATE_CHK.Response xmlns:ns0="urn:sap-com:document:sap:rfc:functions">

<EQUIPMENTID>

<item>

<EQUIPID/>

</item>

</EQUIPMENTID>

<LOCATIONID>

<item>

<LOCID/>

</item>

</LOCATIONID>

<OILID>

<item>

<OILID/>

</item>

</OILID>

<OUTPUT>

<item>

<ZSAMPLEID>22</ZSAMPLEID>

<ZSAMPLEDUEDATE>20061205</ZSAMPLEDUEDATE>

<VCODE>55</VCODE>

<KURZTEXT>ww</KURZTEXT>

<ZEQUIPDES>dddd</ZEQUIPDES>

<MAKTX>33</MAKTX>

<ZPLANID>3</ZPLANID>

<ZPLANIDESC>hhh</ZPLANIDESC>

</item>

</OUTPUT>

<RETURN>

<item>

<TYPE/>

<CODE/>

<MESSAGE/>

<LOG_NO/>

<LOG_MSG_NO/>

<MESSAGE_V1/>

<MESSAGE_V2/>

<MESSAGE_V3/>

<MESSAGE_V4/>

</item>

</RETURN>

</ns0:ZLS_BAPI_SAMPLE_DUE_DATE_CHK.Response></i>

Equip id,loc id and oil id are mapped in the request mapping and in response we need the output fields.But during runtime we get the below as the payload structure

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

- <rfc:ZLS_BAPI_SAMPLE_DUE_DATE_CHK.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions">

- <EQUIPMENTID>

- <item>

<EQUIPID />

</item>

</EQUIPMENTID>

- <LOCATIONID>

- <item>

<LOCID>1</LOCID>

</item>

- <item>

<LOCID>2</LOCID>

</item>

- <item>

<LOCID>3</LOCID>

</item>

- <item>

<LOCID>4</LOCID>

</item>

- <item>

<LOCID>5</LOCID>

</item>

- <item>

<LOCID>6</LOCID>

</item>

- <item>

<LOCID>7</LOCID>

</item>

- <item>

<LOCID>8</LOCID>

</item>

- <item>

<LOCID>9</LOCID>

</item>

- <item>

<LOCID>10</LOCID>

</item>

</LOCATIONID>

- <OILID>

- <item>

<OILID>BP260</OILID>

</item>

</OILID>

<OUTPUT />

- <RETURN>

- <item>

<TYPE />

<CODE />

<MESSAGE />

<LOG_NO />

<LOG_MSG_NO>000000</LOG_MSG_NO>

<MESSAGE_V1>Invalid Customer Number</MESSAGE_V1>

<MESSAGE_V2 />

<MESSAGE_V3 />

<MESSAGE_V4 />

</item>

</RETURN>

</rfc:ZLS_BAPI_SAMPLE_DUE_DATE_CHK.Response></i>

Can anyone plz help me out

thanks and regards,

Nisheeta

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Nisheeta,

In R/3 it will take as 1000 only,but if we want execute it through XI we have to provide 10 digit number.

As you are getting correct output in R/3 means there is something wrong with your response mapping for sure.

Former Member
0 Kudos

hi shweta,

I did the whole mapping again.When i am giving EO the request message is going but when i am changing it to BE the response is showing 2errors in moni.One is

<i>com/sap/xi/tf/_Lspm_Response_SampledueGrid_MM_</SAP:P1>

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

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

and the other is the no response message.

I am dealing with a custom Bapi,where else is a possibility of an error...can you please help??

Former Member
0 Kudos

HI,

Please check the data type which you have used to map response of bapi and please check the occurance for them is 0 to 1.

Thanks,

Tuhin

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi Nisheeta,

Can you reimport your bapi structure and redo all ur request and response mapping?Check ur source and target structure thoroughly for every mapping.

Again check in interface determination if ur specified msg mapping is correct.

Former Member
0 Kudos

Hi Nisheeta,

This is surely error of your response message mapping.

You are not getting the expected XML payload for response message.

Check your target structure,check all your nodes and subnodes in response.

tally your coming response to mapping's target response as they are incorrect.

Former Member
0 Kudos

hi all,

also this error is being shown in moni

<i>Lspm_Response_SampledueGrid_MM_</Trace>

<Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns1:Lspm_Response_SampledueGrid_MT/SAMPLEID. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start</i>

Am not able to understand what it means can anybody help??

Former Member
0 Kudos

HI,

Please check your response mapping.

Please do the unit testing of your response mapping in integration repository->message mapping->Test tab.

Use k the XML payload which you are getting as response from BAPI

Thanks,

Tuhin

Former Member
0 Kudos

Hi Tuhin,

My response mapping is working fine in IR.i am using http client page for testing.shud i keep QOS as BE or EO when i am using the payload as the response XML of bapi??

Plz help

thanks

nisheeta

Former Member
0 Kudos

Hi Nishita,

It should be BE.

Thanks,

Tuhin

Former Member
0 Kudos

Hi Nisheeta,

Try to execute this bapi in R/3 system with same KUNNR.

If it is working fine over there,it means there is something wrong with your mapping.

And then check your response mapping in XI.

Thanks.

Former Member
0 Kudos

hi shweta,

In r/3 i tried to execute the bapi with kunnr as 0000100000 but it is changing it as 100000 and giving output for this value.Is there anythin wrong with this??

regards,

Nisheeta

Former Member
0 Kudos

Hi,

You should give correct customer number.

If it is a 10 digit number then prefix your customer number with zeros.

For eg. as vendor number is 10 digit number ,we have to give prefix to this vendor number from XI like 0000012356.

Former Member
0 Kudos

hi shweta,

I was not giving a 10digit number as KUNNR so the error was coming but now the output is still not coming.the payload is showing as

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

- <rfc:ZLS_BAPI_SAMPLE_DUE_DATE_CHK.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions">

- <EQUIPMENTID>

- <item>

<EQUIPID />

</item>

</EQUIPMENTID>

- <LOCATIONID>

- <item>

<LOCID>1</LOCID>

</item>

- <item>

<LOCID>2</LOCID>

</item>

- <item>

<LOCID>3</LOCID>

</item>

- <item>

<LOCID>4</LOCID>

</item>

- <item>

<LOCID>5</LOCID>

</item>

- <item>

<LOCID>6</LOCID>

</item>

- <item>

<LOCID>7</LOCID>

</item>

- <item>

<LOCID>8</LOCID>

</item>

- <item>

<LOCID>9</LOCID>

</item>

- <item>

<LOCID>10</LOCID>

</item>

</LOCATIONID>

- <OILID>

- <item>

<OILID>BP260</OILID>

</item>

</OILID>

<OUTPUT />

<RETURN />

</rfc:ZLS_BAPI_SAMPLE_DUE_DATE_CHK.Response></i>

am i doin anythin wrong with the mapping??

Former Member
0 Kudos

Hi,

Check if your input values are correct.

Because you are requesting response for the value which is not there in the system.

Former Member
0 Kudos

HI,

I can see error as invalid customer no.So please check it.

Thanks,

Tuhin

Former Member
0 Kudos

hi tuhin,

The customer number(KUNNR) is what i am giving in the request mapping and the value is coming from standard SAP tables.

regards,

Nisheeta

Former Member
0 Kudos

Hi Tuhin ,

I am getting this error .

Cna u help me out .

Process instances in status ERROR

Thanks

Divya