cancel
Showing results for 
Search instead for 
Did you mean: 

How to create custom work center page

Former Member
0 Kudos

Hello, expert,

I have requirement to create a custom work center page. Basically we need a z-work center which contains a few custom logic links to open some custom views. For the z-work center, we need a target ID to open the work center page. I've done some search, couldn't find any good information on this.

I've checked the SAP WC page WCC_SLS_CYC, it basically re-use the component CRMCMP_GS_WC, and put three of them in the viewset, nothing else is done. Is this all we need to do? SAP would pass all the logical links configured for the WC to the component CRMCMP_GS_WC for displaying the links? Just not sure about this.

Please share some light on this.

Thanks

Jayson

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

has nobody created custom work center page before? I though this should be something many people have done.

Former Member
0 Kudos

seriously no one can help?

Former Member
0 Kudos

Hi Jayson,

   You can create custom workcenter page by following below steps.

  Use reference component as WCC_SLS_CYC

  • Create component using BSP_WD_CMPWB
  • create component usage as shown below

               ComponentUsage  Search

               Used Component  CRMCMP_GS_WC

               InterfaceView  IFVGroupLinks

               ComponentUsage Create

               Used Component  CRMCMP_GS_WC

               InterfaceView  IFVGroupLinks

               ComponentUsage Report

               Used Component  CRMCMP_GS_WC

               InterfaceView  IFVGroupLinks

  • Create Overview Page
  • Add Search, Create, Report  component usages to overview page
  • Create configuration for Overview Page , Select Configuration type as 'Workcenter Page' or ‘Home Page’
  • Copy the code of WD_USAGE_INITIALIZE method of WCC_SLS_CYC into your component.

      In line  

  ->set_s_struct( attribute_path = '' component = 'COMPONENT' value = 'WCC_SLS_CYC' )

    Here replace WCC_SLC_CYC by your component name.


  >-set_s_struct( attribute_path = '' component = 'INTERFACE_VIEW' value = 'MainWindow' )

  Here replace MainWindow with complete name of your window.(Usually Compname/MainWindow )

  • create inbound plug for main window and make window as interface view
  • Create target id in ‘Define Work Area Component Repository’
  • Create Logical Link in Nav Bar Profile

            Type :- work center

  • Add this logical link to particular work center

Hope it will solve your requirement.

kindly post your web-ui related query in

http://scn.sap.com/community/crm/webclient-ui-framework . So that you ll get reply little bit fast.

Regards

Rajarama U


Former Member
0 Kudos

Hi Rajarama

thanks for your detailed steps. I've followed your instruction and created the WC page, (specially re-defined the method WD_USAGE_INITIALIZE as in your post).

When I click on hte WC in the navigation bar, the viewset is diaplyed, however no links are shown in the views (Search, Create, etc.). What am I missing? Or what steps are still missing from your post?

I have followed your step strictly though

Thanks

Jayson

Former Member
0 Kudos

Hi Jayson,

Have you created Work Center Link Groups of type Search,Create etc. and added your logical links in Nav Bar Profile ?

Regards

Rajarama U

Former Member
0 Kudos

Hi Rajarama

yes, I defined WCLG with type of Create and Search. Certainly I marked the logical links as In Menu and Visible for my business role. Still I don't see any links displayed in my work center page. Any more clue to this?

Really appreciate you kind help.

Jayson

Former Member
0 Kudos

Hi Jayson,

  Can you share the screenshot of WD_USAGE_INITIALIZE method and Runtime repository of your component.?

Regards

Rajarama U

Former Member
0 Kudos

Rajarama,

below is my wd_usage_initialize method:

As for runtime repository, I don't know how to upload screenshot, but I've defined 2 component usage, one for search, one for create ( don't need report), added the main window as interfaceview, a viewset to include the component usage Search and Create. Not much else you can see in the Runtime repository.

method WD_USAGE_INITIALIZE.

   DATA: wccontext TYPE REF TO cl_bsp_wd_context_node.

   CASE iv_usage->usage_name.

     WHEN 'Search'.                                          "#EC NOTEXT

       TRY.

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

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

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

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

*          wccontext->set_s_struct( attribute_path = '' component = 'GROUP_ID' value = 'SLS-CYC-SP' ) ."#EC NOTEXT

         CATCH cx_root.

       ENDTRY.

     WHEN 'Create'.                                          "#EC NOTEXT

       TRY.

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

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

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

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

*          wccontext->set_s_struct( attribute_path = '' component = 'GROUP_ID' value = 'SLS-CYC-SP' ) ."#EC NOTEXT

         CATCH cx_root.

       ENDTRY.

     WHEN 'Reports'.                                         "#EC NOTEXT

       TRY.

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

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

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

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

         CATCH cx_root.

       ENDTRY.

WHEN 'SalesPlan'.                                         "#EC NOTEXT

       TRY.

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

           wccontext->set_s_struct( attribute_path = '' component = 'COMPONENT' value = 'Z_WC_TEST_V1' ) ."#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 = 'SLS-CYC-SP' ) ."#EC NOTEXT

         CATCH cx_root.

       ENDTRY.

   ENDCASE.

endmethod.

Former Member
0 Kudos

Hi Jayson,

In below code give complete name of your window. Replace MainWindow by Z_WC_TEST_V1/MainWindow and check.

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

Regards

Rajarama U

Former Member
0 Kudos

Hi Jayson,

I have a similar requirement. Do you have the solution for this issue? Is the solution purely configuration or does it include coding?

Thanks for sharing the solution.

Mike.

Former Member
0 Kudos

Hi Rajarama,

you are genius. It solved my problem.

I should have figured this out by looking closerly in my runtime repositiory.

Thank you so much

Former Member
0 Kudos

Mike,

just following hte post, you will get it work.

Answers (1)

Answers (1)

former_member205429
Contributor
0 Kudos

Hi Jayson,

1. Create a Custom Component in BSP_WD_CMPWB

2. Assign the custom component's Main window, Inbound plug in the SPRO

3. give the Logical Link, Work Centre and assign this to Navigational Bar Profile.

Pls let me know in case of any issues !!

Former Member
0 Kudos

San, not sure if you understood what I posted. What I need is to get the custom logical links that are configured for the custom WC (WC link groups) displayed in my WC component / view.