SAP Function SREL_GET_NEXT_NEIGHBORS - Determine Related Objects

Parameter Reference Type Length Default Optional Text
BYPASS_BUFFER FLAG C 1 SPACE X 'X' Read Again from the Database
MAX_HOPS RELHOPS N 2 1 X Maximum Number of Jumps
OBJECT BORIDENT u 90 BOR Object ID
RELATIONTYPE BRELTYP-RELTYPE C 4 X Relationship Type
ROLETYPE RELROLES-ROLETYPE C 10 X Role Type

Parameter Reference Length Optional Text
NEIGHBORS NEIGHBOR 124 X Related Roles

Exception Text
INTERNAL_ERROR Internal Error
NO_LOGSYS Separate Logical System Not Defined

Functions
All related objects whose interval is smaller than MAX_HOPS are outputfor the transferred object. The next neighbors have the interval 0.
You can restrict the output by:

  • The type of the role in which the outbound object occurs

  • The type of direct relationships with the outbound object
  • Example
    DATA OBJECT LIKE BORIDENT.
    DATA NEIGHBORS LIKE NEIGHBOR OCCURS 0 WITH HEADER LINE.
    OBJECT-OBJTYPE = 'BUS2032'.
    OBJECT-LOGSYS = T000-LOGSYS.
    OBJECT-OBJTYPE = '1204'.
    CALL FUNCTION 'SREL_GET_NEXT_NEIGHBORS'
    EXPORTING
    OBJECT = OBJECT
    ROLETYPE = 'APPLOBJ'
    RELATIONTYPE = 'OFFD'
    TABLES
    NEIGHBORS = NEIGHBORS.
    PERFORM SHOW_TREE TABLES NEIGHBORS
    USING OBJECT .
    ENDFUNCTION.

    Hints
    To determine the describing texts for the roles found, use the functionmodule RELMOD_READ_ROLETYPE.

    Description
    The parameter determines the maximum number of jumps that may beperformed from the outbound object to the related object. The distancefrom the related object is one smaller than the number of jumps there.Thus, the distance from the outbound object to its direct neighborobjects is zero.

    Value range
    Larger than one.

    Default
    One. Thus, all direct relationships are found with the outbound object.

    Description
    Uniquely identifies the outbound object for which the related objectsare to be determined.
    The parameter consists of 3 fields

    • Object type, for example 'BUS2088'

    • Object key, for example '000010001994'

    • Logical system, for example 'ABCCLNT000'.
    • Default
      If you do not specify the logical system, then the separate logicalsystem is implemented.

      Description
      The parameter determines the type of the direct relationships thatexist for the outbound object. Thus, the search is restricted to thecorresponding neighbors.

      Value range
      The possible relationship types are added to the relationship model(view cluster VRBINRELATION).

      Default
      If no entries are made, all relationship types are considered.

      Description
      The parameter determines the type of the role in which the outboundobject occurs. Thus, the search is restricted to the correspondingneighbor.

      Value range
      The possible role types are added to the relationship model(Viewcluster VRBINRELATION).

      Default
      If you do not make any entries, all role types are considered.

      Description
      Contains a unique number (GUID) that identifies the role and its type.The object is also returned to this role, consisting of:

      • Object type, for example 'BUS2088'

      • Object key, for example '000010001994'

      • Logical system, for example 'ABCCLNT000'.

      • Finally, the parameter contains the number of jumps that were performedfrom the outbound object to the related object.