For SQL Server, You could try this:
*UPDATE where sapflag =’0′)*
In my case, It’s Informix.’select first n’ can not used in SQL clause.I may be able T*o update* the flag in JDBC Sender Adapter with a procedure or SQL program. But it’s not easy to find an Informix expert. Here lots of warmhearted friends gave me lots helpful suggestions. That’s very nice. I will try harder to aoid using a complex BPM. What I have done is to design BPM: 1, ERP system trigger the process; 2, send SQL ‘select count(*)’ to DB; 3, if count<>0, retrieve first 10000 rows; 4,send SQL to update flag identified by primay key; 5,send XI message to ABAP proxy which write data into SAP; 6,loop step 2; 7, if count=0, sned ‘end’ message, end of the process. There is a simple test, total 7318 rows, retrieve 1000 rows each time. What happened in SXMB_MONI after trigger once?
Nice idea, but it seems a bit over-engineered to me. I'm not sure about Informix, but the equivalent to rownum in SQL Server is TOP: where sapflag = '0'
I have update my blog.
Regards
Shen Peng