Fonction SAP BAPI_REL_GETRELATIONS - Gets the Linked Objects

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
OBJECTID BAPIBORID u 90 BOR Object ID
RECURSIONLEVEL BAPIRELLK-LEVEL_A N 2 1 X Recursion Level for Reading Relationships
RELATION BAPIRELB-RELTYPE C 4 X Relationship type
ROLE BAPIRELB-ROLE_A C 10 X Role in Which the Object Occurs

Paramètre Reférence Type Long. Description
RETURN BAPIRET2 u 548 Return Parameter

Paramètre Reférence Long. Facultatif Description
LISTOFRELATIONS BAPIRELLK 308 X Relationship Between Two BOR Objects A and B

Functionality
This function module reads the linked objects in the local system for abusiness object.

Input parameters

  • OBJECT

  • Here you transfer the complete BOR ID of the business object for whichthe relationships are to be read.
    • ROLE

    • Here you enter a role if only relationships of this type are to bereturned, in which the object occurs in this role.
      • RELATION

      • Here you enter a relationship if only relationships of this type are tobe returned.
        • RECURSIONLEVEL

        • Here you determine up until what recurrence level relationships shouldbe read. The default value corresponds with the reading of the directrelationships. The selection time rises exponentially with anincreasing recurrence level.

          Return parameter

          • LISTOFRELATIONS

          • The relationships found are returned in this table.

            Description
            INCLUDE BAPI_REL_RETURN OBJECT DOKU ID TX

            Description
            Business object reference of the object for which relationships are tobe read.

            Description
            When the recursion depth is greater than one, further relationships aresearched for until the depth entered for the result set ofrelationships found is reached.
            Caution: The runtime can increase exponentially when the depthincreases.

            Default
            As standard, no recursion takes place.

            Description
            Relationship type that is to be considered in the selection.

            Description
            Role of the object in a relationship. The selection can be restrictedby entering roles.

            Description
            The parameter LISTOFRELATIONS contains a table of all relationshipsfound.

            • The fields RELTYPE, RELATIONID, UTCTIME, and LOG_SYSTEM contain the
            • relationship type, the internal GUID, a time stamp and the logicalsystem in which the relationship has been read.
              • The fields OBJKEY_A OBJTYPE_A LOGSYS_A LEVEL_A ROLETYPE_A ROLEID_A
              • UTCTIME_A contain the object reference, the role, the read depth bywhich the role was first found and the internal roles GUID for theobject in role A.
                • The fields OBJKEY_B OBJTYPE_B LOGSYS_B LEVEL_B ROLETYPE_B ROLEID_B
                • UTCTIME_B contain the object reference, the role, the read depth bywhich the role was first found and the internal role GUID for theobject in role B.