cancel
Showing results for 
Search instead for 
Did you mean: 

CRM 7 enable and disable an assignment block

Former Member
0 Kudos

good morning,

I would need to enable and disable an assignment block , depending on a condition.

I wonder if it is possible.

(I've seen something similar to hide an assignment block: Dynamcally hiding an assignment block - CRM - SCN Wiki)

thank you very much

Accepted Solutions (1)

Accepted Solutions (1)

former_member188098
Active Contributor
0 Kudos

Hi Victor,

This can be done by following ways:-

1) Make two different configurations (enable and disable ) and depending up on some condition call

the required one.

2) Use of method view group context.

have a look into :-

SAP CRM WEB UI : 47.UNDERSTANDING VIEW GROUP CONTEXT

Editable Overview Pages - SAP Documentation

Regards,

Answers (3)

Answers (3)

Former Member
0 Kudos

thanks for your answers.

in detail, the standard component SRQM_INCIDENT_H has a view_set SRQM_INCIDENT_H / IncidentHeaderEF, and this has a

ViewArea ReasonCatgoriesDDLBVA one, and this has a view  CUBTCategories_C.BTCATEGORIES / OVEWindow.

The latter view is the one I want to hide, if there is one condition. I think the problem is that this view comes from a ComponentUsage CUBTCategories. When I try to access the east by the program:

data: lr_window        TYPE REF TO ZL_SRQM_INC_INCIDENTOVP_IMPL , " cl_bsp_wd_window,
       lr_viewset       TYPE REF TO cl_bsp_wd_view_controller,
       lr_controller      TYPE REF TO ZL_SRQM_INC_INCIDENTOVP_IMPL.

   lr_window ?= me->m_parent.

  lr_viewset ?= lr_window->get_subcontroller_by_viewname( 'SRQM_INCIDENT_H/IncidentHeaderEF' ).

  data lr_slsoitemview         TYPE REF TO CL_BTCATEGO_OVEWINDOW_IMPL. "ZL_BTCATEGO_CATEGORIES_IMPL .
  lr_slsoitemview  ?= lr_viewset->get_subcontroller_by_viewname( 'CUBTCategories_C.BTCATEGORIES/OVEWindow' ).

  data lr_catego         TYPE REF TO ZL_BTCATEGO_CATEGORIES_IMPL. "ZL_BTCATEGO_CATEGORIES_IMPL .
  lr_catego  ?= lr_slsoitemview->get_subcontroller_by_viewname( 'BTCATEGORIES/Categories' ).

the value: lr_catego->view_group_context, is initial.

Please, you have any idea

former_member188098
Active Contributor
0 Kudos

if view_group_context, is initial.


in the view controller class redefine SET_VIEW_GROUP_CONTEXT

add following code.

  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.

endif.

I

Regards,

Former Member
0 Kudos

Thanks Harish,

but that method is executed once, but I need each time the page is refreshed

Best regards,

Former Member
0 Kudos

Hi ,

You can use the methods :

DETACH_STATIC_OVW_VIEWS

REATTACH_STATIC_OVW_VIEWS

Thanks,

Anitha

Former Member
0 Kudos

Thanks Anitha,

I have checked both methods, and run each time the page is refreshed, but I do not know how to programing for enableb / disabled view

Best regards
Former Member
0 Kudos

Hi ,

in detach..

DETACH_STATIC_OVW_VIEWS

DATA: ls_viewid TYPE bsp_dlc_ovw_stat_view_attach.

 
CONSTANTS: c_view_id TYPE string VALUE 'view name'.

 
if g_relcat ne 'CRMH07'. "conditionto want to make it disable"

     ls_viewid
-viewid = c_view_id.

APPEND ls_viewid TO rt_viewid.

endif.

REATTACH_STATIC_OVW_VIEWS

DATA: ls_viewid TYPE bsp_dlc_ovw_stat_view_attach.

CONSTANTS: c_view_id TYPE string VALUE 'view name'

 
if g_relcat eq 'CRMH07' .

    
CALL METHOD SUPER->REATTACH_STATIC_OVW_VIEWS .

   ls_viewid
-viewid = c_view_id.

   
APPEND ls_viewid TO rt_return.

endif.

Thnaks.,

Anitha

Former Member
0 Kudos

anitha thanks

but the view IncidentHeaderEF is not an overview. the view IncidentHeaderEF I had to disable field to field with the method GET_I_ * .

sorry, for not having detailed at the beginning of the forum.

Best regards,

Arno-Meyer
Advisor
Advisor
0 Kudos

Hi Victor,

there are some use cases for which such a dependency has been implemented (e. g. Account Life Cycle).

Perhaps note 1260695 (Data set-specific screen control) is interesting for you.

In general I would recommend to post this question rather in another area of SCN. I guess is the right place.

Best regards,

Arno