on 05-02-2012 2:42 PM
HI Folks
I have an JDBC to proxy Scenario .
What I want to do is . I need to select few fields from database where X = "00"
and in that same JDBC sender channel I have to immediately delete the records where X = "00 " and also set X ="01"
Can you guide me on the sam e
Thanks
Ninad Sane
Hi,
If I got the requirement correctly, you need to select some DB records with a sender channel, process them and send them to proxy, and then delete the DB records that were just processed, am I right? If so, don't delete these records with UDF in mapping, as PI has a dedicated functionality for this purpose. In the sender jdbc communication channel, in addition to specifying a query for selecting data, specify the UPDATE or DELETE (depending on the exact requirement) statement under "Update SQL Statement". This statement will be executed by the adapter immediately after data is successfully read and transferred to the Integration Engine.
Hope this helps,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please help me with a UDF so that this can be accomplished becasue any how I have to delete the data
This will be a JDBC look up UDF which will pull execute in mapping and fire a delete query
Thanks
Ninad Sane
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Your requirement is to select few records where X="00" and also update the same records with X="01".
This can be done easily in the sender channel by specifying the SELECT and UPDATE query together.
Please follow the steps as suggested above.
You can read the SAP help as well,
http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
You don't require a UDF to achieve this.
-Zameer
If you want JDBC Lookup UDF, refer this thread
http://scn.sap.com/thread/1875401
Questions: Why do you need UDF or jdbc lookup? You scenario is jdbc to proxy and sender channel is jdbc. You can achieve the select/update sql logic in the channel itself. Graphical JDBC lookup uses jdbc receiver channel. If you use UDF then your are doing this in the mapping? Then why do you need jdbc sender channel?
IMO, You can able to do only Select and Update records using jdbc sender channel. You can select the records using select field and in the update area, set the selected records to 01. so that next time jdbc channel will not read the old data.
Example
Select A,B,C where Tablename=TEST and flag='00'
update TEST set flag = '01' where flag='00'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Ninad
I think you need to Update the vakue of X from 00 to 01
It is pretty simple
In the sender JDBC channel write the select query and an Update query
Put the transaction isolation level to Serialization
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.