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.
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.
Fig 2: Scenarios
Steps:
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.
Fig 3: TCode : bsp_wd_cmpwb
Fig 4: Complete the Wizard
Step 2:
Generate the relevant methods:
Generate the GET_P Method
Fig 5: Click on Yes in the above Popup.
Step 3:
Add the coding in the GET_P method:
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:
Fig 7: Code in GET Method of the Attribute
Step 5:
Add the attribute to the GET_TABLE_LINE_SAMPLE method:
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.
Fig 9: Configuration of the Table View
Now let is test.
Fig 10: Output Screenshot
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.