NUMBER_GET_NEXT
1. SNRO /SNUM创建一个流水号对象
1 CALL FUNCTION 'NUMBER_RANGE_ENQUEUE' 2 EXPORTING 3 OBJECT = '' 4 EXCEPTIONS 5 FOREIGN_LOCK = 1 6 OBJECT_NOT_FOUND = 2 7 SYSTEM_FAILURE = 3 8 OTHERS = 4 9 . 10 11 CALL FUNCTION 'NUMBER_GET_NEXT' 12 EXPORTING 13 NR_RANGE_NR = '00' 14 OBJECT = '' 15 SUBOBJECT = P_BUKRS 16 IGNORE_BUFFER = 'X' 17 IMPORTING 18 NUMBER = P_BTNUM 19 EXCEPTIONS 20 INTERVAL_NOT_FOUND = 1 21 NUMBER_RANGE_NOT_INTERN = 2 22 OBJECT_NOT_FOUND = 3 23 QUANTITY_IS_0 = 4 24 QUANTITY_IS_NOT_1 = 5 25 INTERVAL_OVERFLOW = 6 26 BUFFER_OVERFLOW = 7 27 OTHERS = 8 28 . 29 30 CALL FUNCTION 'NUMBER_RANGE_DEQUEUE' 31 EXPORTING 32 OBJECT = '' 33 EXCEPTIONS 34 OBJECT_NOT_FOUND = 1 35 OTHERS = 2 36 . 37 38 CONCATENATE 'BT' P_BUKRS '-' P_BTNUM INTO P_BTNUM.