1398444 - Buffering the document number assignment for RF_BELEG

Version 7   Type SAP Note
Release Status Released for Customer   Language English
Responsible Volker Kleinhenz ( D024958 )   Masterlanguage German
Processor Volker Kleinhenz ( D024958 )   Last Changed On 13.02.2017 12:37:36
Component FI-GL-GL-A ( Posting/Clearing )   Created On 21.10.2009 14:58:06
Other Components FI-AP-AP-A ( Posting/Clearing/Special General Ledger )
FI-AP-AP-J ( Integration/Accounting Interface )
FI-AR-AR-A ( Posting/Clearing/Special General Ledger )
FI-AR-AR-J ( Integration/Accounting Interface )

Symptom

This note contains frequently asked questions about buffering the document number assignment in financial accounting (number range object RF_BELEG).

Other Terms

SNRO, SNUM, NRIV, NRIV_LOKAL, NRIVSHADOW, NUMBER_GET_NEXT, RF_GET_DOCUMENT_NUMBER, FI document number assignment, lock waits, deadlock, CJ8G, 00001170, RKO7CO88, DBIF_RSQL_SQL_ERROR, CX_SY_OPEN_SQL_DB, READ_NRIV, ORA-00060, SAPLSNR3, LSNR3F01, FAQ

Solution

Questions:

    1. When and why should you consider buffering?
    2. Which buffering types are there and what are the advantages and disadvantages?
    3. Should the object RF_BELEG be buffered?
    4. Which buffering type should be used for RF_BELEG?
    5. How do I activate the buffering?
    6. Can the buffering be activated for certain company codes only?
    7. How can I activate the pseudo ascending document number assignment?
    8. Where can I find more information about Business Transaction Event 00001170?
    9. When is the entry date and time set in the FI document?

1. When and why should you consider buffering?
The document number is assigned in chronologically ascending order based on the table NRIV. For this, the table NRIV is locked until the application (LUW) is terminated by either a COMMIT WORK or ROLLBACK (see also Note 639754). Another application cannot take a document number during this time.
The update is called by the COMMIT WORK and the document number is assigned permanently. In the case of a rollback, the document number that was just used is not assigned and is available for the next posting in NRIV again.
This lock guarantees a choronologically ascending assignment of the document number without gaps. However, the lock causes a serialization in the table NRIV, which can seriously impair the system performance (see also Note 678501). There are performance problems in particular in the case of parallel batch processes, as the lock is held for a very long time here.
There are two solutions for this:

  • No parallel processing
  • Buffering of the number range object RF_BELEG

In S/4 HANA, as of Support Package 1 of Release S/4HANA 1610, parallel buffering with pseudo-ascending document number assignment (so-called Italian solution) is used by default.For more information about buffering in S/4 HANA, please see SAP Note 2376829 - FAQ: Buffering for number range object RF_BELEG in S/4HANA.

2. Which buffering types are there and what are the advantages and disadvantages?
There are the following buffering types whose advantages and disadvantages are described in Note 504875:

  • Main memory
  • Local buffering
  • Local buffering with work process ID (details in Note 179224)
  • Parallel buffering (Note 599157)
  • Parallel buffering with pseudo ascending document number assignment (Note 840901)

3. Should the object RF_BELEG be buffered?
Legal regulations basically require a consecutive and complete entry of all business transactions. On the one hand, there are no concrete legal requirements in many countries or accounting principles regarding the sequence of the FI document number assignment. However, there are also rules depending on the business process.
A general statement is not possible because of the numerous legal regulations or local accounting principles. Therefore the activation of the buffering must be reconciled with the financial accounting department.

4. Which buffering type should be used for RF_BELEG?
The buffering in the main memory should not be used, because gap-free document number assignment cannot be guaranteed.

Because the local buffering does not sufficiently solve the performance problems and the document number assignment is not performed chronologically, the local buffering is not recommended either.

In the case of the local buffering with work process ID (Note 179224), the document number assignment is performed per application server and work process using the table NRIV_LOKAL. The document numbers are basically assigned without gaps, but not chronologically to the document entry or posting. In addition, gaps may occur in the document number assignment at the end of a fiscal year if not all numbers in NRIV_LOKAL were used up.
However, these can be documented using the report RSSNR0A1.
For an efficient document number assignment in parallel batch processes, the quantity of numbers selected in the buffer must not be too small. If too large a quantity of numbers is selected in the buffer, a smaller number range can be quickly exhausted if there are several application processes.
Because of this disadvantage, this type of buffering is to be used only if the parallel buffering is not available.

The parallel buffering (Note 599157) solves the problems of the local buffering with work process ID for parallel batch processes.
The quantity of numbers in the buffer can therefore be reduced to 1. The document number assignment comes as close as possible to the behavior of the unbuffered assignment from NRIV, because the number is assigned without gaps and basically in chronologically ascending order. In the case of a rollback, the document number is available again in the buffer table NRIVSHADOW and is used for the next document on this application server and work process. In this exception, the document number assignment is no longer performed in chronologically ascending order. Gaps in the document number assignment should only be explained by update terminations, as in the case of the unbuffered document number assignment. You can use the report RFVBER00 for this.

Logically, the document number assignment performs better if a larger quantity of numbers is used in the buffer - 10, for example. However, the document numbers are then not assigned in a chronologically ascending order. The numbers that are still in the buffer are documented as in the enhanced local buffering, but here it is performed using the report RSSNR0S1. Gaps cannot be explained exclusively by means of RFVBER00.

Parallel buffering with pseudo-ascending document number assignment (SAP Note 840901) is a special case of parallel buffering - the so-called Italian solution. Buffer size 1 is automatically used, regardless of the quantity of numbers used in the buffer in transaction SNUM. In the case of a rollback, the assigned document number is no longer available. These gaps can also be documented with the report RSSNR0S1 using the table NRIV_RESTE or NRIV_DOCU (as of SAP Note 2022364). The document numbers are assigned in a chronologically ascending order to costs of a detectable document number gap. For more information, see the information on parallel buffering in the SAP Help Portal.

Due to the advantages of parallel buffering, it should be used for the number range object RF_BELEG. Since the document number assignment performs well even with a buffer size of 1 and comes pretty close to the unbuffered assignment, it is recommended from an accounting perspective.
In some countries, the documents of one day must have a higher number than the documents of the previous day. This kind of legal regulations can be adhered to only with the pseudo ascending document number assignment.

5. How do I activate the buffering?
The buffering is activated globally in transaction SNRO or SNUM - this applies for all clients, company codes and business transactions.

6. Can the buffering be activated for certain company codes only?
As dealt with in question 3, there are different rules for document number assignment. This ranges from generally valid, undefined requirements to detailed regulations at business process level.
The use of the buffering per company code, number range or fiscal year is only indirectly possible. First, the buffering must be set in transaction SNRO. It is a prerequisite that the number range object RF_BELEG is buffered. The number of numbers in the buffer must be greater than 0 because otherwise the document number assignment is not buffered.

You can use the process Business Transaction Event (BTE) 00001170 to avoid the buffering of RF_BELEG set in SNRO. For this, the export parameter E_NO_BUFFER must be set to ‘X‘. This can be done independently of the company code (I_COMPANY), number range interval (I_RANGE) and fiscal year (I_YEAR). Because the number range interval is assigned to the document type (transaction OBA7), it is possible to use the buffering for certain business processes and company codes only, in which the serialization in NRIV (see question 1) leads to problems.

To prevent the number assignment being inadvertently buffered, we recommend the following procedure:
1. Implement the customer-specific function module for BTE 00001170 and activate the BTE (transaction FIBF).
2. Globally activate the buffering in SNRO.

Also make sure to leave the fields for the country and the application indicator empty when you assign your function module to the BTE 00001170. If this is not the case, the system does not call your function module, and the buffering set in transaction SNRO is used for all number ranges, company codes, and fiscal years.

7. How can I activate the pseudo ascending document number assignment?
Parallel buffering must be set in transaction SNRO.
In BTE 00001170, the export parameter E_NO_BUFFER must be set to ‘S‘ instead of ‘X‘. This can be done regardless of number range, company code and fiscal year. It is then possible to use the pseudo ascending document number assignment only if legally required.

8. Where can I find more information about Business Transaction Event 00001170?
You can find documentation for Business Transaction Events in the Implementation Guide (transaction SPRO) under
Financial Accounting -> Financial Accounting Global Settings -> Business Transaction Events
or
Financial Accounting (New) -> Financial Accounting Global Settings (New) -> Tools -> Customer Enhancements -> Business Transaction Events

For more information about BTE 00001170, please use transaction BERP.

9. When is the entry date and time set in the FI document?
In FI, the time (BKPF-CPUTM = SY-UZEIT) is set during posting (more precisely at the event PROJECT) before the document number assignment and before the update is called. The entry time of the FI document must be available for other components, as these are partially used there.
In the case of the pseudo ascending document number assignment, a document with an earlier entry time may receive a higher document number. This is the case if other accounting components require a longer runtime after the time is set than for a document with a later entry time. However, this can also happen with an unbuffered number range.

时间: 2024-08-01 22:44:24

1398444 - Buffering the document number assignment for RF_BELEG的相关文章

MV45AOZZ 销售订单增强点

[转自 http://blog.csdn.net/zhongguomao/article/details/6712580]choose the table VBAP or VBAK ( depending on header or item) click on button "append Structures" . it will propose you the standard name for the table ZAVBAP or ZAVBAK add fields with 

SAP NUMBER RANGE维护配置object FBN1 Deletion only possible if status is initial

背景: 错误日志: SAP FBN1 Deletion only possible if status is initial 场景: 如果目标机已有NUMBER RANGE 不为0,需要删除配置年为9999的方案: I Created wrong No range in Business Entity. When I am trying to delete wrong no range system showing massage "Deletion only possible if statu

SNRO:Number Range

业务对象是在一定的编号范围内分配编号的,编号既可以是内部分配也可以是外部分配.对于外部分配,用户输入编号,系统检查这个编号是否被占用.对于内部分配,系统会自动的把编号分配给业务对象.所以内部分配和外部分配有不同的Number range.对于编号的分配,要考虑法规要求和业务规则,比如要求编号必须是连续的,按发生时间顺序排列等.为了保证编号的分配没有问题,可以通过相应的number range object来实现. Number range object通过SNRO来维护.对于自定义的number

FIT9131 Semester 1 2019 Assignment

FIT9131 Semester 1 2019 Assignment 122 March 2019 1Nature Trail GameIntroductionAssignment 1 has two components: a programming task and a unit test. These components areassessed independently but BOTH are required. The programming component is worth

SD从零开始41-44

[原创] SD从零开始41 科目确定(Account determination) 使用科目确定Using Account Determination 你将需要在几个不同的领域确定将要记账的科目: 用于记账销售收入,销售扣除和增值税的总账科目在数据从billing document传输到FI时自动地确定: 当处理现金销售时,必须在凭证中设置一个总账科目用于现金结算(不会记账到客户账户): 到4.0版本时,可以确定一个不同于付款方客户主数据中输入的科目的统御科目: 当使用payment cards

OPENVPN搭建与配置

Content-type: text/html; charset=UTF-8 openvpn Section: Maintenance Commands (8)Updated: 17 November 2008Index Return to Main Contents NAME openvpn - secure IP tunnel daemon. SYNOPSIS openvpn [ options ... ] INTRODUCTION OpenVPN is an open source VPN

Solr in action学习笔记 第十三章 SolrCloud

13.1 Getting started with SolrCloud 13.1.1Starting Solr in cloud mode 单机建立一个集群应用,一个端口模拟一个solr cd $SOLR_INSTALL/cp -r example/ shard1/ 13.1.2 Motivation behind the SolrCloud architecture ■ Scalability■ High availability■ Consistency■ Simplicity■ Elast

SAP 常用T-CODE

Plant Maintenance (PM) IW32 - Change Plant Maintenance Order IW33 - Display Plant Maintenance Order IW34 - Create Notification Order IW51 - Create Service Notification IW52 - Change Service Notification IW53 - Display Service Notification IW54 - Crea

[C/C++不常见语法特性]_[初级]_[左值-右值-lvalue-rvalue]

参考:1. http://en.cppreference.com/w/cpp/language/value_category   << Value categories >> 2. https://msdn.microsoft.com/en-us/library/dd293668.aspx   << Rvalue Reference Declarator: && >>3. https://msdn.microsoft.com/en-us/li