on ‎2018 Jun 20 10:01 AM
Hi Experts
I have a ABAP report in SAP CRM which creates multiple serial number components under a single/same IBASE. It is executed in a loop for each serial number.
It successfully creates the first serial number in the IBASE. But sometimes I get "Ibase locked" error for the second serial number.
How to avoid this locking issue?
The sequence is like below:
1. First i use FM 'CRM_IBASE_CREATE' to create ibase.
2. Then I use FM 'CRM_ICSS_CREATE_COMPONENT' to create Serial number in teh ibase.
3. Then I use FM 'CRM_IBASE_COMP_CHANGE' to add partners to the component.
4. Then update warranty properties for the component using BOL query.
In the BOL query I use below lines in the end
lr_bol_core->modify( ).
lr_transaction = lr_bol_core->get_transaction( ).
lr_transaction->save( iv_force_save = abap_true ).
lr_transaction->commit( ).
Please suggest what can I do to avoid ibase locking? Basically all the steps must be synchronized/Serialized. Can I use SET UPDATE TASK LOCAL ? If yes, where can I use the same?
Thanks
Gopal
Request clarification before answering.
Hi Gopal,
You can use coding like this one:
IF lr_transaction->check_save_possible( ) EQ abap_true.
IF lr_transaction->save( ) EQ abap_true.
lr_transaction->commit( ).
ELSE.
Lr_transaction->rollback( ).
ENDIF.
ENDIF.
This should solve the lock issue.
Thanks,
Iván
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.