ABAP--How to use Number Ranges' Function?

2024-01-17 09:38
文章标签 use function number abap ranges

本文主要是介绍ABAP--How to use Number Ranges' Function?,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

2006年10月16日 15:07:00

在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, per group

二、如何使用号码范围
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 a particular number range object, with their number range intervals.
    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 a number 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 from groups and intervals of an existing sub-object of a given number range 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 can enter a sub-object for a given number range object. If the specified sub-object already exists for the number range object, it is returned in the export parameter. If it does not exist, either an exception is raised or the return code "A" for user abort is returned.

  • NUMBER_RANGE_INTERVAL_MAINTAIN
    With this function module the maintenance dialog for number range intervals for a given number range object is offered. A parameter specifies the processing type. Possible processing types are:
    • Maintain intervals
    • Change number status
    • Display intervals
    • 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. A processing flag determines whether the object is to be displayed only or whether it can be maintained. Groups are deleted by deleting 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 which is to be maintained, and its groups and intervals, for access by other users. Lock errors are returned as exceptions.
  • NUMBER_RANGE_DEQUEUE
    With this function module, you unlock the number range object which has been maintained.
  • NUMBER_RANGE_ELEMENT_LIST *
    This function module gets the elements which are assigned to a particular number range interval for a number range object. The elements found are passed in a table. Errors are returned as exceptions.
  • NUMBER_RANGE_ELEMENT_TEXT_LIST *
    With this function module you can find element texts in the specified language for a given number range object. The texts are returned in a table. Execution errors are returned as exceptions.
  • NUMBER_RANGE_GROUP_LIST *
    This function module gets information about groups and the associated group and element texts for a specified number range object. The information is put in a table. The table can be used to change the element assignment or the group text. The change request is to be passed to the function module NUMBER_RANGE_GROUP_UPDATE.
    Errors are returned as exceptions.
  • NUMBER_RANGE_GROUP_UPDATE *
    With this function module, already assigned elements can be assigned to other intervals, or the assignment can be withdrawn. Group texts can also be maintained. All change requests are checked. Request errors are returned in an error table.

    The changes are passed in an internal table and are copied into the local memory of the function group.
    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 writing the changes to the database.
    To copy the contents of local memory to the database, call the function module NUMBER_RANGE_UPDATE_CLOSE.

  • NUMBER_RANGE_INTERVAL_LIST
    This function module gets the existing intervals to a given number range object, and puts them in a table. The table can be passed to the function module NUMBER_RANGE_INTERVAL_UPDATE to change intervals.
  • NUMBER_RANGE_INTERVAL_UPDATE
    With this function module you maintain intervals for a given number range object.
    The changes are passed in an internal table, and are copied into local memory.
    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 module NUMBER_RANGE_UPDATE_CLOSE.
  • NUMBER_RANGE_OBJECT_GET_INFO
    This function module gets information for a given number range object. This information is put in a table structure, which must be declared like the table structure INROI.
  • NUMBER_RANGE_SUBOBJECT_LIST (only object types 4-8)
    This function module gets the existing sub-objects of a given number range object, and puts them in the table passed.
  • NUMBER_RANGE_SUBOBJ_GET_INFO
    This function module gets information about the existing sub-objects of a given number range object. This information is put in a table structure, which must be declared like the table structure INROI.
  • NUMBER_RANGE_UPDATE_CLOSE
    With this function module you write changes which have been made to local memory to the database, with NUMBER_RANGE_GROUP_UPDATE and NUMBER_RANGE_INTERVAL_UPDATE. After calling this function module, you should unlock the changed number range object.
  • NUMBER_RANGE_UPDATE_INIT
    With this function module, you can initialize local memory if you want to discard the changes which have not yet been copied to the database.


    3.3 函数组(SNR2)

  • NUMBER_RANGE_OBJECT_MAINTAIN
    This function module provides all the screens needed to maintain a given number range object, with the possibility of branching to interval maintenance and change document display.
    An export parameter states which action the user has performed with the number range object.
  • NUMBER_RANGE_OBJECT_CLOSE
    With this function module, you write all changes to a given number range object, which were put in local memory with NUMBER_RANGE_OBJECT_UPDATE, to the database. If intervals are affected by the changes, they are updated. Change documents are created for all changes. A flag states whether intervals have been updated.
  • NUMBER_RANGE_OBJECT_DELETE
    With this function module, you can delete either the whole definition of a given number range object, including texts, or only the texts. The deletion is performed directly in the database.
    The function module provides no connection to the correction and transport system.
  • NUMBER_RANGE_OBJECT_INIT
    With this function module, you initialize local memory for a given number range object.
    You only need this call when you offer number range object maintenance in a user transaction, in which you want to provide the possibility of canceling changes which have not been saved.
  • NUMBER_RANGE_OBJECT_LIST
    This function module gets a list of all number range objects with their texts and attributes. The information is put in a table.
    The contents of local memory are not taken into account.
  • NUMBER_RANGE_OBJECT_READ
    This function module gets the texts and attributes of a given number range object. The records returned can be used for changes with the function modules NUMBER_RANGE_OBJECT_UPDATE and NUMBER_RANGE_OBJECT_DELETE.
  • NUMBER_RANGE_OBJECT_UPDATE
    This function module copies new number range objects or changes to existing number range objects into local memory, after error checks.
    The function module does not provide a connection to the correction and transport system.


    3.4 函数组(SNR3)

  • NUMBER_CHECK
    检查号码是否在号码区间内,一般是外部给号需要检查号码时,你的程序调用该函数.
  • NUMBER_GET_INFO
    读取一个号码范围数据的相关信息.
  • NUMBER_GET_NEXT
    分配下一个可用的空号

    2.5 函数组(SNR4)

  • NUMBER_RANGE_INTERVAL_INIT
    对号码对象间隔的数值状态的初始化.

    注意带*的函数只适用于以下几类号码对象: 2 and 3 and 5-8的号码范围对象



  • Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1336751


    这篇关于ABAP--How to use Number Ranges' Function?的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



    http://www.chinasem.cn/article/615606

    相关文章

    Java function函数式接口的使用方法与实例

    《Javafunction函数式接口的使用方法与实例》:本文主要介绍Javafunction函数式接口的使用方法与实例,函数式接口如一支未完成的诗篇,用Lambda表达式作韵脚,将代码的机械美感... 目录引言-当代码遇见诗性一、函数式接口的生物学解构1.1 函数式接口的基因密码1.2 六大核心接口的形态学

    C++11的函数包装器std::function使用示例

    《C++11的函数包装器std::function使用示例》C++11引入的std::function是最常用的函数包装器,它可以存储任何可调用对象并提供统一的调用接口,以下是关于函数包装器的详细讲解... 目录一、std::function 的基本用法1. 基本语法二、如何使用 std::function

    usaco 1.2 Name That Number(数字字母转化)

    巧妙的利用code[b[0]-'A'] 将字符ABC...Z转换为数字 需要注意的是重新开一个数组 c [ ] 存储字符串 应人为的在末尾附上 ‘ \ 0 ’ 详见代码: /*ID: who jayLANG: C++TASK: namenum*/#include<stdio.h>#include<string.h>int main(){FILE *fin = fopen (

    题目1380:lucky number

    题目1380:lucky number 时间限制:3 秒 内存限制:3 兆 特殊判题:否 提交:2839 解决:300 题目描述: 每个人有自己的lucky number,小A也一样。不过他的lucky number定义不一样。他认为一个序列中某些数出现的次数为n的话,都是他的lucky number。但是,现在这个序列很大,他无法快速找到所有lucky number。既然

    AutoGen Function Call 函数调用解析(一)

    目录 一、AutoGen Function Call 1.1 register_for_llm 注册调用 1.2 register_for_execution 注册执行 1.3 三种注册方法 1.3.1 函数定义和注册分开 1.3.2 定义函数时注册 1.3.3  register_function 函数注册 二、实例 本文主要对 AutoGen Function Call

    (function() {})();只执行一次

    测试例子: var xx = (function() {     (function() { alert(9) })(); alert(10)     return "yyyy";  })(); 调用: alert(xx); 在调用的时候,你会发现只弹出"yyyy"信息,并不见弹出"10"的信息!这也就是说,这个匿名函数只在立即调用的时候执行一次,这时它已经赋予了给xx变量,也就是只是

    js私有作用域(function(){})(); 模仿块级作用域

    摘自:http://outofmemory.cn/wr/?u=http%3A%2F%2Fwww.phpvar.com%2Farchives%2F3033.html js没有块级作用域,简单的例子: for(var i=0;i<10;i++){alert(i);}alert(i); for循环后的i,在其它语言像c、java中,会在for结束后被销毁,但js在后续的操作中仍然能访

    Jenkins 通过 Version Number Plugin 自动生成和管理构建的版本号

    步骤 1:安装 Version Number Plugin 登录 Jenkins 的管理界面。进入 “Manage Jenkins” -> “Manage Plugins”。在 “Available” 选项卡中搜索 “Version Number Plugin”。选中并安装插件,完成后可能需要重启 Jenkins。 步骤 2:配置版本号生成 打开项目配置页面。在下方找到 “Build Env

    rtklib.h : RTKLIB constants, types and function prototypes 解释

    在 RTKLIB 中,rtklib.h 是一个头文件,包含了与 RTKLIB 相关的常量、类型和函数原型。以下是该头文件的一些常见内容和翻译说明: 1. 常量 (Constants) rtklib.h 中定义的常量通常包括: 系统常量: 例如,GPS、GLONASS、GALILEO 等系统的常量定义。 时间常量: 如一年、一天的秒数等。 精度常量: 如距离、速度的精度标准。 2. 类型

    【AI大模型应用开发】2.1 Function Calling连接外部世界 - 入门与实战(1)

    Function Calling是大模型连接外部世界的通道,目前出现的插件(Plugins )、OpenAI的Actions、各个大模型平台中出现的tools工具集,其实都是Function Calling的范畴。时下大火的OpenAI的GPTs,原理就是使用了Function Calling,例如联网检索、code interpreter。 本文带大家了解下Function calling,看