cancel
Showing results for 
Search instead for 
Did you mean: 

Disabled Custom Fields

itabhishek9
Participant
0 Kudos

Hi SDNites,

I have created a custom component (assignment block) and have consumed the same in std. component SRQM_INCIDENT_H. All the fields which are in assignment block are seen as non-editable. Could you please guide me what is the way to make it editable.

Regards,

Abhi

Accepted Solutions (0)

Answers (6)

Answers (6)

deepika_chandrasekar
Active Contributor
0 Kudos

Hi,

Did you check in .htm page iv_all_rows_editable is X instead of space?.

cl_thtmlb_util=>translate_selection_mode(

  exporting

  iv_selection_mode    = Ccontextnode->SELECTION_MODE

  iv_all_rows_editable = 'X'

  importing

  ev_selection_mode   = lv_cellerator_selectionmode

  ev_edit_mode        = lv_cellerator_editmode

  ev_selection_column = lv_cellerator_selectioncolumn ).

Regards,

Deepika.

sumeet_gehlot
Contributor
0 Kudos

Hi,

Use this code on Edit button

DATA:

       lr_entity       TYPE REF TO cl_crm_bol_entity,

       lr_comp         TYPE REF TO cl_bspwdcomponen_impl  .

     lr_comp ?= me->comp_controller.

     CHECK lr_comp IS BOUND.

     lr_entity ?= lr_comp->typed_context->contectnodename->collection_wrapper->get_current( ).

     CHECK lr_entity IS BOUND.

     IF lr_entity->lock( ) = abap_true.

       me->view_group_context->set_view_editable( me ).

     ENDIF.

     lr_entity ?= me->typed_context->nodename->collection_wrapper->get_current( ).

     IF lr_entity IS BOUND.

*      lr_entity->switch_to_change_mode( ).

       lr_entity->lock( ).

     ENDIF.


Regards,

Sumeet

Former Member
0 Kudos

Hi Abhishek ,

You can check using the  following code in the set method of the attributes which belong to the context node linked to your component ...

IF iterator IS BOUND.
    current
= iterator->get_current( ).
    lr_entity ?= current
.
   
IF lr_entity IS BOUND AND lr_entity->is_changeable( ) = abap_false.
      lr_entity
->switch_to_change_mode( ).
   
ENDIF.
 
ELSE.
    current
= collection_wrapper->get_current( ).
    lr_entity ?= current
.
   
IF lr_entity IS BOUND AND lr_entity->is_changeable( ) = abap_false.
      lr_entity
->switch_to_change_mode( ).
   
ENDIF.
 
ENDIF.



Thanks ,

Vaibhav

former_member188098
Active Contributor
0 Kudos

Hello Abhi

you can do it by get_i fields of attribute and also with view_group_context->set_all_editable( )..

For more detail check  SAP CRM WEB UI : 47.UNDERSTANDING VIEW GROUP CONTEXT

and also take a look into    CRM 7 enable and disable an assignment block | SCN

Hope it will help.

Regards

Former Member
0 Kudos

Hello Abhi,

Redefine the set_view_group_context method of your window controller and over view page for your custom component and make sure that the view_group_context is bound and in the overview page set_view_group_context method use this view_group_context->set_all_editable( ).

Regards,

  Bala.

former_member214667
Contributor
0 Kudos

Hi Abhishek,

The possibility of editing a block is controlled by two things:

1) view group context that switches the entire block to edit and display modes

2) I-getters of each attribute, if defined, that make each attribute editable when the block is in edit mode

You need to explore these aspects.

Regards,
Shiromani