Professional Documents
Culture Documents
Debugging HR Trigger - GRAC - HR - TRIGGER - EVENT - RECIEVER - Governance, Risk and Compliance - SCN Wiki
Debugging HR Trigger - GRAC - HR - TRIGGER - EVENT - RECIEVER - Governance, Risk and Compliance - SCN Wiki
Community WIKI SAP Community Welcome, Guest Login Register Search the Community
Purpose
This WIKI is intended to assist customers in getting their HR trigger scenarios working.
This document should be reviewed by programmers or technical people. This document is not meant to functional people without technical knowledge, as it explains how to set up breakpoints, and how to
fill out the HR trigger function module in the GRC foundation system to debug possible root causes.
Overview
Below will be detailed most important code points that should be analysed during debug.
The whole scenario of building HR triggers is not the goal here. I assume the scenario is in place, but is giving errors such as "Rules are not satisfied for Employee ID...", and "No match found for the given
context (DECISION_TABLE)".
1- Browse to the main function object, and make sure the component name is called "HR_TRIGGER_TABLE", nothing else. It can be found under function details section, under tab "Signature". I have
seen this component name called as "HR_TRIGGER_RULES_TABLE", for instance, and it will not work.
2- Make sure to have correct logic in the decision table. Below are some examples, do not copy and paste into your decision table before getting this confirmed by your HR team. Every company is
different, and it very much depends on what information the HR team will provide you in order to build the correct decision table.
Connector Tab. name Subtype Field Name New Field Value Old Field Value Action ID
<connector> 0105 0001 USRID is not initial <> New Field Value NEWH
Make sure that you rename the "New Field Value" and "Old Field Value", and do not leave both of them as "Field Val.". This is confusing and in the decision table you may be treating the new value as old,
and the old as new. So to avoid this confusion, make sure to rename these objects, to have NEW and OLD text in their names. This has been the root cause of one issue.
3- Create the objects: Function, Ruleset, two Rules, Decision Table, Loop, and two data objects of type Table.
4- Check the decision table settings, the recommended settings are (for basis hr trigger scenario):
For more information on how a step by step guide to create the BRF+ HR Trigger
application and all the objects with basic logic, please visit blog:
https://wiki.scn.sap.com/wiki/display/GRC/Debugging+HR+Trigger+-+GRAC_HR_TRIGGER_EVENT_RECIEVER 1/6
7/9/2019 Debugging HR Trigger - GRAC_HR_TRIGGER_EVENT_RECIEVER - Governance, Risk and Compliance - SCN Wiki
Also, check out this blog, if HR Triggers BRF+ rule getting too complex?
Actions in HR system
In the HR system, whenever activities are performed in PA40, some data will be logged in SLG1 by the GRC HR triggers.
For example: A new hire activity has been performed in PA40, and in SLG1 we can see the following triggered data:
Now, we will make sure that parameters 1000 and 1001 are maintained:
2- Execute SE37
4- Fill out the parameters of the function module based on the SLG1 data logged in the HR system:
https://wiki.scn.sap.com/wiki/display/GRC/Debugging+HR+Trigger+-+GRAC_HR_TRIGGER_EVENT_RECIEVER 2/6
7/9/2019 Debugging HR Trigger - GRAC_HR_TRIGGER_EVENT_RECIEVER - Governance, Risk and Compliance - SCN Wiki
EMPLOYEE_DATA: enter all fields that appear in SLG1. If there are too many fields logged in SLG1, then we may disconsider the ones not relevant to the case.
5- Execute the function module. Below are some strategic breakpoints you may set beforehand:
https://wiki.scn.sap.com/wiki/display/GRC/Debugging+HR+Trigger+-+GRAC_HR_TRIGGER_EVENT_RECIEVER 3/6
7/9/2019 Debugging HR Trigger - GRAC_HR_TRIGGER_EVENT_RECIEVER - Governance, Risk and Compliance - SCN Wiki
https://wiki.scn.sap.com/wiki/display/GRC/Debugging+HR+Trigger+-+GRAC_HR_TRIGGER_EVENT_RECIEVER 4/6
7/9/2019 Debugging HR Trigger - GRAC_HR_TRIGGER_EVENT_RECIEVER - Governance, Risk and Compliance - SCN Wiki
→ The trivial point is the actual evaluation of the decision table, so you can analyse what is
being compared against what, and why it is not matching the results.
Above, note that there are always two variables. One comes from decision table context (what you have mapped into your decision table) and one from the inputs of the function module (data triggered by
HR trigger). By doubleclicking the variables, you can see their contents down in the screen. Basic programming skills is required to be able to analyse the scenario and the variables. Also it is possible to
observe the loops and rules logic that has been built once you activate the BRF rule. It generates the above code.
https://wiki.scn.sap.com/wiki/display/GRC/Debugging+HR+Trigger+-+GRAC_HR_TRIGGER_EVENT_RECIEVER 5/6
7/9/2019 Debugging HR Trigger - GRAC_HR_TRIGGER_EVENT_RECIEVER - Governance, Risk and Compliance - SCN Wiki
Finally, if a match is found, the end of the LOOP will have a valid action ID assigned to variable _V_MT_ACTIONS.
Related Content
Check out this blog, if HR Triggers BRF+ rule getting too complex?
Related Documents
Debugging HR Trigger - PA40 and infotypes logged
No labels
1 Comment
Salim Assaf
Fyi,
I found that EMPLOYEE_KEY should be the personnel record, when checking for infotypes 0000/0001
https://wiki.scn.sap.com/wiki/display/GRC/Debugging+HR+Trigger+-+GRAC_HR_TRIGGER_EVENT_RECIEVER 6/6