cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Lookup using Java Mapping program - Examples

Former Member
0 Kudos

Dear Experts,

I am working on a scenario which is using 1:N mapping. For deciding the target message I have to use RFC Lookup to call the backend ERP system and there are 2 ERP systems involved in this integration. As I am using Java Mapping and never did a RFC Lookup in Java. I kindly request you to give me some examples which I could use for my RFC calls in my Java Mapping. Simple example will do.

Client is adamant to use Java mapping, I could achieve this easily using XSLT or Graphical Mapping.

Advance Thanks,

Pradeep

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Hareesh,

I tried the code that you have given me but for some reason its giving me a null point exception on  the result variable in the code.

result.getContent();

Could you please help me?

former_member184720
Active Contributor
0 Kudos

Hi Pradeep - Have a look at the below code... you can make use of it in your java mapping

User-defined Mapping Function for RFC Lookup - Code Gallery - SCN Wiki

Former Member
0 Kudos

Thanks Hareesh. I think I can resolve my issue using the code.

I will keep you updated.

Regards,

Pradeep

roger_alluivall
Participant
0 Kudos

Hello,

why don't you use Extended Receiver Determination Defining Extended (Dynamic) Receiver Determination - Integration Directory - SAP Library?

What you can do is create a Message Mapping between your source message and Receivers message type. In this message mapping you can use your RFC to generate the target message.

For example, lets say we have the function ZFM_GET_INTERFACE_INFO used to generate the List of Receivers given a source message. You could create a Message Mapping as below:

In this case, the RFCLookup box look as below:

The receiver determination configuration would look as follows:

Afterwards, you will need two specific message mappings for the two ERP systems.

Summarizing, you'll need:

1.- A Message Mapping: Source Message to Receivers Message Type (This one uses the RFC Lookup)

2.- A Message Mapping: Source Message to Target Message for ERP 1

3.- A Message Mapping: Source Message to Target Message for ERP 2

In Integration Directory you'll have 1 Receiver Determination(Source system, Target System determined Dynamically) and 2 Interface Determinations (Source System to ERP1, Source System to ERP2), etc.

I hope you find it useful.

Regards!