on 03-05-2012 12:36 PM
Hello All,
I have the scenario Proxy to JDBC. This is Master data Interface.All the master data is loaded before itself in the receiver database side.
If any change happen to materials in SAP, Proxy will be called and sent to PI.
I have to just Update the records which is already there in the database.No Create is allowed. If the record is not there PI has to give error alert.
Thinking of if i use UPDATE statement in the receiver JDBC adapter, by default if the record is not present in the table JDBC adapter will be error out. Is this true?? Please suggest
Thanks & Regards
Bhavana,
Have you considered using [UPDATE_INSERT|http://help.sap.com/saphelp_nwpi71/helpdata/en/44/7b6d32fde93673e10000000a114a6b/frameset.htm]?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for the duplicate reply. Network slowness issue.
Edited by: Baskar Gopal on Mar 5, 2012 10:26 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can do this way.
Do the JDBC lookup using select query in the mapping and if the records available as lookup response then do the update in the jdbc receiver. This way you control whether you need update or not based on the lookup record. And you dont need to combine select and update in the jdbc receiver side and making the complex data structure. Hope that helps.
Proxy --> mapping jdbclook up --> Jdbc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
How abt the following option?
Create 2 mappings
1) One for JDBC Look up: Do look up and give the output of this first mapping to input to check the condition in 2nd mapping.
2) In Second mapping, check if any records exists or not based on the JDBC look up output value. If records exists then execute 2nd mapping , else will be error out.
Inputs are welcome on this
Regards
Hi,
Database will throw an error if you try to update non-existant data.
Better you try with "select" statement before update. If the select statement returns one or more rows then you can go for an update. You can call in a stored procedure to check if data is present and then update.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.