3. 程序读取: CALLFUNCTION'NUMBER_RANGE_ENQUEUE'EXPORTINGobject='YLBPP001'"这个就是流水号对象EXCEPTIONSforeign_lock=1object_not_found=2system_failure=3OTHERS=4.IFsy-subrcEQ0.CALLFUNCTION'NUMBER_GET_NEXT'EXPORTINGnr_range_nr='1'"这个就是维护的间隔号object='YLBPP001'"这个就是流水号对象*QUANTITY =...
ABAP-获取流水号函数 DATA:l_numTYPEpLENGTH4.SELECTSINGLE*INTO@DATA(ls_snro)FROMzsd_snroWHEREname='ZSD_JS'ANDsnro='ZSDJS'.*每天重置流水号IFls_snro-zdate<>sy-datumORls_snroIS INITIAL.CALL FUNCTION'NUMBER_RANGE_INTERVAL_INIT'EXPORTINGobject='ZSDJS'* SUBOBJECT = ' '* INTERVALS =* CLIENT = S...
Before you call this function module, you must lock the number range object in question with NUMBER_RANGE_ENQUEUE, and unlock it again with NUMBER_RANGE_DEQUEUE, after the changes have been written to the database. To copy the contents of local memory to the database, call the function mod...
NUMBER_GET_NEXT函数在处理高并发场景时确实采取了多种策略,然而,其使用的锁机制在某些情况下可能过于保守,甚至在一定程度上阻碍了并发性能。该函数调用的ENQUEUE_ESNRIV锁函数,主要在修改Number Range Object的编号范围时发挥作用,但其锁定策略是否适用于每次取号操作,确实值得商榷。此外,在SAP开发中,有时会遇到...
(1) one, two or several number ranges 有分组 (2) one number range, external or internal, per group (3) two number ranges, external and internal, per group 有⼦对象的号码范围对象 ⽆分组 (4) one, two or several number ranges 有不依赖⼦对象的分组 (5) one number range, external ...
加锁41CALLFUNCTION'NUMBER_RANGE_ENQUEUE'42EXPORTING43object='ZSDJS'44EXCEPTIONS45foreign_lock =146object_not_found =247system_failure =348OTHERS =4.4950IFsy-subrc =0.51"获取下个数字52CALLFUNCTION'NUMBER_GET_NEXT'53EXPORTING54nr_range_nr ='1'55object='ZSDJS'56IMPORTING57number =l_num58EXCEPTIONS...
CALL FUNCTION 'NUMBER_RANGE_ENQUEUE' EXPORTING object = 'Z_LSH' EXCEPTIONS foreign_lock = 1 object_not_found = 2 system_failure = 3 OTHERS = 4. * **如果号码范围存在 if sy-subrc eq 0 . * ***得到一个号码, CALL FUNCTION 'NUMBER_GET_NEXT' EXPORTING...
CALL FUNCTION'NUMBER_RANGE_ENQUEUE 'EXPORTING object = 'ZBANKID'EXCEPTIONS foreign_lock = 1 object_not_found = 2 system_failure = 3 OTHERS = 4.IF sy-subrc EQ0.CALL FUNCTION'NUMBER_GET_NEXT 'EXPORTING nr_range_nr = '1'object = 'ZBANKID'IMPORTING number = iv_bank...
***t_code snro对应的锁定和使用【 CALL FUNCTION 'NUMBER_RANGE_ENQUEUE' EXPORTING OBJECT = 'ZRPP_003' "s… 阅读全文 分配all权限 REPORT ZTESTCREATEUSER. data: l_USR04 LIKE USR04 , l_UST04 LIKE UST04 , l_PROFS LIKE USR04-PROFS , l_USRBF2 like USRBF2 occurs 0 with header l… ...
The ABAPNUMBER_RANGE_ENQUEUEfunction sets a lock on the number range object. If the lock is successfully set on the SAP number range, usingNUMBER_GET_NEXTfunction call the next number in the number range interval is read and passed into an ABAP variable. ...