cancel
Showing results for 
Search instead for 
Did you mean: 

How to merge source data with RFC response and post back again as Idoc

Former Member
0 Kudos

Hi All,

This is the requirement we have for an interface

The legacy application is sending Vendor master to PI 7.0

If it is new vendor then it is send as an Cremas Idoc into SAP. Legacy (New Vendor) -


> PI 7.0 -


>Cremas Idoc SAP

If it is changed Vendor legacy will only send changed fields for that Vendor.In PI we would like to call an RFC which will return all the data for that changed Vendor Number and then merge the RFC response with changed data from legacy and then send it to SAP as Cremas Idoc again with all values.

I know these can be achieved using Proxy by custom Abap Code in SAP.But we would like to avoid it.

How can we achieve it?

1.RFC lookup - Shall we use these , when PI receives changed Vendor from legacy ,it will call RFC using RFC lookup and the response message from RFC lookup should be merged with source data .Is this possible?

2.Shall we achieve this using BPM ?Is it feasible and How?

Any Help greatly appreciated

Thanks,

V

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Collins,

I dont thing you required BPM for this, this can be achieved using not mal Interface.You have to create one more structure for Legacy and RFC ressponse,that means create one data type which can hold the structure of RFC response and Legacy data when is vendor changed.

now you need to develop one more mapping between new structure to CREMAS,create one operation mapping for vendor change , add these two mappings ,this will work.

Finally add two opeartion mappings in Interface determinaltion add condition two determina vendor chnage or not based on legacy data. it will work.,

Regards,

Raj

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello,

We have done almost the same scenario using RFC lookup and posted the IDOC using inbound IDOC adapter, it is working fine.

I feel there is no need of BPM for this.

regards,

Ravi Siddam

Former Member
0 Kudos

Thanks Everyone for your helpful suggestions.

So I will avoid doing the BPM for this.

My next question is "How to do the RFC lookups here " Please provide any blogs on how to do the rfc lookups in PI 7.0 ?

Based on your inputs I have come up with the following approach now.

Approach 1:

If it is a new Vendor then post as an Idoc else if it is an changed Vendor then do the RFC lookup for each field and then post the Idoc .

Interface determination will determine which mapping to trigger based on new/change Vendor

Let me know how to do the RFC lookup for each field in PI 7.0?

Thanks,

C

Former Member
0 Kudos

Hi All,

Once I use the RFC lookup by UDF and get the response as a xml stream , how to parse the xml ?

For example I need Vendor name for that Vendor and get the response from RFC as a xml stream with all fields of Vendor.Here how do I parse the xml and return just Vendor name to the target field.

Thanks,

C

drosadeoliveira
Explorer
0 Kudos

Hi!

Take a look at this blog: /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes

Hope it helps!

Regards,

Daniel.

Former Member
0 Kudos

If it is changed Vendor legacy will only send changed fields for that Vendor.In PI we would like to call an RFC which will return all the data for that changed Vendor Number and then merge the RFC response with changed data from legacy and then send it to SAP as Cremas Idoc again with all values.

I am not sure why you want to pull whole data from R3 and send back to R3.

you can follow any of these approach..

if you have any indicator for new/ changed cusotmer in the legacy data then trigger CREMAS IDoc accordingly.

mapping rules will be diffrent for New and changed CREMAS idoc.

otherwise just do RFC look up for each record then based on the output(new/changed) create or update cusotmer data through CREMAS IDoc.

when changing the customer through CREMAS no need to pass whole data again. it is enough if pass the changed fields. offcourse qualifier values for segments will differ.

alex_cook
Active Participant
0 Kudos

Howdy,

Just curious why you want to avoid using an ABAP proxy in this scenario? It may end up being simpler than using a BPM.

The BPM should work but it will be a complicated process.

Cheers

Alex