on 06-15-2011 4:15 AM
Dear Experts
I am working on a File to Database scenario. My requirement is to update the database with latest information. For example
1. First day i got a file of 100 records...Insert all the 100 records.
2. Second day i will get 110 records (here 100 records is old data and 10 records is the delta). Now PI needs to lookup with DB and insert the updates of 100 records and insert the delta 10 records...
3. Third day i got 125 records file (here 110 is previous days data and 15 is todays delta). I need to update the changes of all the 110 and insert 15 delta records
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use action=UPDATE_INSERT on the reciever database (in mapping).
This statement will for existing records with key and updates. If the record is not present then it will insert that record.
You can refer the following link for more information:
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Please let us know what issues you are facing with this approach..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Instead of doing update of the existing records...
Use two statements one for deleting the existing data and other for the inserting the new data...
Try out the above option will work...
HTH
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Achuth,
Does it make sense, to send all records to target system and ask the target system to decide what records they need to updated. Target system can find new records based on timestamp (OR what every business logic).It is not advisable to do lookup for duplicates and update the same database (two DB calls).
If you want to archive exact requirement you have stated above, you can in message mapping you can do a JDBC lookup and filter out old data.
Regards,
Raghu_Vamsee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
26 | |
10 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.