Custom BAPI Invocation
The SAP HR/HCM connector can invoke custom BAPIs which are used for the following purposes:
-
To filter the employees.
-
To aggregate the additional attributes.
Note
The custom BAPI code for the BAPI filter should filter out the accounts, as required, for both full and delta aggregation. The delta logic should be managed in the BAPI itself when delta mode is selected.
Prerequisites
Based on your requirements, write a custom BAPI code which follows the Input and Output parameters standard specified by SailPoint.
For more information on the input and output parameters, refer to Input and Output Parameters for BAPI.
Add the required entry key in the application.xml file as follows:
Use the entry key as follows:
<entry key="aggregateFilterBAPI" value="name of the BAPI"/>
The Aggregate Filter BAPI has the following input attributes, whose values will be determined from the values specified in the SAP HR/HCM connector:
-
Status
-
Termination offset
-
Future offset
-
Mode of aggregation
In addition to the attributes already mentioned, additional input parameters can be specified using the following entry key:
<entry key="customParameterForAggregationFilterBAPI">
<value>
<Map>
<entry key="<name of attribute> " value ="<value of attribute>"/>
</Map>
</value>
</entry>
For example, if you need to filter data by KOSTL (Cost Center) from the CSKS table (Cost Center Master Data), include KOSTL as a key and specify the corresponding value in a key-value pair, as shown below:
Note
Ensure that KOSTL is defined as a component within the input structure of the custom BAPI. Additionally, the BAPI should contain logic to filter accounts based on the provided key and value.
<entry key="customParameterForAggregationFilterBAPI">
<value>
<Map>
<entry key="KOSTL" value ="USA"/>
</Map>
</value>
</entry>
Use the entry key as <entry key="additionalAttrBAPI" value="name of the BAPI"/>
All additional attributes must be added manually in the SAP HR/HCM application schema. These additional attributes must have the same name as that of the fields returned from BAPI.
Use the customParameterForAdditionalAttrBAPI entry key as follows:
<entry key="customParameterForAdditionalAttrBAPI">
<value>
<Map>
<entry key="CustAttrName" value ="<value of custom attribute>"/>
</Map>
</value>
</entry>
For example,
<entry key="customParameterForAdditionalAttrBAPI">
<value>
<Map>
<entry key="Manager" value ="John"/>
</Map>
</value>
</entry>
In this example,Manager must be a field of the EMPLOYEE_DETAILS structure within additionalAttrBAPI.
Use the following entry key:
<entry key="customParameterForAdditionalAttrBAPI">
<value>
<Map>
<entry key="schema.AttrName" value ="<value>"/>
</Map>
</value>
</entry>
For example:
<entry key="customParameterForAdditionalAttrBAPI">
<value>
<Map>
<entry key="schema.Title" value ="Name"/>
</Map>
</value>
</entry>
In this example, Title is a default schema attribute, and the value is the Name of the field in the EMPLOYEE_DETAILS structure of additionalAttrBAPI. Here, the Name is mapped with the value of the Title at run time and passed as the input parameter of additionalAttrBAPI.
Note
If any attribute returned from this BAPI matches with the out of the box schema attribute, then the value of the attribute returned from BAPI is overwritten.