cancel
Showing results for 
Search instead for 
Did you mean: 

Legacy-PI intergration

Former Member
0 Kudos

Hi All,

I have to integrate Legacy system to ECC using PI. So the flow will be Legacy  ->PI -> SAP system.

The flow seems to be simple the file comes in PI and the same will get uploaded in ECC system. But here comes the catch, suppose there are some filed level changes in the XML file and now we only want to process the changed records and update the same in SAP.

The sender system want us to compare the last extract with the currrent one and then only send the changes to SAP system.

For example:

File1: Will be processed with all the 3 records

Name   Age  Hobbies

A           30      Golf

B           31      Tennis

C           32       TT

File2: in this only first 2 records needs to be send to SAP system becoz hobbies filed data is changed

Name   Age  Hobbies

A           30      Cricket

B           31      Football

C           32       TT

Request you to let me know how i can achieve the same requirement.

Thanks!!

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi,

You also have option 3 that I would personally recommend: to implement the comparing logic in the receiver system. It should help you achieve better performance, since you do not use RFC Lookups (less connections between systems) and should be easier to implement. Once the data reach the receiver system, you can easily compare the data already saved with the ones you just received.

Regards,

Greg

Former Member
0 Kudos

Hi,

We are quite reticent for opting ABAP approach becoz the same data will flow to CRM as well as ECC system. So we are looking for PI to handle this and send  only the changed data.

Please share your thoughts on the same.

Thanks!!

rajasekhar_reddy14
Active Contributor
0 Kudos

How are you connecting to CRM system> i hope you are using Proxy only,if you are reticent to implement option3 .

Then try RFC Look up appraoch it works.

Former Member
0 Kudos

Hi Raj,

We are using Proxy to communicate with CRM system.

So for as per ur suggestion i have to create 2 interfaces:

1) File - PI (RFC lookup)- CRM/ECC ----For validation of the records

2) File - PI -RFC

My second interface will always run after the first one??

Thanks!!

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Vasant,

You have to send valid primiary key request to get get response from RFC lookup and the kety should be unique identifier.

if you have two interfaces means you have to perfrom RFC lookup in every interface.

Option 3 is right design,even you can handle same logic in CRM proxy program level only.

Regards,

Raj

Former Member
0 Kudos

Hi Raj,

Sorry if my question perplexed you.

By two interfaces, i mean that in first interface i will create my normal scenraio (FILE -PI(RFC lookup)- CRM/ECC) but in the second interface i will update the backend table using RFC with the xml file records so  later this can be used in the first interface for doing RFC lookup .

I hope now i am clear?

Thanks!!

baskar_gopalakrishnan2
Active Contributor
0 Kudos

IMO, I dont see purpose of using the second interface. You can handle using one interface itself.

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi ,

You confused here,

let me explain.

1st time you ran interface now data will be moved to SAP and updated in to SAP Tables, now you are executing same interface for same data and few changes so you will perfrom RFC look to get old record and you will perform validation in PI level.

Suppose your interface executed first time for new data(no old records found in SAP) in this case you have to perform RFC look up and RFC look has to return some response) based on response you will send new data without supresisng content.

check my below blog,you will get some idea how RFC look up works.

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/06/05/how-to-handle-duplicate-files-sen...

PS:

You no need to store any XML data .

Former Member
0 Kudos

Hi Raj/Baskar,

Thanks for the help.

I will try to create the scenario and get back to you on the same.

Thanks!!

Answers (3)

Answers (3)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>So we are looking for PI to handle this and send  only the changed data. 

If you want to handle via PI then you have to do RFC lookup for validating the data. So you might want to see Shabarish blog mentioned above to retrieve multiple values using single lookup to avoid mulitple calls to RFC.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Raja already explained the ways... Every time you send record to ECC, validate with the backend system via RFC graphical lookup or some UDF to check whether that record exists or not. If not,  then insert. This lookup logic should exist in the message mapping. Only downside is you need to check every individual record and if the file size is too big then this would slow down the processing time.

Plus if you have any primary key or similar id in the table then you can retrieve all the existing records and make a single call to RFC instead of multiple calls... Use shabarish blog for this. Thsi would help improving the performance

http://scn.sap.com/community/pi-and-soa-middleware/blog/2010/01/28/graphical-rfc-lookup-and-how-you-...

Former Member
0 Kudos

Hi Baskar,

The file size will be huge.

So as per Raj's suggestion my interafce design will be:

1) File - PI - RFC

then

2) File - PI(RFC look up) - SAP

Thanks!!

rajasekhar_reddy14
Active Contributor
0 Kudos

Very simple.

Option1:

Legacy(File)----->PI(RFC Lookup)------>SAP.

You need help from ABAP team to buld one RFC fucntion module which can evaluate the new record with old data(very much possible).

Or

Option2:

Legacy(File)----->PI(RFC Lookup)------>SAP, but RFC look up returns old data based on key then perform validation at PI level.

But i would recommend to use option1.

Best Regards,

Raj

Former Member
0 Kudos

Hi Raj,

Thanks for the reply!!

So you mean to say that i need to insert every record in a file to a RFC as well as to SAP system (Proxy)  also and when the next run of file happens i will pass every record as input to the RFC lookup and check whether the record exist or not?

Thanks!!

rajasekhar_reddy14
Active Contributor
0 Kudos

Yeah correct.

Other approach is why dont you handle valdiation logic in ECC only because ABAP team can have more flexiblity to perform validation in Porxy program level before updating data in SAP Tables.

I prefer this approach because it avoids RFC look up and you can avoid validtaion logic also.

Your interface going to File to Proxy.