ABAP Number Ranges设置及使用
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
ABAP:ABAP--How to use Number Ranges' Function? 2007-08-16 14:29:20| 分类:SAP ABAP | 标签:|字号大中小订阅
在SAP系统中,号码范围用于给数据记录提供惟一标识.
1 号码范围对象分类
∙无子对象的号码范围对象
无分组
(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 or internal, per group
(6) two number ranges, external and internal, per group
有依赖子对象的分组
(7) one number range, external or internal, per group
(8) two number ranges, external and internal, pergroup
二、如何使用号码范围
2.1 确定号码范围的类型并创建新的号码范围对象(SNRO)
需要多少个号码范围: 1, 2 或者更多?
号码范围是否需要子范围对象(如:company code, plant, controlling area等等)?
号码范围是否需要分组(如:物料类型)?
如果需要分组,那分组的是否需要子范围对象?
号码范围是否需要区分财务年度?
2.2 维护号码范围对象的间隔;
3.3 在程序中使用号码范围的函数进行记录编号或检查可用号码;
三、号码范围的函数简要说明
3.1 函数组(SNR0)
∙NUMBER_RANGE_SHOW
This function module displays the groups which exist for aparticular number range object, with their number rangeintervals.
After return, the return code chosen by the user (Back or Cancel) is available.
∙NUMBER_RANGE_ELEMENTS_SHOW *
This function module displays all elements, which are assigned to anumber range interval.
After return, the return code chosen by the user (Back or Cancel) is available.(only object types 4-8)
This function module enables you to copy number range objects fromgroups and intervals of an existing sub-object of a given numberrange object to another of its existing sub-objects.
After return, the return code chosen by the user (Back or Cancel) is available.(only object types 4-8)
This function module provides a dialog box in which the user canenter a sub-object for
a given number range object. If thespecified sub-object already exists for the number
range object, itis returned in the export parameter. If it does not exist, eitheran exception is raised or the return code "A" for user abort isreturned.
∙NUMBER_RANGE_INTERVAL_MAINTAIN
With this function module the maintenance dialog for number rangeintervals for a given number range object is offered. A parameterspecifies the processing type. Possible processing types are:
o Maintain intervals
o Change number status
o Display intervals
o Create new groups (only for object types 2 and 3 and 5-8)
The dialog path is determined by the object type.
After return, the return code chosen by the user (Back or Cancel) is available.
∙NUMBER_RANGE_GROUP_MAINTAIN *
This function module is the maintenance dialog (Create, Change,Display) for number range groups for a given number range object. Aprocessing flag determines whether the object is to be displayedonly or whether it can be maintained. Groups are deleted bydeleting their intervals.
After return, the return code chosen by the user (Back or Cancel) is available.
∙NUMBER_RANGE_SUBOBJECT_COPY
∙NUMBER_RANGE_SUBOBJECT_GET
3.2 函数组(SNR1)
∙NUMBER_RANGE_ENQUEUE
With this function module, you lock the number range object whichis to be maintained, and its groups and intervals, for access byother users. Lock errors are returned as exceptions.
∙NUMBER_RANGE_DEQUEUE
With this function module, you unlock the number range object whichhas been maintained.
∙NUMBER_RANGE_ELEMENT_LIST *
This function module gets the elements which are assigned to aparticular number range interval for a number range object. Theelements found are passed in a table. Errors are returned asexceptions.
∙NUMBER_RANGE_ELEMENT_TEXT_LIST *
With this function module you can find element texts in thespecified language for a given number range object. The texts arereturned in a table. Execution errors are returned asexceptions.
∙NUMBER_RANGE_GROUP_LIST *
This function module gets information about groups and theassociated group and element texts for a specified number rangeobject. The information is put in a table. The table can be used tochange the element assignment or the group text. The change requestis to be passed to the function moduleNUMBER_RANGE_GROUP_UPDATE.
Errors are returned as exceptions.