T-CODE snum 或者 SNRO 对象然后调用函数
REPORT ZHJ_TEST08. DATA:L_ID TYPE ZLID. CALL FUNCTION 'NUMBER_GET_NEXT' EXPORTING nr_range_nr = '1' object = 'ZLID' * QUANTITY = '1' * SUBOBJECT = ' ' * TOYEAR = '0000' * IGNORE_BUFFER = ' ' IMPORTING NUMBER = L_ID * QUANTITY = * RETURNCODE = EXCEPTIONS INTERVAL_NOT_FOUND = 1 NUMBER_RANGE_NOT_INTERN = 2 OBJECT_NOT_FOUND = 3 QUANTITY_IS_0 = 4 QUANTITY_IS_NOT_1 = 5 INTERVAL_OVERFLOW = 6 BUFFER_OVERFLOW = 7 OTHERS = 8 . IF sy-subrc <> 0. * Implement suitable error handling here ENDIF. WRITE :L_ID.