Functionality The module creates a relationship between the two transferred roles(and thus objects). Thus, at any time you can find another object fromone object by calling the function module SREL_GET_NEXT_NEIGHBORS inthe program. If the objects are published as business objects, you canalso jump from one object to another in the application transaction bychoosing System -> Relationships> . The relationship type must correspond to the model that you have addedin the view cluster VRBINRELATION. The model also determines theapplication table in which the module writes the relationship. If there is still not a unique number (GUID) for the role type and forthe role (see parameter documentation for OBJ_ROLEA), one is determinedand written to the table SRRELROLES. Thus the objects are uniquelyidentified in their role. The module does not contain a COMMIT WORK - command.Example .... DATA: OBJ_ROLA LIKE BORIDENT, OBJ_ROLB LIKE BORIDENT, RELATION LIKE BRELTYP-RELTYPE. .... RELATION = 'IDCA'. OBJ_ROLA-OBJTYPE = 'IDOC'. OBJ_ROLA-LOGSYS = T000-LOGSYS. OBJ_ROLB-OBJTYPE = 'TRANSID'. OBJ_ROLB-OBJKEY = R3_TRANS_ID. OBJ_ROLB-LOGSYS = T000-LOGSYS. OBJ_ROLA-OBJKEY = I_EDIDC-DOCNUM. CALL FUNCTION 'BINARY_RELATION_CREATE' EXPORTING OBJ_ROLEA = OBJ_ROLA OBJ_ROLEB = OBJ_ROLB RELATIONTYPE = RELATION .... COMMIT WORK. Description The return parameter consists of unique numbers (GUIDs) for:
- Role object A
- Role object B
- Relationship
These GUIDs are also saved in the table SRRELROLES (roles) and in therelevant application table for COMMIT WORK, which is attached to therelationship type in view cluster VRBINRELATION.Description Describes the object in the current context. It has the structure of aBOR object: Object key, object type, and logical system. Description Relationships are classified according to their type in therelationship model (Viewcluster VRBINRELATION). The types are assignedrole types. If two objects are to be linked in two roles, therelationship type must fit both role types. The table in which the generated relationship is to be written isattached to the relationship type. Example: The relationship type PNOT has the meaning "has" or "belongs to",depending on which object was first named. Description Relationships can have attributes. The attributes are held in aseparate application table and transferred to the function module in250-character long fields that are subdivided into individual attributefields by a structure ("format of attribute") entered in therelationship model. If multiple identical attributes of therelationship are to be transferred, then multiple rows of the table aretransferred. The table has the following structure:
- ATTRIBUT - Name of the attribute
- POSNR - Position of the row within the table
- GATTRDATA - The 250-character long chain with the attributes
Default If you do not make any entries, no attributes are transferred.
|