on 08-26-2009 2:18 PM
Hi,
i'm developing an JAVA application wich retrieves data from CRM backend.
i wont to lock an order in backend after reading data ,and keep this lock
until data schould be write back .
I've tried to use JCO.Cient.execute(function,tid) but it doesn't work
Hi Oleg,
SAP uses logical locks, which are set by the application modules. E.g. a sales order uses lock object EVVBAKE, which is set via function module ENQUEUE_EVVBAKE. Unfortunately the (generated lock) function modules are not RFC capable. Assuming that your order means sales order, you could utilize RFC function modules ISA_LOCK_SALESDOCUMENTS for locking the order and ISA_UNLOCK_SALESDOCUMENTS for unlocking the sales order. If you're using JCo3, then I'd do this in one session/context, i.e. when starting your program logic use
JCoContext.begin(jcoDest);
where jcoDest is your JCoDestination object. Now you could lock the sales order, execute whatever other logic you need, then unlock the sales order again and finally end the context via
JCoContext.end(jcoDest);
Note though that this approach is a bit risky, because any connection problems might result in stale lock entries in SAP, which prevent any user from updating the locked sales order...
Best wishes, harald
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.