Bank key/Bank Account number/ control key/

供应商所在的银行是西班牙的,发现到对于西班牙,系统会对Bank Key,Account Number还有Control Key进行检查。

SAP有一个Function可以根据Bank Key,Account Number算出Control Key:

BKK_CREATE_BANK_CHECK_DIG_ES

但是程式需要修改,参考下面的两个Notes

Note 1323541 - Bank control key for Spain is calculated incorrectly
Note 1445668 - Bank control key Spain/ES not correct


另外,Note 109589 - General information about bank account number checks,介绍了SAP系统关于银行信息的一些检查。

This note contains recommendation on how to enter the fields (bank key, bank account number  and bank control key) for vendors or customers.

Other terms

Bank account number, bank key, bank number, bank control key, post office bank current account, check digit, Belgium, Spain, Finland, France, Netherlands, Norway, New Zealand, Japan, Portugal, Hungary, Italy, U.S.A., Sweden, Russia, Switzerland, Germany, Australia, SSRV, BANK_ACCOUNT_CHECK, BANK_NUMBER_CHECK

Reason and Prerequisites

In vendor or customer master data, you have the option of entering the bank details. The entry of the fields for the bank key (BNo), bank account and control key (CK) depends on the bank country.
The SAP system currently supports the following checks for the following countries:

Bank country     Bank account number check      Bank number check
------------------------------------------------------------------------
Belgium                    x                             -
Finland                      x                             -
France          Bank no. and bank account no. are checked simultaneously
Italy          Bank no. and bank account no. are checked simultaneously
New Zealand                x                             x
Netherlands                 x                             -
Norway                        x                             -
Portugal      Bank no. and bank account no. are checked simultaneously
Russia          Bank no. and bank account no. are checked simultaneously
              (as of Release 4.5A)
Spain           Bank no. and bank account no. are checked simultaneously
Sweden                        x                             -
Hungary                    x                            x

Furthermore, there is a check for the control key for Japan and checks for post office bank current account numbers for Germany and Switzerland.

The table T005 (transaction OY17, table T005, view maintenance, choose V_005_B) contains information about the permitted length and also additional information (for example, whether the number is without gaps or is numeric). Here you also find the 'Bank data' checkbox, where you can deactivate further checks for the bank key or bank account number. Note that the formal check is always called.


The bank key or the bank number is to be entered in the 'Bank key' field. The 'Bank account number' field should contain a combination of the bank key, the account number or the branch respectively. For more information for each country see below.

The 'Control key' field can contain the following data:

  1. 1. A check digit the account is checked against
  1. 2. Additional information about the bank account if the bank account number has more than 18 digits (for example, Russia)
  1. 3. Suffix
Permitted length, characters and additional information for the country:

Belgium

The bank key has 3 digits and is numeric and without gaps.
The bank account has 14 digits (the first 3 digits are the bank key) and there must be a hyphen at the 4th and 12th position.
The last 2 digits are the check digits.

Germany

The post office bank current account number has up to 10 digits, is without gaps and may only have one hyphen. Exactly 3 digits must follow after the hyphen.
Examples: 777-301, 9-752

Finland

The bank key has 6 digits and is numeric and without gaps.
The bank account has 14 digits (without a hyphen) or 15 digits (if there is a hyphen at the 7th position). The first 6 positions contain the bank key.
The last digit is the check digit.
There is no check for the numbers in interval 81.. to 89.. (see Note 109520).

France

The bank key has 10 digits (5 positions stand for the bank number and 5 positions for the branch) and is numeric and without gaps.
The bank account has 11 digits, letters are allowed.
The bank key, the bank account number and the control key are checked simultaneously.
The control key always has 2 digits and is numeric.

Italy

The bank key has 10 digits (5 positions stand for the bank number and 5 positions for the branch) and is numeric and without gaps.
The bank account number has up to 12 digits, letters and special characters (' ' , '-', '.') are allowed.
The bank key, the bank account number and the control key are checked simultaneously.
The control key is always alphabetical.

Japan

The control key always has 2 digits and is numeric.

New Zealand

The bank key has 2 digits, is numeric, and only the following values are allowed: 01-09, 11-25, 27, 29-30, 31, 33.
The bank account number has up to 16 digits and is without gaps.
For the bank account, there are different checks that depend on the length (the first 4 digits stand for the branch).
For each bank number, there is an interval that is valid for the bank account number; for example, only branches '0001' to '0999' are valid for the bank number '01' (see Note 109921).

Netherlands

The bank key has up to 11 digits and is without gaps.
The bank account has 10 digits and is numeric and without gaps.

Norway

The bank account number has 11 digits and is numeric and without gaps.

Portugal

The bank key has 8 digits (4 positions stand for the bank number and 4 positions for the branch) and is numeric and without gaps.
The bank account number has up to 11 digits and is numeric and without gaps.
The control key has 2 digits and is numeric.
The bank key, the bank account number and the control key are checked simultaneously.

Russia

The bank key has up to 9 digits.
The bank account number has 20 digits. Since the 'Bank account number' only field has 18 digits, the first 2 positions of the bank account number contain the control key (CK).

Spain

The bank key has 8 digits (4 positions stand for the bank number and 4 positions for the branch) and is numeric and without gaps.
The bank account number has 10 digits and is numeric and without gaps.
The control key has 2 digits and is numeric.
The bank key, the bank account number and the control key are checked simultaneously.

Sweden

The bank key has 4 digits and is numeric and without gaps.
The bank account number has up to 11 digits and is without gaps.  The first 4 positions contain the bank key.

Switzerland

The post office bank current account number has up to 11 digits, is without gaps, and contains 2 hyphens. If the length of the post office bank current account number is 6, the post office bank current account cannot contain a hyphen.
Examples:
70-4152-8, 20-413-4, 10-123456-4

Hungary

The bank key has 8 digits and is numeric and without gaps.
The bank account number has either 17 or 8 digits.
The bank account number must contain exactly one hyphen if the field has
a length of 17 digits.

Australia

The bank number has up to 7 digits, is numeric and contains 1 hyphen at the 4th position. The first 3 digits contain the branch bank.
The bank account number has up to 9 digits and is numeric.
Example: 083-361    (bank key)
          117111990  (bank account number)

Solution
If the system issues an error message when you enter the bank data, check whether all data has been entered correctly.
The following table shows an example of what the fields should look like when entering bank data.

Country         Bank key                Bank account  Control key
------------------------------------------------------------------------
Belgium               320          320-0347134-41            -
Finland              123456          12345600000785            -
France            2004101005            0500012M026             06
Italy            0345203202                2819 30              P
Japan               -                      -                  09
New Zealand 1)         01          0902068389-00             -
New Zealand 2)         09              0000-74712            -
Netherlands        -                  0502664959             -
Norway                 -                  99994767484            -
Portugal          00350577            00006403900             30
Russia             044525202      70281080070013926             40
Spain               00120345              0000067890            03
Sweden                  5028            50280000391             -
Hungary 1)       31364919      22013041-52006107             -
Hungary 2)       31364919                44735272            -

As of Release 4.5A, the SAP System provides the option to develop your own check routine and to link it to the SAP System.
To develop your own check routing, copy the sample module and refer to the more detailed information in the documentation.

Checks and sample modules

Check                                Sample module
------------------------------------------------------------------------
Bank account number check             SAMPLE_INTERFACE_00003000
Bank number check                  SAMPLE_INTERFACE_00003010 post off. bank current acct no check  SAMPLE_INTERFACE_00003020

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11782589/viewspace-716675/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/11782589/viewspace-716675/

<think>好的,我现在需要回答用户关于Elasticsearch中`/bank/account`路径在POST _bulk API中的作用的问题。首先,我需要回忆一下Elasticsearch的基本结构和API的使用方法。 用户提到的引用内容中,引用[3]和[5]提到了`/bank/account`的使用。例如引用[3]说:“POST /bank/account/_bulk我们要插入到bank这个索引的,account这个类型中去。”这说明在Elasticsearch 7.x版本中,路径可能包含索引和类型。不过我记得Elasticsearch从7.x开始逐渐弃用类型(type),并在8.x中完全移除。所以这里的`account`可能是一个类型名称,而`bank`是索引名称。 接下来,Bulk API的作用是批量处理多个操作,比如索引、更新、删除文档。每个操作可以指定目标索引和类型。在路径中指定`/bank/account`的话,可能意味着批量操作默认应用到`bank`索引下的`account`类型中,这样在请求体中就不需要为每个操作重复指定索引和类型了。例如,引用[3]中的示例可能是在批量插入数据到`bank`索引的`account`类型里。 不过,根据Elasticsearch的版本变化,类型(type)的概念已经被弱化。在较新的版本中,每个索引只能有一个类型,通常默认为`_doc`。因此,用户可能在旧版本的ES中使用`/bank/account`来指定类型,而在新版本中可能不再适用,需要调整。 另外,引用[4]提到检索时使用的是`GET bank/_search`,没有指定类型,这说明在ES7之后,类型可能已经被省略,直接使用索引名称即可。这也支持了类型逐渐被弃用的观点。 总结来说,`/bank/account`在POST _bulk API中的作用是定义批量操作的目标索引为`bank`,类型为`account`。但需要注意版本兼容性,尤其是在新版本中类型可能不再使用,需替换为`_doc`或省略类型部分。 现在需要验证这些理解是否正确。根据官方文档,Bulk API的路径格式通常是`/{index}/_bulk`或`/{index}/{type}/_bulk`,后者在存在类型时使用。但ES7之后推荐使用`_doc`作为类型名或者不指定类型。例如,引用[1]提到的Bulk API文档应该会说明路径参数的结构。因此,用户示例中的`/bank/account/_bulk`符合旧版用法,将批量操作应用到`bank`索引的`account`类型中。 最后,需要提醒用户注意版本差异,并建议在较新版本中避免使用类型,以确保兼容性。</think>在Elasticsearch中,`/bank/account`路径在`POST _bulk` API中的作用是**指定批量操作的目标索引和类型**,具体含义如下: 1. **索引与类型的定义** - `/bank`:表示操作的目标索引(Index)名称为`bank`; - `/account`:表示文档的类型(Type)为`account`(适用于Elasticsearch 7.x之前版本,后续版本类型概念已被弱化)[^3][^5]。 2. **批量操作的默认作用域** 通过在路径中指定`/bank/account/_bulk`,所有批量操作(如插入、更新、删除)默认应用于`bank`索引的`account`类型。这意味着在请求体中,无需为每个操作单独声明`_index`和`_type`字段,除非需要覆盖默认值[^3]。 3. **版本兼容性说明** - 在Elasticsearch 7.x及以上版本,类型(Type)已逐步弃用,默认类型为`_doc`。若使用新版本,路径应调整为`/bank/_doc/_bulk`或直接使用`/bank/_bulk`[^4]; - 旧版本(如6.x)仍支持显式指定类型,但官方建议逐步迁移至无类型结构[^1]。 --- **示例:批量插入数据到`bank/account`** ```json POST /bank/account/_bulk {"index":{}} {"account_number":1,"balance":10000} {"index":{}} {"account_number":2,"balance":20000} ``` 此操作会将两条文档插入`bank`索引的`account`类型中。 --- **注意事项** - 若索引不存在,Elasticsearch会自动创建索引,但字段类型可能不符合预期,建议提前定义映射(Mapping)[^2]; - 批量操作需遵循特定JSON格式:每行一个操作元数据(如`{"index":{}}`),下一行为对应文档数据。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值