---
# API: Bank - Read (A2X)
# File: API_BANKDETAIL_SRV.md
# Version: 1.1.0
# Status: ACTIVE
# Protocol: OData V2
# Source URL: https://api.sap.com/api/API_BANKDETAIL_SRV/overview
# Generated: 2026-07-23 14:17:02
---

# Bank - Read / 银行数据读取 API

> **API 版本:** 1.1.0 | **状态:** ACTIVE | **协议:** OData V2  
> **技术名称:** `API_BANKDETAIL_SRV`  
> **服务根路径:** `/sap/opu/odata/sap/API_BANKDETAIL_SRV`  
> **SAP 通信场景:** `SAP_COM_0192`

## 概述 / Overview

该服务支持读取 SAP S/4HANA 系统中的银行主数据，包括银行名称、地址、SWIFT/BIC 代码等信息。

This synchronous inbound OData V2 service enables you to read bank master data from your SAP S/4HANA system, including bank names, addresses, SWIFT/BIC codes, and other bank details.

**API 业务加速器中心:** [https://api.sap.com/api/API_BANKDETAIL_SRV/overview](https://api.sap.com/api/API_BANKDETAIL_SRV/overview)

---

## 实体列表 / Entity List

| # | 实体名称 | 描述 (EN) | 描述 (CN) | 主键 |
|---|----------|-----------|-----------|------|
| 1 | `A_BankDetail` | Bank Detail | 银行详细信息 | `BankCountry`, `BankNumber` |

---

## 1. A_BankDetail — 银行详细信息

**实体集合路径:** `A_BankDetail`  
**主键 (Key):** `BankCountry` (CHAR 3), `BankNumber` (CHAR 15)  
**ETag:** 不支持

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BankCountry` | String | 3 | Country/Region Key of Bank | 银行国家/地区代码 (主键) |
| `BankNumber` | String | 15 | Bank Number | 银行编号 (主键) |
| `BankInternalID` | String | 15 | Bank Keys | 银行内部标识 |
| `BankName` | String | 60 | Name of Financial Institution | 金融机构名称 |
| `BankName2` | String | 60 | Name of Financial Institution (Line 2) | 金融机构名称 第2行 |
| `BankGroup` | String | 2 | Bank Group (Bank Network) | 银行组 (银行网络) |
| `CityName` | String | 35 | City | 城市 |
| `Branch` | String | 40 | Bank Branch | 银行分行 |
| `SWIFTCode` | String | 11 | SWIFT/BIC for International Payments | SWIFT/BIC 国际支付代码 |
| `BankControlKey` | String | 2 | Bank Control Key | 银行控制标识 |
| `Country` | String | 3 | Country/Region | 国家/地区 |
| `Region` | String | 3 | Region (State, Province, County) | 地区 (州/省/县) |
| `StreetName` | String | 35 | Street and House Number | 街道及门牌号 |
| `PostalCode` | String | 10 | Postal Code | 邮政编码 |
| `POBox` | String | 10 | PO Box | 邮政信箱 |
| `InternationalLocationNumber1` | String | 7 | International Location No. 1 | 国际位置编号 1 |
| `InternationalLocationNumber2` | String | 5 | International Location No. 2 | 国际位置编号 2 |
| `CreatedByUser` | String | 12 | Created By | 创建人 |
| `CreationDate` | DateTime | - | Created On | 创建日期 |
| `LastChangedByUser` | String | 12 | Last Changed By | 最后更改人 |
| `LastChangeDate` | DateTime | - | Last Changed On | 最后更改日期 |

### 导航属性 / Navigation Properties

无

### 端点路径速查表

| 操作 | HTTP 方法 | 端点路径 |
|------|-----------|---------|
| 读取单个 | GET | `A_BankDetail(BankCountry='{country}',BankNumber='{number}')` |
| 读取集合 | GET | `A_BankDetail` |
| 创建 | POST | `A_BankDetail` |
| 更新 | PATCH | `A_BankDetail(BankCountry='{country}',BankNumber='{number}')` |
| 删除 | DELETE | `A_BankDetail(BankCountry='{country}',BankNumber='{number}')` |

---

## CRUD 端点 / CRUD Endpoints

### 创建 (Create) — POST
```
POST /sap/opu/odata/sap/API_BANKDETAIL_SRV/A_BankDetail
Content-Type: application/json
```

### 读取 (Read) — GET
```
GET /sap/opu/odata/sap/API_BANKDETAIL_SRV/A_BankDetail(BankCountry='CN',BankNumber='1234567890')
GET /sap/opu/odata/sap/API_BANKDETAIL_SRV/A_BankDetail?$filter=BankCountry eq 'CN'&$top=10
```

### 更新 (Update) — PATCH
```
PATCH /sap/opu/odata/sap/API_BANKDETAIL_SRV/A_BankDetail(BankCountry='CN',BankNumber='1234567890')
Content-Type: application/json
```

### 删除 (Delete) — DELETE
```
DELETE /sap/opu/odata/sap/API_BANKDETAIL_SRV/A_BankDetail(BankCountry='CN',BankNumber='1234567890')
```

---

## 认证 / Authentication

### OAuth 2.0 (推荐)
```
Authorization: Bearer <access_token>
Content-Type: application/json
```

### 基本认证 (Basic Auth)
```
Authorization: Basic <base64(username:password)>
```

### CSRF Token 处理
```http
# Step 1: Fetch CSRF Token
GET /sap/opu/odata/sap/API_BANKDETAIL_SRV/A_BankDetail
X-CSRF-Token: Fetch

# Step 2: Use Token for write operations
POST /sap/opu/odata/sap/API_BANKDETAIL_SRV/A_BankDetail
X-CSRF-Token: <token_value>
Content-Type: application/json
```

---

## 错误码 / Error Codes

| HTTP 状态码 | 描述 (EN) | 描述 (CN) |
|-------------|-----------|-----------|
| 200 | OK | 请求成功 |
| 201 | Created | 创建成功 |
| 204 | No Content | 无返回内容 |
| 400 | Bad Request | 请求参数错误 |
| 401 | Unauthorized | 未授权 |
| 403 | Forbidden | 禁止访问 |
| 404 | Not Found | 资源不存在 |
| 500 | Internal Server Error | 服务器内部错误 |

---

## 相关资源 / References

| 资源 | 链接 |
|------|------|
| SAP API Business Hub | [https://api.sap.com/api/API_BANKDETAIL_SRV/overview](https://api.sap.com/api/API_BANKDETAIL_SRV/overview) |
| SAP Help Portal | [https://help.sap.com/docs/SAP_S4HANA_CLOUD/d4eb54ea54944b04923af573b28a1e7d/34c80bfa05f740bca57c17b941bc28bf.html](https://help.sap.com/docs/SAP_S4HANA_CLOUD/d4eb54ea54944b04923af573b28a1e7d/34c80bfa05f740bca57c17b941bc28bf.html) |
| SAP Cloud SDK Java VDM | [https://javadoc.io/static/com.sap.cloud.sdk.s4hana/s4hana-api-odata/4.5.0/com/sap/cloud/sdk/s4hana/datamodel/odata/namespaces/bankdetail/BankDetail.html](https://javadoc.io/static/com.sap.cloud.sdk.s4hana/s4hana-api-odata/4.5.0/com/sap/cloud/sdk/s4hana/datamodel/odata/namespaces/bankdetail/BankDetail.html) |
