SAP SYSTEM-CALL CLASS ADMIN ABAP Statements

Get Example source ABAP code based on a different SAP table
  


SECRET

SYSTEM-CALL - Method Administration for the ABAP Class Library
ABAP Code Snippet

ABAP_VARIANTS:
1 SYSTEM-CALL CREATE CLASS c.
ABAP Code Snippet
3 SYSTEM-CALL QUERY CLASS c.
ABAP Code Snippet
5 SYSTEM-CALL DELETE CLASS c.
6 SYSTEM-CALL DELETE METHOD m OF CLASS c.
7 SYSTEM-CALL RENAME CLASS c NEW NAME FROM c2.
8 SYSTEM-CALL RENAME METHOD m OF CLASS c NEW NAME FROM m2.
ABAP Code Snippet
METHOD INTO m.

What does it do? Administers the method includes belonging to a class. Is an interface to table TMDIR. Can be called from the C environment using ab_MethodInclAdm().

ABAP_VARIANT_1 SYSTEM-CALL CREATE CLASS c.

What does it do? A basic entry is created for class c.

ABAP_SUBRC_GENERAL ABAP_SUBRC_EQ_0 Entry for class c successfully created.

ABAP Code Snippet INTO incl.

ABAP Addition
... AS EXTENSION

What does it do? Creates a method entry for method m in class c. The program name of the method include is returned in incl.

ABAP_SUBRC_GENERAL ABAP_SUBRC_EQ_0 Entry for method m in class c created. ABAP_SUBRC_EQ_4 Entry for method m in class c already exists. ABAP_SUBRC_EQ_8 Overflow. Unable to create any more method entries for class c.

ABAP Addition

What does it do? If the optional addition AS EXTENSION is specified, the method is flagged as an enhancement method ( enhancement implementation element).

ABAP_VARIANT_3 SYSTEM-CALL QUERY CLASS c.

What does it do? The system checks whether there is a basic entry for class c.

ABAP_SUBRC_GENERAL ABAP_SUBRC_EQ_0 Entry for class c exists. ABAP_SUBRC_EQ_4 Entry for class c does not exist.

ABAP Code Snippet incl.

ABAP Addition
1 ... NO DBLOCK
2 ... NO EXTENSIONS

What does it do? The system checks whether a method entry exists for method m from class c. If it does, the program name of the related method include is returned in variable incl.

ABAP_SUBRC_GENERAL ABAP_SUBRC_EQ_0 Entry for method m of class c exists. ABAP_SUBRC_EQ_4 Entry for method m of class c does not exist.

ABAP Addition

What does it do? If the optional addition NO DBLOCK is specified, the system does not set an Update lock on class c.
ABAP Addition

What does it do? If the optional addition NO EXTENSIONS is specified, the call only sets sy-subrc to 0 if the method searched for is not flagged as an enhancement method enhancement implementation element ).

ABAP_VARIANT_5 SYSTEM-CALL DELETE CLASS c.

What does it do? Deletes the basic entry and all method entries for class c.

ABAP_SUBRC_GENERAL ABAP_SUBRC_EQ_0 All entries for class c deleted.

ABAP_VARIANT_6 SYSTEM-CALL DELETE METHOD m OF CLASS c

What does it do? Deletes the method entry for method m in class c.

ABAP_SUBRC_GENERAL ABAP_SUBRC_EQ_0 Entry for method m in class c deleted. ABAP_SUBRC_EQ_4 No entry for m in class c exists.

ABAP_VARIANT_7 SYSTEM-CALL RENAME CLASS c NEW NAME FROM c2.

What does it do? Renames the basic entry and method entries for class c using the name c2.

ABAP_SUBRC_GENERAL ABAP_SUBRC_EQ_0 Entries for class c renamed as c2. ABAP_SUBRC_EQ_4 Basic entry for class c2 already exists.

ABAP_VARIANT_8 SYSTEM-CALL RENAME METHOD m OF CLASS c NEW NAME FROM m2.

What does it do? Renames the method entry m in class c using the new name m2.

ABAP_SUBRC_GENERAL ABAP_SUBRC_EQ_0 Entry for method m in class c renamed. ABAP_SUBRC_EQ_4 Entry for method m2 in class c already exists. ABAP_SUBRC_EQ_8 Entry for method m in class c does not exist.

ABAP Code Snippet INTO c METHOD INTO m.

ABAP Addition
... NO EXTENSIONS

What does it do? The system checks whether or not a method entry exists for the method specified in the include name incl. If so, the class name in c and the method name in m.

ABAP_SUBRC_GENERAL ABAP_SUBRC_EQ_0 Method derived from include name incl exists. ABAP_SUBRC_EQ_4 Class derived from include name incl does not exist. ABAP_SUBRC_EQ_8 Method derived from include name incl does not exist. ABAP Addition

What does it do? If the optional addition NO EXTENSIONS is specified, the call only sets sy-subrc to 0 if the method searched for is not flagged as an enhancement method ( enhancement implementation element).



Runtime Exceptions
Non-catchable Exceptions
Reason for error:
Basic entry for class c does not exist.
Runtime error:
TMDIR_CLASS_ALREADY_EXISTS
Reason for error:
No basic entry for class c exists.
Runtime error:
TMDIR_CLASS_NOT_EXISTS
Reason for error:
A method entry with an method include number which is too large exists for class c.
Runtime error:
TMDIR_TOO_MANY_RECORDS

Return to menu