cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI RFC call fails

Former Member
0 Kudos

Hi guys,

In an XML file to BAPI RFC scenario, I want to execute a BAPI call for each line in the XML file. For this reason, I changed the Occurence attribute in both Message and Interface Mapping to 0..unbounded. As you already know, the extra Messages and Message1 segments were added in the Message Mapping. Message Mapping works fine when tested in Mapping Simulator. However, when the Interface runs, I get the following error in CC Monitoring of reveiver RFC CC:

"Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: functiontemplate from repository was <null>: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: functiontemplate from repository was <null>"

And in the payload in Message Display Tool, I can only see this:

<ns0:Messages>

<ns0:Message1/>

</ns0:Messages>

When I insert value 1 in occurences attribute, Interface works fine and BAPI gets executed successfully.

I guess the problem is caused by the change in the Occurences attribute.

Any ideas ?

Accepted Solutions (0)

Answers (4)

Answers (4)

madhusudana_reddy2
Contributor
0 Kudos

Hi,

I think your maping is not generating the target BAPI structure that is why your message display tool showing..

<ns0:Messages>

<ns0:Message1/>

</ns0:Messages>

i am suspecting that your source file is not having enough data to generate target BAPI.

thanks,

madhu

Former Member
0 Kudos

Hi,

if it is a Z-BAPI you have to change your import parameters so that all source data will be transferred with only one call.

If it is a standard BAPI you can write a Z-BAPI including the standard BAPI.

Otherwise follow the IDOC occurence trick as suggested by Stefan.

Cheers,

André

stefan_grube
Active Contributor
0 Kudos

Before you proceed going in the wrong direction:

You try to use a BAPI in an async scenario.

BAPI should never be used in async scenario, as there will be not any error handling.

Almost every BAPI has a corresponding IDoc.

Use an IDoc, then you can use the "occurence trick" and need no multi mapping.

Former Member
0 Kudos

Hi Evaggelos,

am I assuming correctly, that you changed the occurence inside the RFC message? If so, the remote system will not process the call, because the RFC signature isn't correct anymore. Please give some more details.

Regards

Sven

Former Member
0 Kudos

Hi,

Thank you for your reply. As I said, I changed the Occurences attribute in both Message and Interface Mapping, under Messages Tab.