Ansicht
Dokumentation

RPY_CLIF_MULTI_INSERT - Insert classes/interfaces

RPY_CLIF_MULTI_INSERT - Insert classes/interfaces

CPI1466 during Backup   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module checks in a set of object types in INSERT mode. This means:

  • The complete new object tyeps are inserted. A complete object type consists of the basic information for the object type, its components (attributes, methods, and events), the object type subcomponents (parameters and exceptions) and outgoing relationships (is a friend of, inherits from, contains, references).

  • The system checks the consistency of the new object type before inserting it.

  • The system will check the user's authorization before inserting the new object (not yet implemented).

  • The inserted object types are included in a correction or repair request. They are then locked, and cannot be changed by other users.

For the check in to work, the following conditions must be met:

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

  • None of the object types that you want to create may exist already.

  • The object types that you want to include must be complete, that is, all of their input tables must have been filled.

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

If these conditions are not met, or another error occurs during insertion, the check in does not take place and the object types are not inserted. 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.

In the import parameter CICO_DEV_CLASS enter the development class to which you want to assign the object types.

By default, all long texts are entered in the system langauge. If you want to insert them in a different language, enter the relevant language key in the import parameter LANGUAGE.

You pass the information about the object types that you want to insert using the corresponding tables parameters. For example, events in the tables parameter EVENT_SET).

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

Consistency checks when inserting:

The system checks the consistency of the new object types before inserting them. These checks cannot be described in detail here, but can be summarized as follws:

  • Relational checks: For each component or subcomponent of an object type that you insert, you must also insert the object type itself (that is, its basic information). For each outgoing relationship of an object type that you speicfy, you must enter the object type.

  • External checks: If an object type refers to another object type (for example, in an inheritance relationship or via a method parameter), the referenced object type must either already exist or be inserted at the same time as the referring object type.

  • Value checks: The fields in the input tables may only contain valid values. For example, the field EXPOSURE of input table CLASS_INTERFACE_INFOS may only have the values 0 (private), 1 (protected), or 2 (public). To find out the permitted values, refer to the domain fixed values for the corresponding table field in the ABAP Dictionary.

  • OO rule checks: You can only use permitted value combinations. For example, if an object type links to another using a "contains" relationship, the referred object type must be flagged as embeddable. As another example, events may only have export parameters.

All errors that occur during the consistency checks are returned to the called in the error table ERROR_SET.

Automatic alignment of attributes and instance relationships:

Since the information about attributes (table ATTRIBUTE_SET) and instance relationships (table INSTANCE_RELATION_SET) is partly redundant, the information is compared before the insertion. If instance relationships exist without corresponding attributes, the attributes are generated from the instance relationships. Conversely, missing instance relationships are generated from the corresponding attributes.

Example

The following call inserts a set of object types.

* Data declaration
DATA: CLIFS LIKE RPYCLCI OCCURS 100 WITH HEADER LINE.
DATA: ATTRIBUTES LIKE RPYCLAT OCCURS 100 WITH HEADER LINE.
DATA: METHODS LIKE RPYCLME OCCURS 100 WITH HEADER LINE.
DATA: EVENTS LIKE RPYCLEV OCCURS 100 WITH HEADER LINE.
DATA: PARAMETERS LIKE RPYCLPA OCCURS 100 WITH HEADER LINE.
DATA: EXCEPTIONS LIKE RPYCLEX OCCURS 100 WITH HEADER LINE.
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: DEVCLASS LIKE TRKEY-DEVCLASS

* Fill request number and development class
REQNO = ...
DEVCLASS = ...

* Fill input table, for example
LOOP AT ...
MOVE-CORRESPONDING ... TO CLIFS. APPEND CLIFS.
ENDLOOP.
LOOP AT ...
MOVE-CORRESPONDING ... TO ATTRIBUTES. APPEND ATTRIBUTES.
ENDLOOP.
... (etc.)

* Call function module
CALL FUNCTION 'RPY_CLIF_MULTI_INSERT'
EXPORTING
CICO_REQUEST_NO = REQNO
CICO_DEV_CLASS = DEVCLASS
* LANGUAGE = SY-LANGU
TABLES
CLASS_INTERFACE_INFO_SET = CLIFS
ATTRIBUTE_SET = ATTRIBUTES
METHOD_SET = METHODS
EVENT_SET = EVENTS
PARAMETER_SET = PARAMETERS
EXCEPTION_SET = EXCEPTIONS
META_RELATION_SET = METARELS
INSTANCE_RELATION_SET = IMPLRELS
FRIENDS_RELATION_SET = FRIENDRELS
ERROR_SET = ERRORS.

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

Notes

Further information

Other function modules in the Class Library API:





Parameters

ATTRIBUTE_SET
CICO_DEV_CLASS
CICO_REQUEST_NO
CLASS_INTERFACE_INFO_SET
ERROR_SET
EVENT_SET
EXCEPTION_SET
FRIENDS_RELATION_SET
INSTANCE_RELATION_SET
LANGUAGE
META_RELATION_SET
METHOD_SET
PARAMETER_SET

Exceptions

Function Group

SICL

General Data in Customer Master   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 9401 Date: 20240523 Time: 143246     sap01-206 ( 125 ms )