Use method CREATE
to create number range objects.
When creating a number range object, the following naming-rules apply:
-
For customer objects, the name must start with a ‘Z’ or a ‘Y’.
-
The maximum length of a number range object is 10 characters.
Import Parameters
Parameter Name |
Field Name |
Value Help |
---|---|---|
ATTRIBUTES |
|
Number Range Object Definition. |
|
OBJECT |
Name Range Object. |
|
DTELSOBJ |
Data element for sub-object. |
|
YEARIND |
Flag, whether number range object is to- year relevant. |
|
DOMLEN |
Domain, which determines the length of the numbers. |
|
PERCENTAGE |
Percentage of numbers remaining in an interval after having identified in which number assignment a warning is given. |
|
CODE |
Transaction code to call interval maintenance (obsolete for ABAP CP). |
|
BUFFER |
Buffering type for number assignment. |
|
NOIVBUFFER |
Number of numbers in the buffer. |
|
NRSWAP |
Selecting the flag prevents the intervals from automatically starting from the beginning at the upper limit. |
|
NRCHECKASCII |
|
|
DEVCLASS |
Development class of the object. |
OBJ_TEXT |
CORRNR |
Correction number for transport. |
|
|
Texts for objects for change document object creation. |
|
LANGU |
Language. |
|
TXT |
Description of object, long text. |
|
TXTSHORT |
Description of object, short text. |
Export Parameters
Parameter Name |
Field Name |
Value Help |
---|---|---|
ERRORS |
|
|
|
MSGID |
Message class (NR) |
|
MSGTYPE |
Message type |
|
MSGNUMBER |
Message number |
|
MSGVAR1 |
Variable to message |
|
MSGVAR2 |
Variable to message |
|
MSGVAR3 |
Variable to message |
|
MSGVAR4 |
Variable to message |
|
TABLENAME |
Table |
|
FIELDNAME |
Field |
|
CRITCHANGE |
Critical change |
RETURNCODE |
|
Space: no error E: error W: warning |
CLASS zcl_nr_object_create DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES if_oo_adt_classrun. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_nr_object_create IMPLEMENTATION. METHOD if_oo_adt_classrun~main. DATA: lv_object TYPE cl_numberrange_objects=>nr_attributes-object, lv_devclass TYPE cl_numberrange_objects=>nr_attributes-devclass, lv_corrnr TYPE cl_numberrange_objects=>nr_attributes-corrnr. lv_object = 'Z_TEST_03'. lv_devclass = 'Z_SNUM'. lv_corrnr = 'SIDK123456'. TRY. cl_numberrange_objects=>create( EXPORTING attributes = VALUE #( object = lv_object domlen = 'CHAR8' percentage = 5 buffer = abap_true noivbuffer = 10 devclass = lv_devclass corrnr = lv_corrnr ) obj_text = VALUE #( object = lv_object langu = 'E' txt = 'Create object' txtshort = 'Test create' ) IMPORTING errors = DATA(lt_errors) returncode = DATA(lv_returncode) ). CATCH. … ENDTRY. … ENDMETHOD. ENDCLASS.