Storing Additional Data for Relationships in SAP OM

How to Enable the Storage of Additional Information for Object Relationships in Infotype 1001 - "Relationships"?

Below is a step-by-step guide for situations where you may need to enable the system to store additional information about the relationship (infotype 1001 – "Relationships") between two objects in the SAP Organizational Management component.

Initial Data

A relationship of type X01 is configured in the system between two objects of type S – "Position".

Objective

Enable the system to store additional information for the X01 relationship. For demonstration purposes in this note, the additional information will be a checkbox.

1. Create a Structure with Additional Fields

Using transaction SE11, create a structure named ZPADXXX, where XXX is the identifier of the relationship type being used.

2. Create a Table to Store Additional Relationship Data

Create a table ZHRPADXXX, where XXX corresponds to the relationship type identifier for which additional data storage is needed. Add the following fields to the table:

  • MANDT
  • ADATANR
  • and the structure ZPADXXX created in the previous step.

3. Create a Function Module (PAI)

Create a function module to handle PAI (Process After Input) events on the screen that will contain the additional data to be saved. Use RH_ADATA_NNN_PAI as a reference or template for copying/consulting.

Note: Make sure the structure ZPADXXX is declared in the include of the main program of the function group being used.

4. Create a Function Module (PBO)

Create a function module to handle PBO (Process Before Output) events on the screen. Use RH_ADATA_NNN_PBO as a reference or template for copying/consulting.

Note: The table p1001 must be declared in the include of the main program of the function group to which the function module belongs.

5. Create a Screen with Additional Fields

Create a screen that includes the additional fields (see step #1). The accompanying video clip demonstrates the steps for creating a screen containing the required checkbox, as per the task’s objective.

0:00
/1:34

6. Configure Tables T77AD, T77AR

In table T77AD, specify the identifiers of the created table and structure containing the additional fields.

In table T77AR, in addition to the created structure, you must also specify the technical names of the created function modules and the screen number.

7. Testing

First, let’s recall how it was initially.

0:00
/0:18

Now with the new configuration (see step #6):

0:00
/1:37