How to refine a HCM Process and display the HCM Form in the browser from MSS

By Sanket sethi, HCL Technologies

This document describes how to enhance a Standard WD component and how to refine a HCM Process and display the HCM Form in the browser from MSS. 

To do this, we need to enhance the Standard WD component as describe in detail below. 

Enhancement of the WD Component:

The enhancement will be implemented on the following standard SAP Web-dynpro component:


The sub components that will be affected are:

·         STATUS_CHANGE method of Component controller  

The Web-dynpro component “Z_TRY_COMPLETE” should also be created by copying the standard WD4A component “HRASR00_PROCESS_EXECUTE”, it will discuss in later steps.  

An enhancement to “STATUS_CHANGE” method of the component controller is to be done as follows:  

·         Create an enhancement on method “STATUS_CHANGE”. Name the enhancement will be as follows:

  • Enhancement Implementation: Z_TRY_COMPLETE

  • Short Text: Try Complete from enhancement implementation.  

TO DO Example to Enhance the View:  

Double Click on Componentcontroller in display mode and click on Enhance button. Refer to the screenshot for example:  


It will open a popup window; fill Enhancement Implementation as “Z_TRY_COMPLETE” and Short Text as “Trial Complete From enhancement implementation”. Refer to the screenshot below:  

Create an Overwrite Exit implementation which will contain the logic to display the HCM PROCESS form.  

To Do Example to create an Overwrite Exit:  

Open your Componentcontroller in display mode and click on Enhancement button. Refer to the screen shot to enhance. Now, it will open a popup window, select your Enhancement “Z_TRY_COMPLETE” and click on OK button. Refer to the screenshot below:  

Now click on the method tab of the controller and scroll right. It will display you the Overwrite-exit method for creation. Select the standard method and write here your code which will trigger after the standard method.  

The logic in the Overwrite Exit implementation (after getting the button ID (L_BUTTON_ID) of Status change button 

From FPM) above is as follows:  

Copy the code of Status change method and paste it in Overwrite method and then edit the code. The edited code will then overwrite the standard code and will open an external window as per the requirement.  

* Try a trick to open an external window for HCM FORM PROCESS,
if l_button_id eq 'COMPLETE'.

data lo_window_manager1 type ref to if_wd_window_manager.
data lo_api_component1  type ref to if_wd_component.
data lo_window          type ref to if_wd_window.
data url type string.

      lo_api_component1  = wd_this->wd_get_api( ).
      lo_window_manager1 = lo_api_component1->get_window_manager( ).

      URL = 

          URL            = URL
          MODAL          = ABAP_FALSE
          HAS_MENUBAR    = ABAP_TRUE
          HAS_TOOLBAR    = ABAP_TRUE
WINDOW         = lo_window.
      lo_window->open( ).

     Activate your work.

Ø       Note:

This enhancement code will open an external window for WD4A application Z_TRYCOMPLETE.  

·         Now Create a Web dynpro program “Z_TRY_COMPLETE” by copying the standard web dynpro Component “HRASR00_PROCESS_EXECUTE”.  

·         Activate your work.  

·         Now edit the method SELECT_PROCESSES of the component controller as shown below:  

Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image