on 05-24-2010 10:49 AM
Hello All,
In my sender jdbc adpter configuration i read data from table that contains filed 'status' witch indicate does record has been send to sap. But limitation of this solution is that i read up to ne row and example query looks like this
select up to 1 rows * from table where status = 0 order by id.
and update query
update table set status = 1 where id = ( select id 1 rows * from table where status = 0 order by id )
Can you write your strategy of reading multiple records.
I know that stored procedure can be solution of this problem, but i'm wondering how do you handle with that.
BR
Maciej
you can indeed read and update multiple records;
Adapter Work Method
· You must add an indicator that specifies the processing status of each data record in the adapter (data record processed/data record not processed) to the database table.
· The UPDATE statement must alter exactly those data records that have been selected by the SELECT statement. You can ensure this is the case by using an identical WHERE clause. (See Processing Parameters, SQL Statement for Query, and SQL Statement for Update below).
· Processing can only be performed correctly when the isolation level for transaction is set to repeatable_read or serializable.
Example
SQL statement for query: SELECT * FROM table WHERE processed = 0;
SQL statement for update: UPDATE table SET processed = 1 WHERE processed = 0;
processed is the indicator in the database.
the above is from SAP help.
follow the query as mentioned and do not forget to set the repeatable_read or serializable in the adapter
http://help.sap.com/saphelp_nw04/helpdata/EN/7e/5df96381ec72468a00815dd80f8b63/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
transaction mode comes into play in that case n u need to select one of the paramters as said above
if used serialisation then it will lock the table during the operations so that only selected records will be updated...
you need to go through the database transactions in details for more/better undestanding
HTH
Rajesh
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.