Input and Output Parameters for BAPI

This section describes the parameters required for the BAPIs used for aggregation filtering and fetching additional attributes.

BAPI for Aggregation filter

This section describes the input and output of the aggregation filter BAPI.

Input of aggregation filter BAPI

The input of this BAPI must be a structure.

The name of the structure is AGGREGATION_FILTER.

This structure must have the following components:

Output of aggregation filter BAPI

The output of this value must be in the form of a JCOTable.

A JCOTable is an interface that describes internal tables used in the parameter lists of function modules. It is a data container, which can have multiple rows of the same fields.

The table name is AGGREGATION_FILTERED_LIST. The Output table must be a structure as described in the following figure:

The table must have the following components:

  • PERNR

  • BEGDA

  • ENDDA

  • STAT2

Example:

PERNR

BEGDA

ENDDA

STAT2

00000001

20170505

99991231

3

00000002

2017050‘6

99991231

2

00000003

20170508

20181231

1

Note

  • PERNR - Personnel Number, BEGDA - Beginning Date, ENDDA - End Date, STAT2 - Employment Status

  • The SAP-HR connector expects only one PERNR for one employee. If multiple person IDs are returned, the connector creates two separate identities for the person IDs as the default native identity is Employee Number.

Return Table

BAPIs used for aggregation filtering and fetching additional attributes must return an additional JCOTable.

  • Table Name: RETURN

  • The table must have the following components:

    • TYPE: Possible values are as follows:

      • S (success)

      • E (error)

      • W (warning)

  • MESSAGE

Custom BAPI for Additional Attributes

You must write the code based on your requirement for the Custom BAPI, and the SAP HR Source invokes that code accordingly. The Custom BAPI input and output parameters must be based on the guidelines as specified in this section.

Note
This is the second custom BAPI for additional attributes. The first custom BAPI is for aggregation filter.

Prerequisite

All the additional attributes returned from the Custom BAPI must be added in the schema manually.

Input of BAPI for fetching additional attributes

Input of this BAPI must be a structure.

The name of the structure is EMPLOYEE_DETAILS.

This structure must have the PERNR field.

Output of BAPI for fetching additional attributes

The output for the custom BAPI should be a JCOTable with a name of ADDITIONAL_ATTRIBUTE_LIST.

Note

  • If the ADDITIONAL_ATTRIBUTE_LIST returns the default schema attributes, then the default values are overwritten.

  • If you want to overwrite the values of schema attributes with the values returned from Custom BAPI, then you must delete the existing schema attribute and add the new schema attribute with the name returned from the Custom BAPI.

The table must have all the additional attributes based on your requirements.

Example:

MANAGER

REGION

LAST_DAY_WORK

GLOBAL_ID

John

Pune

2018-5-1

11111

In this example, MANAGER, REGION, LAST_DAY_WORK, and GLOBAL_ID are additional attributes.