Monday, 20 November 2023

Service Due Indicator for Managers

Background:


In Many Tables there might be a need to provide a quick high-level view of the Pending status of every record for a quick view by Managers.

For example, a Service Team Manager might want to see the list of Service Orders whose Service Due date is in the past (or) Service Due date which is today (or) Service Due date which is in future.

In these scenarios, we can provide an Indicator in the first column so that the Manager will be able to see the status immediately.

In this blog, I have explained a scenario where we can add a Status column to the Table which in turn will give immediate view to the Service Manager on the status of the Service records.

SAP ABAP Development, SAP Career, SAP Skill, SAP ABAP Jobs, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Materials
Fig 1: Sample Output

In the above screenshot, in the status column the Status Symbol is different for Different transactions based on the Service Due Date.

SAP ABAP Development, SAP Career, SAP Skill, SAP ABAP Jobs, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Materials
Fig 2: Scenarios

Steps:

  1. In TCode bsp_wd_cmpwb , go the Component / View. Go to the Context node for the Table view and add the Attribute for the Status.
  2. Generate the relevant methods.
  3. Add the coding in the GET_P method.
  4. Add the coding in the GET method.
  5. Add the attribute to the GET_TABLE_LINE_SAMPLE method.
  6. Do the configuration in the configuration tab and keep this attribute as the first column.

Detailed Steps:


Step 1:

In TCode bsp_wd_cmpwb , go the Component / View. Go to the Context node for the Table view and add the Attribute for the Status.

SAP ABAP Development, SAP Career, SAP Skill, SAP ABAP Jobs, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Materials
Fig 3: TCode : bsp_wd_cmpwb

SAP ABAP Development, SAP Career, SAP Skill, SAP ABAP Jobs, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Materials

SAP ABAP Development, SAP Career, SAP Skill, SAP ABAP Jobs, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Materials
Fig 4: Complete the Wizard

Step 2:

Generate the relevant methods:

SAP ABAP Development, SAP Career, SAP Skill, SAP ABAP Jobs, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Materials
Generate the GET_P Method

SAP ABAP Development, SAP Career, SAP Skill, SAP ABAP Jobs, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Materials
Fig 5: Click on Yes in the above Popup.

Step 3:

Add the coding in the GET_P method:

SAP ABAP Development, SAP Career, SAP Skill, SAP ABAP Jobs, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Materials
Fig 6: Code in GET_P Method

METHOD GET_P_SERVICE_STATUS.
****************************************************************************************************
* Here we define the Property of the field.
****************************************************************************************************
CASE iv_property.
WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
rv_value = cl_bsp_dlc_view_descriptor=>field_type_image.
ENDCASE.

ENDMETHOD.

Step 4:

Add the coding in the GET method:

Get the Date of Service Due date (into a variable lv_serv_due_date ) and do the Comparison and add the Status accordingly as per below code:

SAP ABAP Development, SAP Career, SAP Skill, SAP ABAP Jobs, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Materials
Fig 7: Code in GET Method of the Attribute

Step 5:

Add the attribute to the GET_TABLE_LINE_SAMPLE method:

SAP ABAP Development, SAP Career, SAP Skill, SAP ABAP Jobs, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Materials
Fig 8: CODE in GET_TABLE_LINE_SAMPLE method

Step 6:

Do the configuration in the configuration tab and keep this attribute as the first column.

SAP ABAP Development, SAP Career, SAP Skill, SAP ABAP Jobs, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Materials
Fig 9: Configuration of the Table View

Now let is test.

SAP ABAP Development, SAP Career, SAP Skill, SAP ABAP Jobs, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Materials
Fig 10: Output Screenshot

SAP ABAP Development, SAP Career, SAP Skill, SAP ABAP Jobs, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Materials

Conclusion:

By looking at the above table in the first column, the Service Manager will be able to get an immediate view of the Orders that need immediate attention and plan accordingly and this in turn will lead to increased Customer satisfaction.

SAP ABAP Development, SAP Career, SAP Skill, SAP ABAP Jobs, SAP ABAP Prep, SAP ABAP Preparation, SAP ABAP Tutorial and Materials

No comments:

Post a Comment