事务代码:SNRO
代码引用:
DATA: MAXTID TYPE I,NEWNO TYPE CHAR8.
CALL FUNCTION 'NUMBER_RANGE_ENQUEUE'
EXPORTING
OBJECT = 'ZQC57'
EXCEPTIONS
FOREIGN_LOCK = 1
OBJECT_NOT_FOUND = 2
SYSTEM_FAILURE = 3
OTHERS = 4.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
NR_RANGE_NR = '1'
OBJECT = 'ZQC57'
IMPORTING
NUMBER = NEWNO.
CALL FUNCTION 'NUMBER_RANGE_DEQUEUE'
EXPORTING
OBJECT = 'ZQC57'
EXCEPTIONS
OBJECT_NOT_FOUND = 1
OTHERS = 2.
MAXTID = NEWNO.