删除 不删除数据库
data lr_entity type ref to if_bol_bo_property_access.
data lv_bol type REF TO if_bol_bo_col.
lv_bol = me->typed_context->searchresultnode->collection_wrapper->get_marked( ).
* lr_entity ?= me->typed_context->searchresultnode->collection_wrapper->get_marked( ).
lr_entity = lv_bol->get_current( ).
me->typed_context->searchresultnode->collection_wrapper->remove( lr_entity ).
**********************************************************************************
删除 删除数据库
EH_ONDELETE
METHOD eh_ondelete.
DATA : lr_entity TYPE REF TO cl_crm_bol_entity,
lr_current TYPE REF TO if_bol_bo_property_access,
lr_col TYPE REF TO if_bol_bo_col,
lr_core TYPE REF TO cl_crm_bol_core,
lv_size TYPE i.
lr_col ?= typed_context->order->collection_wrapper->get_marked( ).
lv_size = lr_col->size( ).
IF lv_size > 0.
DO lv_size TIMES.
IF sy-index = 1.
lr_current = lr_col->get_first( ).
ELSE.
lr_current = lr_col->get_next( ).
ENDIF.
lr_entity ?= lr_current.
typed_context->order->collection_wrapper->remove( lr_current ).
lr_entity->delete( ).
ENDDO.
lr_core = cl_crm_bol_core=>get_instance( ).
lr_core->modify( ).
typed_context->order->deselect_all( ).
ENDIF.
ENDMETHOD.
阅读(541) | 评论(0) | 转发(0) |