Requirement: Displaying Orders on Home screen of ADMIN or ASM (Area Sales Manager ) to review an order with the Incentive Amount(custom field which is having some ordering value) and then approve/reject the Incentive Amount in the order justifying the reason behind it by entering the Incentive Amount  Rejection note. The ordering process is made very simple where SR needs to choose the Sold to Party, relevant products, enter product quantity and Incentive Amount while the other information get auto determined. The Order with Incentive Amount gets approved, First by ASM (Sales Manager) and then by ADMIN. This entire approval process of Orders in the CRM dashboard is extremely time and effort efficient.

Orders displayed in Custom Dashboard are based on:

•Display Custom Dashboard only to few countries

•Orders Should have the OMV value

•Custom Dashboard is enabled to only ASM/ADMIN

•Approve/Reject by ASM/ADMIN for the orders

Go to Component: BT115H_SLSO

Create a new view Zorderdashboard with required fields.

1.JPEG.png

Now write the logic to get the orders based on territory and shop money value and status.

Write the logic in DO_PREPARE_OUTPUT.

1) Get the user logged in check he is ADMIN/ASM

2) Read all territories of the user by using FM CRM_TERRMAN_TERR_BY_EMP_OBJ.

2.JPEG.png

3) Fetch all the territories that are assigned under ASM/ADMIN

3.JPEG.png

4) Fetch all the employees of the territory and by using the CRMD_ORDER_INDEX table get all the orders.

5) Get the order details by using FM: CRM_ORDER_READ.

4.JPEG.png

6) Then prepare the structure to display them in UI

5.JPEG.png

The view needs to be displayed in home screen

So to display one view in another component we need to create the Component usage.

Create a window for the dashboard view

6.JPEG.png

Now go to run time repository:

Add the window and the Dashboard view

7.JPEG.png

Now add the interface view

8.JPEG.png

Now add the interface view to component usage

9.JPEG.png

Now add the same component usage in Home screen component.

Go to home screen component: WCC_SLS_HOME

Go to Run time repository and add the component usage

10.JPEG.png

10.JPEG.png

Now the view will be seen in the home screen.

Logic to enable the view only to ASM/ADMIN will be written in below methods:

DETACH_STATIC_OVW_VIEWS/REATTACH_STATIC_OVW_VIEWS

So in DETACH_STATIC_OVW_VIEWS Method

We should add the logic not to remove the custom view for ADM/ASM

View id is component usage.viewname

Component usage is CU_ORDERDASHBOARD

View name: ZBT115H_SLSO_P/ZWinDashboard

/wp-content/uploads/2015/01/1_525709.png

And for the method REATTACH_STATIC_OVW_VIEWS

We should add the logic to add the custom view for ADM/ASM

/wp-content/uploads/2015/01/2_jpeg_525632.png

Now open the UI:

Configure the custom View in page configuration:

/wp-content/uploads/2015/01/3_jpeg_525634.png

/wp-content/uploads/2015/01/2_573006.png

Take the order 5004721 and reject it.

/wp-content/uploads/2015/01/1_573041.jpeg

Rejected order disappears from the screen after entering the rejected notes.

Check in GUI the rejected notes:

/wp-content/uploads/2015/01/3_573046.png

Now approve the order 5004799

/wp-content/uploads/2015/01/3_573046.png

Check the status in GUI:

/wp-content/uploads/2015/01/2_573006.png

Now login to ADMIN this 5004799 order will be available in ADMIN as it is approved by ASM.

/wp-content/uploads/2015/01/3_573046.png

Now approve the order 5004799 and check the status of the order and it will be completed.

/wp-content/uploads/2015/01/1_525709.png

We need to implement the whole logic of APPROVE/REJECT using events and to store the Rejected Notes/status using the FM CRM_ORDER_MAINTAIN for both ADMIN/ASM.

In this way entire approval process of Orders in the CRM dashboard is implemented.

Hope this helps!!

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

    1. anitha chinta Post author

      Hi Dharmakasi ,

      By events ,one click actions.

      In method

      GET_OCA_T_TABLE

      id      = ‘APPROVE’.

                    “#EC NOTEXT

        “ls_one_click_action-icon    = ‘edit.gif’.                 “#EC NOTEXT

        ls_one_click_actiontext    = cl_wd_utilities=>get_otr_text_by_alias( ‘ZCRM/APPROVE_OCA’ ).                   “#EC NOTEXT

        ls_one_click_actiontooltip = ‘APPROVE’.

        ls_one_click_actionactive  = ‘X’.                        “#EC NOTEXT

        APPEND ls_one_click_action TO rt_actions.

      *  * one click action “Delete”

        CLEAR ls_one_click_action.

        ls_one_click_actionid      = ‘REJECT’.                   “#EC NOTEXT

        “ls_one_click_action-icon    = ‘delete.gif’.               “#EC NOTEXT

        ls_one_click_actiontext    = cl_wd_utilities=>get_otr_text_by_alias( ‘ZCRM/REJECT_OCA’ ).                   “#EC NOTEXT

        ls_one_click_actiontooltip = ‘Reject’.

        ls_one_click_actionactive  = ‘X’.                        “#EC NOTEXT

        APPEND ls_one_click_action TO rt_actions.

      Thanks,

      Anitha

      (0) 

Leave a Reply