SAP Function RPY_CLIF_MULTI_INSERT - Insert classes/interfaces

Parameter Reference Type Length Default Optional Text
CICO_DEV_CLASS RPYCLGF-DEVCLASS C 30 Development class
CICO_REQUEST_NO RPYGSGF-CICO_REQNO C 20 Transport request number
LANGUAGE SYST-LANGU C 1 SY-LANGU X Language

Parameter Reference Length Optional Text
ATTRIBUTE_SET RPYCLAT 504 Input: Attributes
CLASS_INTERFACE_INFO_SET RPYCLCI 140 Input: Basic information about classes or interfaces
ERROR_SET RPYGSER 268 Output: Error messages
EVENT_SET RPYCLEV 236 Input: Events
EXCEPTION_SET RPYCLEX 200 Input: Exceptions
FRIENDS_RELATION_SET RPYCLFR 102 Input: Friend relationships
INSTANCE_RELATION_SET RPYCLIR 92 Input: Instance relationships
META_RELATION_SET RPYCLMR 134 Input: Metarelationships
METHOD_SET RPYCLME 236 Input: Methods
PARAMETER_SET RPYCLPA 463 Input: Parameters

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 typeconsists 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 beforeinserting it.
The system will check the user's authorization before inserting the newobject (not yet implemented).
The inserted object types are included in a correction or repairrequest. 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, youcan generate one using the function moduleRPY_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 (seebelow).
If these conditions are not met, or another error occurs duringinsertion, the check in does not take place and the object types arenot inserted. The relevant error messages are placed in the error tableERROR_SET.
In the import parameter CICO_REQUEST_NO enter the number of thecorrection or repair request.
In the import parameter CICO_DEV_CLASS enter the development class towhich you want to assign the object types.
By default, all long texts are entered in the system langauge. If youwant to insert them in a different language, enter the relevantlanguage key in the import parameter LANGUAGE.
You pass the information about the object types that you want to insertusing the corresponding tables parameters. For example, events in thetables parameter EVENT_SET).
The function module does not trigger any exceptions. Problem or errormessages are returned in the table parameterERROR_SET. If the insertion is successful, the errortable is empty.
Consistency checks when inserting:
The system checks the consistency of the new object types beforeinserting them. These checks cannot be described in detail here, butcan be summarized as follws:
Relational checks: For each component or subcomponent of an object typethat you insert, you must also insert the object type itself (that is,its basic information). For each outgoing relationship of an objecttype that you speicfy, you must enter the object type.
External checks: If an object type refers to another object type (forexample, in an inheritance relationship or via a method parameter), thereferenced object type must either already exist or be inserted at thesame time as the referring object type.
Value checks: The fields in the input tables may only contain validvalues. For example, the field EXPOSURE of input tableCLASS_INTERFACE_INFOS may only have the values 0 (private), 1(protected), or 2 (public). To find out the permitted values, refer tothe domain fixed values for the corresponding table field in the ABAPDictionary.
OO rule checks: You can only use permitted value combinations. Forexample, 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 thecalled in the error table ERROR_SET.
Automatic alignment of attributes and instance relationships:
Since the information about attributes (table ATTRIBUTE_SET) andinstance relationships (table INSTANCE_RELATION_SET) is partlyredundant, the information is compared before the insertion. Ifinstance relationships exist without corresponding attributes, theattributes are generated from the instance relationships. Conversely,missing instance relationships are generated from the correspondingattributes.

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.

Further information
Other function modules in the Class Library API:
RPY_CLIF_MULTI_READ
RPY_CLIF_MULTI_READ_LOCK
RPY_CLIF_COMP_MULTI_INSERT
RPY_CLIF_REL_MULTI_INSERT
RPY_CLIF_INFO_UPDATE
RPY_CLIF_COMP_UPDATE
RPY_CLIF_REL_UPDATE
RPY_CLIF_COMP_DELETE
RPY_CLIF_REL_DELETE
RPY_CLIF_DELETE