Tuesday, June 21, 2016

CRM Config layout based on object type and sub object type

To set Object type and Sub object type through code to differentiate between different order types - if diff order types need different CRM lay out in Web UI.

In BSP_WD_CMPWB tcode, in method DO_CONFIG_DETERMINATION

METHOD do_config_determination.
*CALL METHOD SUPER->DO_CONFIG_DETERMINATION
**  EXPORTING
**    iv_first_time = ABAP_FALSE
*    .

  DATA: lv_subtype     TYPE bsp_dlc_object_sub_type VALUE '<DEFAULT>',
        lv_object_type TYPE bsp_dlc_object_type     VALUE '<DEFAULT>'.

  lv_object_type = '<ObjectType 1>'.

  IF <Tran Type> EQ ‘ERP Sales Order’.
    lv_subtype = 'OR'.
  ELSE.
    lv_subtype = 'RE'.
  ENDIF.

*  ENDIF.
  me->set_config_keys( iv_object_type          = lv_object_type
                       iv_object_sub_type      = lv_subtype
                       iv_propagate_2_children = abap_false ).
ENDMETHOD.

We can extend the sub object type as below:
ZL_ERPORD_SUBOBJ_TYPE_CALLBACK->IF_BSP_DLC_OBJ_TYPE_CALLBACK~GET_OBJECT_SUB_TYPES 

Good Link:
http://scn.sap.com/community/crm/webclient-ui-framework/blog/2015/12/04
SPRO path:

To define new Object types:


Call back class with interface IF_BSP_DLC_OBJ_TYPE_CALLBACK


Implement the method to define Sub-Obj types


No comments:

Post a Comment