Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Applies to:

CRM 6.0/7.0

Summary

A how to guide on hiding assignment blocks of an overview page at run time.

Author(s):  

   Arun Prakash karuppanan
Company:     Accenture
Created on:    18 march 2010
Author(s) Bio
Arun Prakash Karuppanan is a senior developer with Accenture, working on CRM implementations

    The UI config utility  allows us to assign assignment blocks to a overview page depending on the user role, object type, component usage name etc., But, there may be cases where we would like to hide the assignment blocks based on some validations during run time. This wiki will show you how to do it.

Step 1 - Identify the name of the assignment block

      Go to the run time repository of the component. Note down the component usage name. Note down the interface view name. Now, the name of the assignment block page will be

'component_usage_name'.'interface_view_name'.   (concatenate both separated by '.' )

Step 2 - Overview page coding

Detaching Views

    In the overview page controller, redefine the method 'DETACH_STATIC_OVW_VIEWS'. This method will be called during each page refresh and will return views to be removed from the overview page.

DATA: ls_viewid TYPE bsp_dlc_ovw_stat_view_attach.
  CONSTANTS: c_view_id TYPE string VALUE 'CUBTOrgSet.BTORGSET/OrgSet'.
*do validations
*if validation fails    
ls_viewid-viewid = c_view_id.
APPEND ls_viewid TO rt_viewid.
*endif
 

Reattaching  Views

    In the same overview page controller, redefine the method 'REATTACH_STATIC_OVW_VIEWS'.

*basically the same code as in detach views. The return table carries the views to be reattached
*Make sure that the views are not attached already
 DATA: ls_viewid TYPE bsp_dlc_ovw_stat_view_attach.
  CONSTANTS: c_view_id TYPE string VALUE 'CUBTOrgSet.BTORGSET/OrgSet'. *if validation ok

  READ TABLE view_area WITH KEY appl_viewname = c_view_id
                                        type          = space
                                        traymode      = abap_undefined
                                        transporting no fields.
 if sy-subrc = 0.
     ls_viewid-viewid = c_view_id.
    APPEND ls_viewid TO rt_return.
endif.
*endif

Useful Information

CRM BSP Hide assignment blocks

4 Comments

  1. Former Member

    in several cases you have to use

    delete table rt_return from ls_viewid.

    instead of "append..." in the method 'REATTACH_STATIC_OVW_VIEWS'.

  2. Hi,
       I need to disable a field(grey out) in "Search Criteria" in WEB UI CRM Screen.
       Can anyone please guide me in completing it.

    Regards,

    Karthik S

  3. Hi Arun Very nice and helpfull...

    @Marcus You are right : i just had to delete from "Reattach*" Method.. in Bt125H_TASK.

    Thanks,

    Dhruvin

  4. Former Member

    What job role is required to configure the web UI through web page configuration?