Quantcast
Channel: SCN : Discussion List - Customer Relationship Management (SAP CRM)
Viewing all articles
Browse latest Browse all 4296

Edit ( Button )

$
0
0

Heloo Everyone

 

I have a doubt in the coding for requirement to edit fields in a view using a  button

 

  DATA: lv_ent TYPE REF TO cl_crm_bol_entity,

        lr_vgc TYPE REF TO if_bsp_wd_view_group_context,

        lr_compco TYPE REF TO zl_z00_h_bspwdcomponent_impl.

 

  lr_compco ?= me->comp_controller.

  lv_ent ?= lr_compco->typed_context->btadminh->collection_wrapper->get_current( ).

  CHECK lv_ent IS BOUND.

 

  IF lv_ent->lock( ) = abap_true.

    me->view_group_context->set_all_editable( ).

  ENDIF.

 

(above code is written in EDIT event  of my viewset in the component)

 

In the VIewset i redefined DO_PREPARE_OUTPUT  and i added a button

and also i redefined SET_VIEW_GROUP_CONTEXT and wrote the following code in this method

 

  IF iv_parent_context IS INITIAL.

    CREATE OBJECT me->view_group_context TYPE cl_bsp_wd_view_group_context.

  ELSE.

    me->view_group_context = iv_parent_context->get_dependant_vg_context( ).

    IF iv_parent_context->is_all_views_editable_set( ) = abap_true.

      me->view_group_context->set_all_editable( ).

    ENDIF.

  ENDIF.

 

(when i check in debugging IV_PARENT_CONTEXT is already created reference to IF_BSP_WD_GROUP_CONTEXT )

I can't understand how it is created before entering into the method

and using IV_PARENT_CONTEXT we called method IS_ALL_VIEWS_EDITABLE_SET

please help me in the above codenwhat is actually happening there

 

Ideas will be rewarded

 

Thanx and Regards

Dinesh

 


 



Viewing all articles
Browse latest Browse all 4296

Trending Articles



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