Skip to end of metadata
Go to start of metadata

[Requirement]

In copied SALESPRO business role, Reports work center, I would like to add some of my own reports. And wish they are displayed in a separate assignment block.

 

[Problem]

But the link I added does not show up in the web ui.



[Steps performed]
1. Define logical link pointing to the report

2. Define work center link group which contain the logical link created above

3. Assign the work center link group to the work center copied from standard SLS-REPORT

4. Assign the work center to the navigation bar profile defined

5. In business role customizing, activate it as Visible

 

[What was missing]

Two extra steps are needed besides the above customizing steps:

1. Enhance component WCC_SLS_REPORTS, in the Runtime Repository Editor->ComponentUsage, add another entry for the work center group I created with a proper Usage name

2. Enhance the "Component Controller" in the same component WCC_SLS_REPORTS, redefine CL_WCC_SLS__BSPWDCOMPONE5_IMPL's method WD_USAGE_INITIALIZE in the Z class by adding another WHEN coding by pointing to the Usage name added in the first point, and by passing value like

    WHEN 'HYCustomer'.                                          "#EC NOTEXT

      TRY.

          wccontext = iv_usage->get_context_node( 'WORKCENTERINF' ).

          wccontext->set_s_struct( attribute_path = '' component = 'COMPONENT' value = 'WCC_SLS_REPORTS' ) ."#EC NOTEXT

          wccontext->set_s_struct( attribute_path = '' component = 'INTERFACE_VIEW' value = 'MainWindow' ) ."#EC NOTEXT

          wccontext->set_s_struct( attribute_path = '' component = 'GROUP_ID' value = 'ZHY-SLS-RE' ) ."#EC NOTEXT

        CATCH cx_root.

      ENDTRY.

 

[Result]

Then the new report links won't be displayed in the existing standard assignment block, but a separate assignment block which is for "HY Customers" only.

 

[Analyzing]

Debugged in

CL_CRMCMP_G_GROUPLINKS_IMPL              DETERMINE_ALL_LINKS

(where the system is reading already set group_id to read in the customizing.)

And

CL_BSP_WD_VALUE_NODE             IF_BOL_BO_PROPERTY_ACCESS~SET_PROPERTY

(where the system set the group_id, which is triggered from WD_USAGE_INITIALIZE)

 

Please add me in WeChat public account: SAPCRMGENE

We are posting our content in both English and Chinese.