Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
JohnWick
Active Participant

You create or maintain a process by transaction PEST; A simple example which will be used throughout this article is the following:

Capture.PNG

In this model, the unique root node is the German payroll driver RPCALCD0. It constitutes the first step of this process model. In the second and third step, payslips are printed by the RPCEDTD0, and payroll accounts are generated by the RPCKTOD0. In other words, the node "Payroll" has two children, namely the nodes for RPCEDTD0 and RPCKTOD0, respectively. One also says that these two nodes have the "Payroll" node as a parent. Note that an e-mail notification will be sent after the execution of RPCEDTD0. This is indicated by the symbol in the upper right corner of the corresponding box. Associated with this model is the selection program H99_SELECT_PERNR.

A process model is executed via the HR Process Workbench which can be called by transaction PUST. The following diagram illustrates the program flow of a process in its simplest form:

Capture.PNG

With transaction SWEL you can monitor all events that have been raised by a process model. In our example the event trace looks as follows:
Capture.PNG

After these preparations, we are now in a position to collect some hints how to debug the above steps of a process model.

  • How to debug the selection program:
    1. Create a process in transaction PUST.
    2. Start this process by pressing F8.
    3. Choose "Immediately" on the upcoming pop-up.
    4. On the selection screen of the report, fill in the data, enter "/h" in the command field, press Enter, and execute the program.
      Capture.PNG

From now on, we assume throughout that a process has already been carried out by transaction PUST.

  • How to debug the reports along with their variants used during a process:
    1. In transaction PUST, right-click on the number of the process you want to analyze. Go to "Display additional information" and keep in mind the starting time of this process.
    2. Start transaction SM37. Enter WF-BATCH as user name and choose the time appropriately around the starting time of the process. You obtain a list containing the jobs executed during the process. If you want to debug one of this jobs, mark the job in question, enter JDBG in the command field, and press Enter.
      Capture.PNG 

                                                                                                                                                                                                                                                                

  • How to debug a single step of a process:
    1. Set a breakpoint in method DETERMINE_SUPPLIED_OBJECTS of class CL_HR_PM_PW_PROCESS_PROG at line 47 for the command  CALL METHOD me->modify_parcel_objects.
    2. Go to transaction SE37, choose HRPY_PROCESS_WORK_ON_EVENT as  function module, and press F8 (Test/Execute).
    3. In the following screen click on "Debugging".
    4. Press "Save" on the two upcoming pop-ups without entering anything.
    5. Press F7. After that, you are at the coding of HRPY_PROCESS_WORK_ON_EVENT.
    6. Press F6.
    7. Change the values of the variables H52SPS-PROCESSID, H52SPS-STEPID, EVT_NAME, P_CONT as follows:
      H52SPS-PROCESSIDprocess number from transaction PUST
      H52SPS-PROCESSID0000000001 for the first step, 0000000002 for the second step, etc.
      EVT_NAMEJOB_STARTED
      P_CONTX
      Capture.PNG
    8. At the breakpoint jump to the next statement by putting the cursor on the next statement in line 51 and choose "Goto Statement" in the "Debugger" menu. (Otherwise, the system recognizes that this step has already been performed and proceeds in a different way.)
    9. Note that the job generated by the function module is no longer planned by user WF-BATCH, but by the user who started the function module.

  • How to debug all children of a process step. This also enables you to monitor how the STEP_ENDED event is raised:
    1. Proceed similarly as for the first step, but at point 7. choose the appropriate values for the parent node:
      H52SPS-PROCESSIDprocess number from transaction PUST
      H52SPS-STEPIDthe step ID of the parent node
      H52SPS-RUNIDthe run ID of a finished run of the parent node from transaction PUST, e.g. 0000000001 for the first run
      H52SPS-PARAIDe.g. 000001
      EVT_NAMEJOB_ENDED
      P_CONTX
  • How to debug the communication such as e-mail notifications after a step has ended:
    1. Go to transaction SE37, choose HRPY_PROCESS_COMMUNI_ON_EVENT as  function module, and press F8 (Test/Execute).
    2. In the following screen click on "Debugging".
    3. Press "Save" on the two upcoming pop-ups without entering anything.
    4. Press F6.
    5. Change the values of the variables H52SPS-PROCESSID, H52SPS-STEPID, EVT_NAME, P_CONT as follows:
      H52SPS-PROCESSIDprocess number from transaction PUST
      H52SPS-STEPIDstep ID from PUST for the step you want to monitor, e.g. 0000000001


1 Comment
Labels in this area