SAP Function SREL_GET_NEXT_RELATIONS - Determines all Relationships for the Object

Parameter Reference Type Length Default Optional Text
BYPASS_BUFFER FLAG C 1 SPACE X 'X' Read Again from the Database
EXCL_RELATIONS TRL_BTYPE h 4 X Excluded Relationship Types
EXCL_ROLES TRL_RTYPE h 10 X Excluded Role Types
INCL_APPLRELS C C 0 SPACE X 'X' Read Application Relationships
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
APPLLINKS BORIDENT 90 X Relationships of the Application (Object Supports IFAPPLRELS)
LINKS RELGRAPHLK 282 X Relationships
ROLES RELROLES 130 X Roles of Objects

Exception Text
INTERNAL_ERROR
NO_LOGSYS

Functions
All related objects are returned for the transferred object whoseinterval is smaller than MAX_HOPS. The next neighbors have the interval0.
The relationships themselves are also returned for the objects.
You can restrict the output by entering the role type or therelationship type.

Example
....
DATA: OBJECT LIKE BORIDENT,
lt_links TYPE relgraphlk OCCURS 0 WITH HEADER LINE,
lt_neighbors TYPE relroles OCCURS 0 WITH HEADER LINE,
....
OBJECT-OBJTYPE = 'IDOC'.
OBJECT-LOGSYS = T000-LOGSYS.
OBJECT-OBJKEY = '0000000000102596'.
CALL FUNCTION 'SREL_GET_NEXT_RELATIONS'
EXPORTING
object = OBJECT
TABLES
links = lt_links
roles = lt_neighbors
EXCEPTIONS
internal_error = 1
OTHERS = 2.

Notes
To determine the describing texts for the relationships and rolesfound, use the function module RELMOD_READ_BINRELTYPE. If you only needthe role text, use RELMOD_READ_ROLETYPE.
The caller is responsible for checking the object OBJECT exists. Inparticular, if you transfer a logical system as part of the OBJECT,then you have to ensure its validity.
The module does indeed check whether a valid role type or relationshiptype was transferred. However, it does not check whether the object canoccur in the role entered according to the model data (view clusterVRBINRELATION), or if the relationship type is valid. If you thereforetransfer a role type or a relationship type, you are then responsiblefor a meaningful combination.
The read time grows exponentially with the parameter MAX_HOPS. Thus youshould not choose a value that is too high.

Description
The parameter determines the maximum number of jumps that may beperformed from the outbound object to the linked object. The distanceto the linked 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
Greater or equal to one.

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

Description
Uniquely identifies the outbound object for which the related objectsare to be determined.
The parameter consists of the 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 neighbor.

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

    Default
    If you do not make any entries, all role 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 binary relationship, that is, two objects in two roles andthe relationship between these two roles. Both of the roles and therelationship have a unique number, the GUID.
    The type of the relationship and a time stamp are also returned.

    Description
    Contains a unique number (GUID) that identifies the role. The object isalso returned to this role, consisting of:

    • Object type, for example 'BUS2088'

    • Object key, for example '000010001994'

    • Logical system, for example 'ABCCLNT000'.

    • Finally another time stamp is transferred.

317864IDoc: Searching a link at runtime
927407Determining the content of GOS and SAPoffice documents
354838TIME_OUT during display of document flow