cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Look UP

former_member10771
Active Participant
0 Kudos

Hi All,

I am doing a RFC look up to send multiple inputs and get the value in a single call. I have created the RFC FM in this manner. Also done the PI configurations . I am not able to get any value in RFC. Can you please tell me if the design of my RFC FM is correct because I have included both the input and output under tables section or do I need to include the input under import parameters. Please find the below screenshot for reference. The RFC is working fine in ECC. But in PI I am not able to get anything.

This is the look up screen

Mapping Queue . RFC queue doesnt dispplay anything

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Amit,

To get multiple values in RFC lookup should be problematic, have you read this blog http://scn.sap.com/community/pi-and-soa-middleware/blog/2010/01/28/graphical-rfc-lookup-and-how-you-...?

Regards,

former_member10771
Active Participant
0 Kudos

Hi Inaki,

I followed the same blog by Shabaaresh to do this development. But somehow I am not able to get any value. Even if I get some value then I can check and modify it accordingly. But currently I am getting nothing. Has it something to do with the design of the RFC FM. Any pointers where I can check .

former_member10771
Active Participant
0 Kudos

Actually I am getting like this in mapping if I test.I guess the value itself is not going to ECC. Has it something to do with the declaration or something in ABAP.

7:40:31 Start of test   Compilation of MM_RFC_LookUp successful 

  • Document start
  • Start tag [ns1:ZRFCLOOKUP_TEST]
  • Add raw attribute [ xmlns:ns1="urn:sap-com:document:sap:rfc:functions"]
  • Start tag [ZSOURCEAPPLICATION]
  • Put value []
  • Close tag [ZSOURCEAPPLICATION]
  • Close tag [ns1:ZRFCLOOKUP_TEST]
  • Document end

Execution of mapping on server took 2 milliseconds

Executed successfully  17:40:33 End of test    

former_member184720
Active Contributor
0 Kudos

>>>Can you please tell me if the design of my RFC FM is correct because I have included both the input and output under tables section or do I need to include the input under import parameters


It should be possible in both the ways. I.e. when your import and export parameters of table types.


However you don't need to mention anything under import/export but define the required tables under table section(which acts as import and export)


Then handle the logic to return the required values in the FM.



Former Member
0 Kudos

Hello,

To get multiple data in one single call your RFCLookup should have two inputs -  one will be item ( which is under ZSourceApplication, i believe this is ur input structure) and the other one will be ZSourceApplication. Change it and then test the same.

Thanks

Amit Srivastava

former_member10771
Active Participant
0 Kudos

Hi Amit ,

I tried mapping using the item node still I get the same output. No data is seen .

This is the RFC trace.

0:49:51 Start of test   Compilation of MM_RFC_LookUp successful 

  • Document start
  • Start tag [ns1:ZRFCLOOKUP_TEST]
  • Add raw attribute [ xmlns:ns1="urn:sap-com:document:sap:rfc:functions"]
  • Start tag [ZSOURCEAPPLICATION]
  • Start tag [item]
  • Put value []
  • Close tag [item]
  • Close tag [ZSOURCEAPPLICATION]
  • Close tag [ns1:ZRFCLOOKUP_TEST]
  • Document end

Execution of mapping on server took 7 milliseconds

Executed successfully  10:49:52 End of test    

Hi nabendu,


This is my RFC structure in PI under request and response. Do you feel any change needed here. Any help will be appreciated.

former_member10771
Active Participant
0 Kudos

Hi All,

I deleted the RFC FM and created a new one and imported in PO. I am getting the values in trace but in XML format. Can someone please tell me on the same.

Former Member
0 Kudos

Hello,

It seems that u have selected node as one of the RFCLookup output instead of a field and that's the reason u can see XML as one of the output.

Thanks

Amit Srivastava

Answers (1)

Answers (1)

nabendu_sen
Active Contributor
0 Kudos

Hi Amit,

Check the Communication Channel you are using for the RFC Lookup. Do you see any error or entry?

Another point, do u see export and import parameters as 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.

Check this:

Regards,

Nabendu.

former_member10771
Active Participant
0 Kudos

Hi All,


I am getting the values now via the lookup. But the problem is its not able to create a node in target mapping for multiple values.

I tried using split by value and remove context but still no luck. Also tried using UseoneAsMany.

engswee
Active Contributor
0 Kudos

Amit

The RFC Lookup function is still having only 1 input. To perform a single optimized RFC call with multiple input values you need to have the "item" as an input too as mentioned by Amit Srivastava.

There is an example in my blog below (the last part) on how the input queues should look like for a correctly designed RFC Lookup call with multiple inputs. Make sure also to take note of the precautions so that it won't accidentally cause an infinite loop.

Rgds

Eng Swee

former_member10771
Active Participant
0 Kudos

Hi All,

I am currently facing this issue. With single value I am able to get the ouput correclty. But for multiple values I checked in debug made the internal table is taking only the first value and not the second one. Can someone please tell me what needs to be done. Whether its a change on ECC side or anything to do with PI mapping.

former_member10771
Active Participant
0 Kudos

This is how it looks in debug mode when I am sending two values. It is taking only one .

former_member10771
Active Participant
0 Kudos

This is my mapping structure.

former_member10771
Active Participant
0 Kudos

Hi All,


Any update on this. As to how to proceed. I tried removing the context in mapping but still its giving only one value in internal table.

Former Member
0 Kudos

Hello,

>>his is how it looks in debug mode when I am sending two values. It is taking only one

The way u are populating values in source structure is wrong. "ZSourceApplication" element occ is 0.1 so u cannot pass multiple values to this element in the same context.

So instead of that duplicate "Item" node and each item node should have only 1 "ZSourceApplication".

Thanks

Amit Srivastava

former_member10771
Active Participant
0 Kudos

Hi Amit,


Thanks for the response. Finally after a lot of struggle I am able to get the output.

Thanks for the inputs.