on 06-27-2010 12:03 AM
Hiii,
for editing an assignment block, I need to lock my simple object. The problem is, I cann't not lock my entity, I have created a simple bol object as root object. My event handlerI has the following code:
METHOD eh_onedit.
DATA lr_entity TYPE REF TO cl_crm_bol_entity.
lr_entity ?= me->typed_context->zbudget->collection_wrapper->get_current( ).
CHECK lr_entity IS BOUND.
lr_entity ?= me->typed_context->zbudget->collection_wrapper->get_current( ).
IF lr_entity->is_locked( ) = abap_false.
IF lr_entity->lock( ) = abap_true.
me->view_group_context->set_view_editable( me ).
ENDIF.
ELSE.
me->view_group_context->set_view_editable( me ).
ENDIF.
ENDMETHOD.
I tried to lock my bol entity with
lr_entity->lock( )
but without success.
Has anybody an idea, how to lock my bol entity to make some checks like is_changeable in DO_PREPARE_OUTPUT before editing my assignment block?
Thanks in advance.
greetings,
John
Hi,
I assume that when you created the simple object, you made an entry in CRMV_TBLOBJ_MAP. Did you specify a lock object there? If not, create a lock object for your table(SE11) and specify it.
Regards,
Arun Prakash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Had the same issue for a custom Simple Object created.
Created a lock object as mentioned above.
Used the DEQUEUE* FM to unlock the entity which was locked in separate task and then locked it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
the flag "locked" within the Bol-Entity will be set via lr_entity->switch_to_change_mode( ).
Also the Flag "changeable" will be set while doing this.
This lock can be released with commit/rollback.
I hope this helps.
Regards
Dennis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
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.