cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP mapping rfclookup multiple times

Former Member
0 Kudos
67

Hello,

My interface looks something like this:

XML Shipping Notification >--- Web Service > PI Mapping >IDOC adapter --> ECC IDOC

With my ABAP mapping I'll need to create a UDF to pull data from ECC into 12 fields on my IDOC. I'd rather not run the UDF rfc lookup in 12 seperate instances. Is there a way to pull in all the data I need one time and then pass it into each field as required?

Some kind of temporary storage from one run of the UDF?

Thanks,

Matt

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Go for RFC Lookup. you can fetch all fields @ 1 go.

But, you need to do graphical mapping for this.

/people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups

-santosh.

Answers (3)

Answers (3)

former_member181962
Active Contributor
0 Kudos

Hi Matthew,

You can fetch all you want in a single call, provided your RFC Function Module is capable of doing that.

You woul need to call the RFC lookup in the root node level, so that those values are avaiable for the rest of the mapping.

You can store the returned values in "Graphical" variables.

Best Regards,

Ravikanth Talagana

Former Member
0 Kudos

I think you could do this as a multi-mapping.

1) Create a mapping which takes in your source XML and runs your UDF lookup, and returns all fields as a second message type. So input is source XML, output is Message1:source XML, Message2:custom data type for extra fields

2) Create a second mapping which accepts the source XML fields plus the second message for the ones which you want override. It should grab both Messages from prior map and you can overide fields as necessary. Output is IDOC.

3) In the Operation Mapping define the 2 Mapping Programs in the correct order.

This solution may sound strange but we have a similar arrangement to separate a vendor map from our custom map, and both act on the same source data. I think this would get around you needing to run the UDF in each instance of the IDOC segment.

Former Member
0 Kudos

Are your 12 fields at a header level, or mixed around in a heirarchy?