07-18-2008 9:23 AM
Hi guys,
I'm trying to modify a bunch of Premise objects with an abap program (system SAP ECC 6.0). I'm trying to do it with function ISU_S_PREMISE_CHANGE and works fine with a few premises.
The problem is than each call to ISU_O_PREMISE_OPEN adds a lock to the table IFLOT, and a massive modification of premises hangs the system until the program finishes.
I though that ISU_O_PREMISE_CLOSE should delete the lock register, but does not work.
any idea?
Thanks in advance,
Jordi
Some code:
=========
CALL FUNCTION 'ISU_O_PREMISE_OPEN'
EXPORTING
x_vstelle = wa_header-x_vstelle
x_wmode = '2'
x_upd_online = 'X'
x_no_dialog = 'X'
* X_AUTO =
* X_DB_EVBS =
* X_NO_CHANGE =
* X_NO_OTHER =
* X_TEILOBJ =
IMPORTING
y_obj = st_obj
y_auto = st_evbs
* Y_WMODE =
EXCEPTIONS
not_found = 1
existing = 2
foreign_lock = 3
invalid_key = 4
number_error = 5
system_error = 6
not_authorized = 7
invalid_connobj = 8
data_inconsistency = 9
OTHERS = 10.
**
** modify some data here...
**
CALL FUNCTION 'ISU_S_PREMISE_CHANGE'
EXPORTING
x_vstelle = wa_header-x_vstelle
x_upd_online = 'X'
x_no_dialog = 'X'
x_auto = st_evbs
x_obj = st_obj
* X_NO_OTHER =
IMPORTING
y_db_update = y_db_update
* Y_EXIT_TYPE =
* Y_NEW_EVBS =
EXCEPTIONS
not_found = 1
foreign_lock = 2
input_error = 3
general_fault = 4
not_authorized = 5
OTHERS = 6.
CALL FUNCTION 'ISU_O_PREMISE_CLOSE'
IMPORTING
y_db_update = y_db_update
y_exit_type = lv_exit_type
y_new_evbs = lv_new_evbs
CHANGING
xy_obj = st_obj
EXCEPTIONS
dont_exit = 1
OTHERS = 2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = lv_bapiret.
COMMIT WORK AND WAIT.
07-20-2008 1:00 AM
Hi,
I see you are already doing a 'wait' after your bapi. You could always try to manually remove the lock after the commit with the FM DEQUEUE_ALL. This is going to dequeue all your lock objects. However, this not always work because I think the actual lock could sometimes be created by the update process itself, thus not by your user. Furthermore the esthetics of such abrupt dequeueing could be debatable...
If the lock is released anyway after a while, another option is maybe to ask your BASIS people to increase the size of the lock table, in order to avoid an overflow.
I hope it gave you some ideas,
Nico
07-18-2008 1:15 PM
Hi,
You can use FM ISU_DB_EVBS_UPDATE to change the Premise data. i have used this FM in one of my objects.
let me know is it works for you........
Regards,
Saritha
07-20-2008 1:00 AM
Hi,
I see you are already doing a 'wait' after your bapi. You could always try to manually remove the lock after the commit with the FM DEQUEUE_ALL. This is going to dequeue all your lock objects. However, this not always work because I think the actual lock could sometimes be created by the update process itself, thus not by your user. Furthermore the esthetics of such abrupt dequeueing could be debatable...
If the lock is released anyway after a while, another option is maybe to ask your BASIS people to increase the size of the lock table, in order to avoid an overflow.
I hope it gave you some ideas,
Nico
07-21-2008 9:26 AM
Thank you very much.
There's a lack of information about ISU and FM!
Jordi
09-09-2009 10:47 PM
Hello there,
Did you find a reply to your question? If yes, pls post it here. Also is there an ABAP / Techniacl documents on ISU?
Thanks
B