Skip to Content

HCM Processes & Forms is a flexible framework that allows automation of business processes.  After a process is initiated, HR Administrator can search for the processes and view details of the process (Process Status, Processor etc). The standard search application allows the process search with some selection criteria, mostly these fields are part of T5ASRPROCESSES / T5ASRSCENARIOS / T5ASRSTEPS tables.

What if the administrator wants to?

  • Search for processes based on the values entered in the form!
  • Display some of the fields from the form in search output
  • Add quick comment to processes.
  • Re-assign the process to someone else (may be the current processor is on long vacation/has left the organization)

I had the privilege of working for a client which had above requirements.  At first I thought this is not possible! After getting my hands dirty and debugging the Search processes/framework, I realised how flexible is this framework to cater for these requirements. At the end of the day it was a simple application with lot of features for administrator!

Let’s get started on how I solved this puzzle!

This application is developed in webdynpro ABAP using webdynpro components WDR_SELECT_OPTIONS, SALV_WD_TABLE and POBJ_BROWSER.  The logic to search processes based on the form field values and add form fields to search output is detailed below.

  1. Table T5ASRPROCESSES:  Do the initial select on this table to filter the process list using standard selection criteria.
  2. CLASS CL_HRASR00_PROCESS_RUNTIME(this is one of my favourite class in HCM P & F, you can realize many custom requirements using this class):
    • Instantiate this class using scenario guid and use method ‘get_latest_data_container’ to get the data container (read values from case management).
    • Get the values of fields from the data container using class cl_hrasr00_data_container. You will have table of fields with corresponding values.
    • Use the field values from the previous step and filter the search output or add the fields to the output. I used customizing table to configure a list of fields required as output in search result. This made life even easier along with dynamic context node and ALV (using class cl_abap_structdescr to construct dynamic structure for ALV).

Below is the screenshot of the application. The field labels masked in select option are the common fields across the processes. These are not part of SAP standard search application nor stored in T5ASRPROCESSES/ T5ASRSCENARIOS/T5ASRSTEPS table. These field values are stored in case management.

Capture1.PNG

The search output has fields from form:

Capture2.PNG

The actions performed on the process are:

  • Reassign:  Standard function module ‘SWW_WI_FORWARD’  is used to reassign work item.
  • Add Comments:  Class ‘CL_HRASR00_PROCESS_RUNTIME’ is used to read/write comments to process. Method if_hrasr00_pobj_note~get_notes_of_scenario gets all the previous comments entered in the process. Method ‘assign_notes_2_current_scen’ adds new comments to the process.
  • Details: Webdynpro component ‘POBJ_BROWSER’ is reused to display the details of the process in popup.(same as the standard search process ‘Details’ button )

Hope this could help others solve their requirements with process search!

To report this post you need to login first.

1 Comment

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

Leave a Reply