Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

7/9/2019 Debugging HR Trigger - GRAC_HR_TRIGGER_EVENT_RECIEVER - Governance, Risk and Compliance - SCN Wiki

Getting Started Store

Community WIKI SAP Community Welcome, Guest Login Register Search the Community

Governance, Risk and Compliance / … / Access Request (ARQ)

Debugging HR Trigger - GRAC_HR_TRIGGER_EVENT_RECIEVER


Created by Luciana Ullmann, last modified on Jun 22, 2015

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)".

Actions in BRF Rule


Open the BRF rule for HR trigger and make sure the following has been followed:

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

<connector> 0000 0010 or MASSN TERM


0009 or
other values, this must be
informed by HR team what
is the termination action
and what infotypes and subtypes
that will be triggered.

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):

5- Make sure the rule is simulating successfully.

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

Creating your first HR Triggers BRF+ Rule - BASIC

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.

We will take the data logged in SLG1 to start our analysis.

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:

Actions in GRC Foundation system


1- Make sure that HR trigger configuration is reviewed and actions are maintained.

2- Execute SE37

3- Enter function module GRAC_HR_TRIGGER_EVENT_RECIEVER and execute

4- Fill out the parameters of the function module based on the SLG1 data logged in the HR system:

IV_ORIGINATING_SYSTEM: must be filled with the connector ID of 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

IT_EMP_DATA: has many entries we need to fill out.

Click on the blue table icon, and enter details:

EMPLOYEE_KEY: this is the USRID taken from SLG1.

Click on blue table icon for employee data.

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.

Hope this helps!

Related Content
Check out this blog, if HR Triggers BRF+ rule getting too complex?

Related Documents
Debugging HR Trigger - PA40 and infotypes logged

Debugging HR Trigger - Simulation

Understanding HR Triggers in Access Control 10.0

GRC 10.0 - HR Trigger configuration

No labels

1 Comment
Salim Assaf
Fyi,

I found that EMPLOYEE_KEY should be the personnel record, when checking for infotypes 0000/0001

Contact Us SAP Help Portal


Privacy Terms of Use Legal Disclosure Copyright Cookie Preferences Follow SCN

https://wiki.scn.sap.com/wiki/display/GRC/Debugging+HR+Trigger+-+GRAC_HR_TRIGGER_EVENT_RECIEVER 6/6

You might also like