SNUM / SNRO 让我们尝试用 SAT 分析一下程序,看看 NUMBER_GET_NEXT 内部实现这一功能的方式。 这里似乎用时很长让我们进去看看。 用时 FOR UPDATE 语法 这里有一条不常见的语法,通过开发文档的解读,发现原来是一种锁。 Effect When reading an individual row usingSINGLE, the additionFOR UPDATEsets a datab...
10.点击“Insert”,再点击保存.号码范围对象就已经成功建立. 测试the Number Range Object: We can use the function module, NUMBER_GET_NEXT, to get the next number of any number range object. Following is a test program to get the next available number of the object created above: REPORT zsnro...
CALL FUNCTION 'NUMBER_GET_NEXT' EXPORTING NR_RANGE_NR = '01' OBJECT = 'ADRNR' QUANTITY = REQUESTED_QUANTITY IMPORTING NUMBER = NUMBER QUANTITY = QUANTITY RETURNCODE = RETURNCODE_NUMBERRANGE EXCEPTIONS INTERVAL_NOT_FOUND = 1 NUMBER_RANGE_NOT_INTERN = 2 OBJECT_NOT_FOUND = 3 QUANTITY_IS_0 ...
首先用SNRO创建一个对象,如'ZMM026',增加你要序列间隔,即号码范围。再调用如下函数:CALLFUNCTION'NUMBER_GET_NEXT'EXPORTING nr_range_nr='01' "snro中的间隔编号 object='ZMM026' "snro中的对象名称 IMPORTING number=l_objkey "所得到的号码 EXCEPTIONS interval_not_found=1 number_ra...
6.点击“Number Ranges” . 7.点击“Change Intervals”. 8.点击“Insert Interval”. 9.输入相应的数据值,参见下屏: 10.点击“Insert”,再点击保存.号码范围对象就已经成功建立. 测试the Number Range Object: We can use the function module, NUMBER_GET_NEXT, to get the next number of any number ran...
CALL FUNCTION 'NUMBER_GET_NEXT' EXPORTING NR_RANGE_NR = '01' OBJECT = 'ZSN_MATNO' QUANTITY = '1' IMPORTING NUMBER = f_MATNO EXCEPTIONS INTERVAL_NOT_FOUND = 1 NUMBER_RANGE_NOT_INTERN = 2 OBJECT_NOT_FOUND = 3 QUANTITY_IS_0 = 4 ...
lt_nriv-tonumber = '9999'. lt_nriv-nrlevel = 0 . APPEND lt_nriv. ENDDO. MODIFY nriv FROM TABLE lt_nriv. ENDFUNCTION. 用se37创建函数ZNUMC4_GET_NEXT。 源代码如下: FUNCTION znumc4_get_next. *"--- *"*"本地接口: *" IMPORTING *" VALUE(DATUM) TYPE SY-DATUM DEFAULT SY-DATUM *"...
CALL FUNCTION 'NUMBER_GET_NEXT' EXPORTING nr_range_nr = '01' object = 'ZDEMO' IMPORTING NUMBER = NUMBER EXCEPTIONS INTERVAL_NOT_FOUND = 1 NUMBER_RANGE_NOT_INTERN = 2 OBJECT_NOT_FOUND = 3 QUANTITY_IS_0 = 4 QUANTITY_IS_NOT_1 = 5 ...
* DATA:GETNUMBER TYPE CHAR16. * CALL FUNCTION 'NUMBER_GET_NEXT' * EXPORTING * NR_RANGE_NR = '01' "传出对象定义的序号代码 * OBJECT = 'ZTR2_SEQCC' * IMPORTING * NUMBER = GETNUMBER. * IF SY-SUBRC <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO ...
ABAP_创建Number_Range步骤SAP创建Number Range步骤 1 SE11创建一个域 2 SNRO a、编号长度域,即步骤1中的ZZNUM_09 b、警告百分比 c、缓冲区中的数量号 起始号要大于0、点击保存退出 d、号码范围 e、间隔 3 se37调用的functionNUMBER_GET_NEXT CALL FUNCTION 'NUMBER_GET_NEXT' EXPORTING NR_RANGE_NR = '...