Code: Alles auswählen.
DATA:
lt_error TYPE STANDARD TABLE OF inriv,
lt_interval TYPE STANDARD TABLE OF inriv,
ls_interval LIKE LINE OF lt_interval.
* Call this to reload internal tables (esp. isobj with
* ugmd200s
CALL FUNCTION 'NUMBER_RANGE_UPDATE_INIT'
EXPORTING
object = gc_nrobj_obj_val
EXCEPTIONS
object_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* enqueue
CALL FUNCTION 'NUMBER_RANGE_ENQUEUE'
EXPORTING
object = gc_nrobj_obj_val
EXCEPTIONS
foreign_lock = 1
object_not_found = 2
system_failure = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* create number range
ls_interval-nrrangenr = gc_nrobj_range_val.
ls_interval-fromnumber = '0000000001'.
ls_interval-tonumber = '9999999999'.
ls_interval-procind = 'I'.
INSERT ls_interval INTO TABLE lt_interval.
CALL FUNCTION 'NUMBER_RANGE_INTERVAL_UPDATE'
EXPORTING
object = gc_nrobj_obj_val
TABLES
error_iv = lt_error
interval = lt_interval.
CALL FUNCTION 'NUMBER_RANGE_UPDATE_CLOSE'
EXPORTING
object = gc_nrobj_obj_val
EXCEPTIONS
no_changes_made = 0
object_not_initialized = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* dequeue
CALL FUNCTION 'NUMBER_RANGE_DEQUEUE'
EXPORTING
object = gc_nrobj_obj_val.