Quantcast
Channel: SCN: Message List - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 7775

Re: deleting records

$
0
0

Hi Dharma,Please code for delete.

 

me->typed_context->result->collection_wrapper->find( iv_index = lv_index ).

  lo_current = me->typed_context->result->collection_wrapper->get_current( ).

 

  TRY.

      lo_entity ?= lo_current.

    CATCH cx_sy_move_cast_error.

  ENDTRY.

 

* Get the action clicked on

  SPLIT htmlb_event_ex->event_defined AT '.' INTO lv_event lv_indx.

 

  CASE lv_event.

* Delete the current entity

    WHEN 'delete'.

      IF lo_entity IS BOUND.

* Lock the entity if locking fails nothing happens

 

        lo_messages_bd = lo_entity->get_message_container( ).

        lv_success = lo_entity->switch_to_change_mode( ).

*        IF lo_entity->is_locked( ) = abap_true.

        IF lv_success = abap_true.

          lo_entity->delete( ).

          lo_core = cl_crm_bol_core=>get_instance( ).

          lo_core->modify( ).

 

        ENDIF.

 

 

regards,

rama


Viewing all articles
Browse latest Browse all 7775

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>