cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Lookup for Multiple values not working correctly in PI 7.3

jegathees_waran
Active Participant
0 Kudos

Hello Friends,


I have designed my mapping to pass all the unique material numbers to ECC and get the material description using SAP Standard RFC lookup function. (PI 7.3 EHP 1)

In ECC one Z rfc is designed with tables parameter to recive multiple entries from PI and return the result. I tested this RFC in ECC, it works fine.
I use this RFC in the lookup.

I referred Shabarish Blog and designed the mapping accordingly.

http://scn.sap.com/community/pi-and-soa-middleware/blog/2010/01/28/graphical-rfc-lookup-and-how-you-...

But, the lookup is not working correctly. When I check the RFC trace,

1) Only the first input is mapped into the request
2) It returns all values from MAKT table instead of for the given input.

I checked and tried all ways. I could not find what is the reason.

Friends, could you please tell me what is the mistake in my mapping?

Please find the mapping screen shots, RFC trace, RFC design gif files attached below for your reference.

Thanking you.

Kind regards,
Jegathees P.

sourabh_patil93
Explorer
0 Kudos

Hi,

I'm facing the same issue in my system. When I tried the solution that Ambrish provided, it worked in Dev. But after transporting the changes to QA, its giving the same issue. Any Idea what can be done?

Accepted Solutions (1)

Accepted Solutions (1)

ambrish_mishra
Active Contributor
0 Kudos

Hi,

I have achieved this kind of requirement in one of my scenarios and it worked in PI7.1.

Few checks:

  • Your second statement proves that the problem is in ZRFC FM. Both export and import parameters should be of table type. You can check this in request  and response of your RFC in PI. The node under root node would show as table type. Once you sort out the RFC code, it should be fine.
  • Mapping looks good. What kind of variable is temp ? Why don't you map it to the target field directly?
  • Check in RWB, how many calls are being made for a set of values.

Hope it helps!

Ambrish

jegathees_waran
Active Participant
0 Kudos

Hi Ambrish,

Thank you very much for your reply. I used Tables Parameter only in the Function Module in ECC. (Tables Parameter will act as import and Export). Earlier I used Structure for the Tables parameter, later I changed to Table Type as you said.

It works now, in the RFC trace I could see whatever the inputs I give but in the response, it returns all the matching records and then it returns the remaining records in the table. But, in the target xml only returns records (for the input) are mapped. It does not work consistently, this point I am worrying.

As you said, I could not find the node under root node as table type. It still shows the structure name only. I deleted the RFC in PI and imported the RFC again. Still it shows the old one only (i.e Tables with structure). Do you have any clue?  In your RFC what is the type of tables parameter?

Kind regards,

Jegathees P.

ambrish_mishra
Active Contributor
0 Kudos

Hi,

Try doing a cache refresh.

If that does not work, change the ZRFC name, import again and map. It is a dirty solution but works.

Hope it helps!

Ambrish

jegathees_waran
Active Participant
0 Kudos

Hi Ambrish,

Thank you very much for the tips. I will try again. (My worry is about consistent response from RFC, and how to troubleshoot in the ECC side if any problem).

Anyway, your tips make the progress of my mapping.  Thank you.

Former Member
0 Kudos

Hi Jegathees,

It might be helpful if you could debug the RFC in ECC while testing the mapping in PI. To do this (if you haven't tried already) you need to do the following:

1) In your RFC communication channel, ensure you are using your own user ID

2) Go to SE37 and put an external breakpoint at the start of your function module

3) Test your mapping in PI

This will invoke the debugger externally and you can see what input is being passed in and what is being passed back to PI. Ensure that you have the new debugger selected in your ABAP workbench settings.

If you could screenshot the tables in your debug session and upload them here we can pinpoint the issue for you.

Regards,

Nick

ambrish_mishra
Active Contributor
0 Kudos

Updated RFC not getting updated in PI is common and related to cache and is solved by cache refresh most of the times and once sorted, it works.

Most of the times, its the Dev environment which behaves like this. Once transported to QA and other environments which are well-maintained and supported, these issues won't be there.

To check the behavior of ZRFC, you can check like Nick suggested above. It is a very useful way to test RFC call from PI. I missed out passing it on in my reply.

Ambrish

Answers (0)