cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Lookup in SAP PI 7.4

Former Member
0 Kudos

Hello there,

My interface is using a RFC Lookup in the graphical mapping and it is passing as input parameter an IDOC, the RFC in ECC is calling a abap class to create the entire mapping as per target system request for this interface, so the RFC exports the target xml, below the messaging mapping:

And this is the definition of the RFC in ECC:

However when I am testing the mapping I am not able to get any results from RFC, always get an empty result, my question is somebody knows how do I need to handle the data type for the Input and Output parameter in the RFC? Should be string? or what other data type I need to use in order I can pass though the xml correctly from PI into the RFC?...

Thanks.

Erika Juarez.

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Erika,


My interface is using a RFC Lookup in the graphical mapping and it is passing as input parameter an IDOC,

Use the root node of the idoc as your input and then encode it in base64 before passing into the rfc.

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

thanks for your reply, how I can encode the root node of the idoc in base64 before passing into the rfc?..

Thanks.

former_member194786
Active Contributor
0 Kudos

Hi Erika,

Check this thread for the reply from Aaron or Eng Swee for the code perform encoding:

Cheers,

Sanjeev.

Former Member
0 Kudos

Thank you Sanjeev, the problem was resolved by doing the encoding in base64 before passing to the RFC and decoding the output.

Cheers.

Erika

Answers (3)

Answers (3)

bhavesh_kantilal
Active Contributor
0 Kudos

Your Mapping has WPDBBY01 mapped as the RFC input, basically the IDoc Root Node. As far as I know this will just send a blank input value to the RFC as the Input and this is why it proabably gets a blank response back.

Right click on WPDBBY01 and select option Return as XML. This will make sure your Entire IDoc is converted into a XML and is mapped to the RFC's Import Parameter- SOURCES as a String

Regards,

Bhavesh

iaki_vila
Active Contributor
0 Kudos

Hi Erika,

Are you testing the whole scenario or from the test tab?, if you are in the test tab, have you set the RFC channel parameter?. Also check in the RFC system if there is any dump or to test it with the data that you are using.

Regards.

Former Member
0 Kudos

Hello,

Thanks for the reply, and yes I am testing from the test tab in ESR. The RFC channel parameters are set correctly also I have reset the channel and it is working fine. But still with no luck on make it work yet. Any other suggestion.

Thanks.

manoj_khavatkopp
Active Contributor
0 Kudos

Erika,

Try executing the same RFC locally in ECC in se37 with the same input which you are passing in mapping and see if you get any result or its blank.

if its blank then its a data issue which dosent has an entry in the table in ECC.

if its non-blank try stop and start the rfc channel.

Br,

Manoj