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