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. 1. When and why should you consider buffering?
  1. 2. Which buffering types are there and what are the advantages and disadvantages?
  1. 3. Should the object RF_BELEG be buffered?
  1. 4. Which buffering type should be used for RF_BELEG?
  1. 5. How do I activate the buffering?
  1. 6. Can the buffering be activated for certain company codes only?
  1. 7. How can I activate the pseudo ascending document number assignment?
  1. 8. Where can I find more information about Business Transaction Event 00001170?
  1. 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.

转载于:https://www.cnblogs.com/JulietLV/p/7803182.html

<think>好的,用户再次询问关于ros2 bagconvert命令的参数错误问题,特别是涉及-i和-o参数的问题。之前我已经给出过解决方案,但用户可能还是遇到问题,需要更详细的指导。首先,我需要确认用户的具体错误情况。用户提到“参数错误 -i输入文件-o输出选项配置文件格式不识别参数”,这可能意味着他们在使用命令时没有正确指定输入路径或输出配置文件的格式。此外,用户提供的引用中提到了YAML配置文件的编写,可能需要更具体的示例。接下来,我需要回顾之前的回答,确保这次的回答补充更多的细节,特别是关于YAML配置文件的正确格式。用户可能没有正确创建YAML文件,或者路径设置错误。同时,引用[1]中提到的存储选项和转换选项可能也需要解释,特别是storage_id和uri的设置。用户可能遇到的另一个问题是输入路径是否正确。ROS2的bag是以目录形式存在的,而不是单个文件,需要确认用户是否指向了正确的目录路径。此外,输出配置YAML中的uri参数需要是输出目录的名称,而不是文件路径,这一点需要强调。另外,用户可能混淆了输入和输出的参数顺序,或者在命令中遗漏了必要的参数。需要明确命令的正确格式,并给出具体的例子,确保用户能够复制粘贴并修改路径。最后,需要检查常见的错误情况,比如YAML语法错误、路径权限问题,以及存储类型是否支持。用户可能在配置文件中使用了错误的缩进或格式,导致命令无法识别。需要提醒用户使用在线验证工具检查YAML文件,并确保storage_id的值正确(如mcap或sqlite3)。总结来说,我需要分步骤详细说明命令的正确用法,提供YAML配置的示例,并列出常见错误及解决方法,确保用户能够逐步排除问题。同时,结合之前的回答,避免重复,补充更多细节,特别是关于配置文件的编写和路径的正确指定。</think>### 解决`ros2 bag convert`参数错误的分步指南 #### 1. 参数错误核心原因 `ros2 bag convert`命令需要**严格遵循参数格式**,错误提示表明: - `-i/--input`未正确指定输入路径 - `-o/--output-options`未提供有效的YAML配置文件路径 - 参数顺序或格式不符合规范[^1] --- #### 2. 完整命令格式 **基本语法**: ```bash ros2 bag convert -i <输入bag目录路径> -o <YAML配置文件路径> ``` **实际示例**: ```bash ros2 bag convert \ -i /home/user/rosbags/balcony_5th_floor_avia \ -o /home/user/rosbags/conversion_config.yaml ``` --- #### 3. 配置文件详解 创建`conversion_config.yaml`文件时需注意: ```yaml output: type: "sqlite3" # 可选mcap/sqlite3 uri: "converted_bag" # 输出目录名 storage_options: max_bag_size: 0 # 单位MB,0表示无限制 ``` **验证要点**: - 使用**空格缩进**(禁止Tab缩进) - 确保路径不含中文字符 - `uri`参数应为**新目录名称**而非文件路径 --- #### 4. 常见错误场景分析 | 错误类型 | 现象 | 解决方案 | |---------|------|----------| | 路径错误 | `No such file or directory` | 使用`ls -l`检查路径存在性 | | YAML格式错误 | `yaml.parser.ParserError` | 通过[yamllint](https://yamllint.com)验证语法 | | 存储类型不匹配 | `Unknown storage id` | 确认`type`字段为`sqlite3`或`mcap` | | 权限问题 | `Permission denied` | 使用`chmod`修改目录权限 | --- #### 5. 进阶配置示例 **合并多个输入bag**: ```yaml input: - /path/to/bag1 - /path/to/bag2 output: type: "mcap" uri: "merged_bag" ``` **转换存储格式**: ```yaml output: type: "mcap" # 从sqlite3转为mcap格式 uri: "mcap_bag" storage_options: max_bag_size: 1024 # 限制单个文件1GB ``` --- #### 6. 调试技巧 - **查看输入bag结构**: ```bash ros2 bag info balcony_5th_floor_avia ``` - **测试YAML有效性**: ```bash python3 -c 'import yaml; yaml.safe_load(open("conversion_config.yaml"))' ``` - **强制覆盖输出**: 在YAML中添加`overwrite: true`参数 ---
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值