cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to avoid locking of IBASE object?

gopalkrishna_baliga
Participant
0 Likes
258

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

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Likes

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

gopalkrishna_baliga
Participant
0 Likes

Hi Ivan

Thanks for you answer.

But I did not get how this will really help.

it will be really great if you can elaborate a bit more.

What actually this means? IF lr_transaction->check_save_possible( ) EQ abap_true.

Thanks

Gopal