cancel
Showing results for 
Search instead for 
Did you mean: 

PI7.11 RFC lookup of SAP tables

DG
Active Contributor
0 Kudos

Hi,

I have created a RFC lookup function that looks like the following.


FUNCTION Z_MM_PO_LINES.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  TABLES
*"      ZPOLINE STRUCTURE  ZMM_POLINE
*"----------------------------------------------------------------------
  data: table_in_wa Type ZMM_POLINE.
  Loop at ZPOLINE  into table_in_wa.
    Select single EBELP FROM EKPO into CORRESPONDING FIELDS OF table_in_wa
         WHERE MATNR = table_in_wa-MATNR and EBELN = table_in_wa-EBELN.
    MODIFY ZPOLINE from table_in_wa INDEX sy-tabix.
  ENDLOOP.
ENDFUNCTION.

I'm calling this FM from a PI RFC channel as showen on this screen.

[http://screencast.com/t/NzQwODQzY2]

The FM only receive the first line of this call.

I can skip the removeContext and then it works, but then I have way to many calls to the SAP system. When we are going to receive a lot of messages from the remote system, i would really like to only have one call pr message. Is it possible to fill rfc tables with a queue like the one from the screenshot.

Is there a way to only make one RFC call to get multiply lines which is copied from the input

context?

Best Regards

Daniel Graversen

[Figaf|http://figaf.com]

Edited by: Daniel Graversen on Jun 1, 2010 1:44 PM

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

this blog by Shabz should help you

/people/shabarish.vijayakumar/blog/2010/01/28/graphical-rfc-lookup-and-how-you-can-design-lookups-for-multiple-values-to-be-retrieved-in-a-single-call

Regards,

Michal Krawczyk

DG
Active Contributor
0 Kudos

Thanks.

It was not the way I had expected to solve the problem, but it makes sense.

Answers (1)

Answers (1)

former_member181962
Active Contributor
0 Kudos

Hi Daniel,

While I doubt if such an option is provided in PI 7.1, i have an alternative.

You can try if there is no other option.

Concatenate all the values of the queue into one string using a simple UDF and pass it as input to your RFC look up.

In the RFC FM, you can split the single string into multiple lines and continue with your existing logic.

Regards,

Ravi Kanth Talagana

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>While I doubt if such an option is provided in PI 7.1, i have an alternative.

this is not an issue - it's possible

Regards,

Michal Krawczyk

former_member181962
Active Contributor
0 Kudos

Thanks Michal!!!

Regards,

ravi