Ansicht
Dokumentation

RPY_CLIF_REL_MULTI_INSERT - Insert a relationship for a class or interface

RPY_CLIF_REL_MULTI_INSERT - Insert a relationship for a class or interface

CL_GUI_FRONTEND_SERVICES - Frontend Services   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module inserts a set of new outgoing relatinships (is friends with, inherits from, contains, references) for an object type (class or interface).

This is a modification of an existing object type - a check in in MODIFY mode.

The following criteria must be fulfilled for the check in to be successful:

  • There must be a valid correction or repair request. If necessary, you can generate one using the function module RPY_CICO_REQUEST_OPEN.

  • The object type that you want to modify must alreadey exist and have been entered in the correction or repair request, that is, it must already have been checked out (see RPY_CLIF_MULTI_READ_LOCK).

  • The relationship that you want to add must be complete (all input tables must have been filled).

  • The relationships that you want to insert must be consistent (see below).

If these requirements are not met, or another error occurs during insertion, the check in does not table place and the relationships are not added. The relevant error messages are placed in the error table ERROR_SET.

In the import parameter CICO_REQUEST_NO, enter the number of the correction or repair request.

By default, all long texts are added in the system language. If you want to add texts in another language, pass its ID to the function module in the LANGUAGE parameter.

In the import parameter CLASS_INTERFACE_ID, enter the name of the object type for which you want to add the relationships.

In the table parameters (META_RELATION_SET etc.), pass all of the required information about the relationships that you want to insert.

The function module does not trigger any exceptions. Problem or error messages are passed back to the called in the table parameter ERROR_SET. If the insertion is successful, the error table is empty.

For general inforamtion about consistency checks, refer to RPY_CLIF_MULTI_INSERT. This function moduel only checks the consistency of the new relationships that you want to insert.

The system automatically generates and inserts attributes for the new instance relationships.

Example

The following call adds relationships to an existing object type:

* Data declaration
DATA: METARELS LIKE RPYCLMR OCCURS 100 WITH HEADER LINE.
DATA: IMPLRELS LIKE RPYCLIR OCCURS 100 WITH HEADER LINE.
DATA: FRIENDRELS LIKE RPYCLFR OCCURS 100 WITH HEADER LINE.
DATA: ERRORS LIKE RPYGSER OCCURS 100 WITH HEADER LINE.


DATA: REQNO LIKE RPYGSGF-CICO_REQNO
DATA: CLIF_ID LIKE VSEOCLIF-CLSNAME

* Fill request number
REQNO = ...

* Fill object type name
CLIF_ID = ...

* Fill input table, e.g.
LOOP AT ...
MOVE-CORRESPONDING ... TO METARELS. APPEND METARELS.
ENDLOOP.
... (etc.)

* Call function module
CALL FUNCTION 'RPY_CLIF_REL_MULTI_INSERT'
EXPORTING
CICO_REQUEST_NO = REQNO
* LANGUAGE = SY_LANGU
CLASS_INTERFACE_ID = CLIF_ID
TABLES
META_RELATION_SET = METARELS
INSTANCE_RELATION_SET = IMPLRELS
FRIENDS_RELATION_SET = FRIENDRELS
ERROR_SET = ERRORS
EXCEPTIONS
OTHERS = 0.

* Error handling
LOOP AT ERRORS.
...
ENDLOOP.

Notes

Further information

Other function modules in the Class Library API:





Parameters

CICO_REQUEST_NO
CLASS_INTERFACE_ID
ERROR_SET
FRIENDS_RELATION_SET
INSTANCE_RELATION_SET
LANGUAGE
META_RELATION_SET

Exceptions

Function Group

SICL

Fill RESBD Structure from EBP Component Structure   PERFORM Short Reference  
This documentation is copyright by SAP AG.

Length: 6037 Date: 20240523 Time: 124004     sap01-206 ( 68 ms )