---
# API: Business Partner (A2X)
# File: API_BUSINESS_PARTNER.md
# Version: 1.7.0
# Status: ACTIVE
# Protocol: OData V2
# Source URL: https://api.sap.com/api/API_BUSINESS_PARTNER/overview
# Generated: 2026-07-23 14:17:02
---

# Business Partner (A2X) / 业务伙伴 API

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

## 概述 / Overview

该服务支持对业务伙伴、供应商和客户的主数据进行创建、读取、更新和删除（CRUD）操作。同时支持深实体创建（Deep Insert）和批处理。

This synchronous inbound OData V2 service enables CRUD operations on Business Partner, Customer, and Supplier master data. It supports deep entity creation (POST) and batch processing.

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

---

## 实体列表 / Entity List

| # | 实体名称 | 描述 (EN) | 描述 (CN) | 主键 |
|---|----------|-----------|-----------|------|
| 1 | `A_BusinessPartner` | Business Partner General Data | 业务伙伴通用数据 | `BusinessPartner` |
| 2 | `A_BusinessPartnerAddress` | Business Partner Address | 业务伙伴地址 | `BusinessPartner`, `AddressID` |
| 3 | `A_BusinessPartnerRole` | Business Partner Role | 业务伙伴角色 | `BusinessPartner`, `BusinessPartnerRole` |
| 4 | `A_BusinessPartnerBank` | Business Partner Bank Details | 业务伙伴银行信息 | `BusinessPartner`, `BankIdentification` |
| 5 | `A_BusinessPartnerContact` | Business Partner Contact Person | 业务伙伴联系人 | `RelationshipNumber`, `BusinessPartnerCompany`, `BusinessPartnerPerson` |
| 6 | `A_BusinessPartnerRating` | Business Partner Rating | 业务伙伴评级 | `BusinessPartner`, `BusinessPartnerRatingProcedure`, `BPValidityStartDate` |
| 7 | `A_BusinessPartnerTaxNumber` | Business Partner Tax Numbers | 业务伙伴税号 | `BusinessPartner`, `BPTaxType` |
| 8 | `A_BusinessPartnerRelationship` | Business Partner Relationship | 业务伙伴关系 | `RelationshipNumber`, `BusinessPartner1`, `BusinessPartner2`, `ValidityStartDate` |
| 9 | `A_BPAddrDepdntIntlLocNumber` | Address-Dependent Intl Location No. | 地址相关国际位置编号 | `BusinessPartner`, `AddressID`, `AddrDepdntIntlLocNumber` |
| 10 | `A_BPAddrDepdntTaxNumbers` | Address-Dependent Tax Numbers | 地址相关税号 | `BusinessPartner`, `AddressID`, `BPTaxType` |
| 11 | `A_BusinessPartnerIsBank` | Business Partner Is Bank | 业务伙伴银行标识 | `BusinessPartner` |
| 12 | `A_BuPaIdentification` | Business Partner Identification | 业务伙伴标识信息 | `BusinessPartner`, `BPIdentificationType` |
| 13 | `A_BuPaIndustry` | Business Partner Industry | 业务伙伴行业信息 | `BusinessPartner`, `IndustrySector`, `IndustrySystemType` |
| 14 | `A_AddressEmailAddress` | Email Address | 电子邮件地址 | `BusinessPartner`, `AddressID`, `Person`, `OrdinalNumber` |
| 15 | `A_AddressFaxNumber` | Fax Number | 传真号码 | `BusinessPartner`, `AddressID`, `Person`, `OrdinalNumber` |
| 16 | `A_AddressPhoneNumber` | Phone Number | 电话号码 | `BusinessPartner`, `AddressID`, `Person`, `OrdinalNumber` |
| 17 | `A_AddressHomePageURL` | Home Page URL | 主页网址 | `BusinessPartner`, `AddressID`, `Person`, `OrdinalNumber` |

---

## 1. A_BusinessPartner — 业务伙伴通用数据

**实体集合路径:** `A_BusinessPartner`  
**主键 (Key):** `BusinessPartner` (CHAR 10)  
**ETag:** 支持 (`ETag` 字段)

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BusinessPartner` | String | 10 | Business Partner Number | 业务伙伴编号 (主键) |
| `BusinessPartnerCategory` | String | 2 | BP Category (1=Person, 2=Organization, 3=Group) | 业务伙伴类别 |
| `BusinessPartnerGrouping` | String | 4 | BP Grouping (Account Group) | 业务伙伴分组 |
| `BusinessPartnerFullName` | String | 81 | Full Name | 业务伙伴全名 |
| `BusinessPartnerName` | String | 81 | BP Name | 业务伙伴名称 |
| `BusinessPartnerBirthName` | String | 40 | Birth Name | 出生名称 |
| `BusinessPartnerBirthplaceName` | String | 40 | Birthplace | 出生地 |
| `BusinessPartnerDeathDate` | DateTime | - | Date of Death | 死亡日期 |
| `BusinessPartnerIsBlocked` | Boolean | - | Central Block for BP | 业务伙伴集中锁定标识 |
| `BusinessPartnerType` | String | 1 | BP Type | 业务伙伴类型 |
| `BusinessPartnerOccupation` | String | 4 | Occupation | 职业 |
| `BusinessPartnerIDByExtSystem` | String | 20 | BP ID from External System | 外部系统业务伙伴ID |
| `NaturalPersonEmployerName` | String | 40 | Employer Name | 雇主名称 |
| `OrganizationBPName1` | String | 40 | Org Name Line 1 | 组织名称 第1行 |
| `OrganizationBPName2` | String | 40 | Org Name Line 2 | 组织名称 第2行 |
| `OrganizationBPName3` | String | 40 | Org Name Line 3 | 组织名称 第3行 |
| `OrganizationBPName4` | String | 40 | Org Name Line 4 | 组织名称 第4行 |
| `InternationalLocationNumber1` | String | 7 | International Location No. 1 | 国际位置编号1 |
| `InternationalLocationNumber2` | String | 5 | International Location No. 2 | 国际位置编号2 |
| `AuthorizationGroup` | String | 4 | Authorization Group | 授权组 |
| `CreatedByUser` | String | 12 | Created By | 创建人 |
| `CreationDate` | DateTime | - | Created On | 创建日期 |
| `CreationTime` | Time | - | Created At | 创建时间 |
| `LastChangedByUser` | String | 12 | Last Changed By | 最后更改人 |
| `LastChangeDate` | DateTime | - | Last Changed On | 最后更改日期 |
| `LastChangeTime` | Time | - | Last Changed At | 最后更改时间 |
| `AddressID` | String | 10 | Standard Address ID | 标准地址ID |
| `BusinessPartnerPrintFormat` | String | 1 | Print Format | 打印格式 |
| `BusinessPartnerSortKey` | String | 10 | Sort Key | 排序关键字 |
| `BusinessPartnerValidityEndDate` | DateTime | - | BP Validity End Date | 业务伙伴有效截止日期 |
| `BusinessPartnerValidityStartDate` | DateTime | - | BP Validity Start Date | 业务伙伴有效起始日期 |
| `CorrespondenceLanguage` | String | 2 | Correspondence Language | 通信语言 |
| `Customer` | String | 10 | Customer Number | 客户编号 |
| `Supplier` | String | 10 | Supplier Number | 供应商编号 |
| `Industry` | String | 10 | Industry | 行业 |
| `LegalForm` | String | 2 | Legal Form | 法律形式 |
| `SearchTerm1` | String | 20 | Search Term 1 | 搜索词1 |
| `SearchTerm2` | String | 20 | Search Term 2 | 搜索词2 |
| `TaxNumber1` | String | 18 | Tax Number 1 | 税号1 |
| `TaxNumber2` | String | 11 | Tax Number 2 | 税号2 |
| `TaxNumber3` | String | 18 | Tax Number 3 | 税号3 |
| `TaxNumber4` | String | 18 | Tax Number 4 | 税号4 |
| `TaxNumber5` | String | 18 | Tax Number 5 | 税号5 |
| `TaxNumberResponsible` | String | 18 | Responsible Tax Authority | 税务主管机构 |
| `FiscalAddress` | String | 10 | Fiscal Address | 税务地址 |
| `IndustryCode1` | String | 10 | Industry Code 1 | 行业代码1 |
| `IndustryCode2` | String | 10 | Industry Code 2 | 行业代码2 |
| `IndustryCode3` | String | 10 | Industry Code 3 | 行业代码3 |
| `IndustryCode4` | String | 10 | Industry Code 4 | 行业代码4 |
| `IndustryCode5` | String | 10 | Industry Code 5 | 行业代码5 |
| `TradingPartner` | String | 6 | Trading Partner | 贸易伙伴 |
| `VATLiability` | String | 1 | VAT Liability | 增值税义务 |
| `GroupBusinessPartnerName1` | String | 40 | Group Name Line 1 | 组名称 第1行 |
| `GroupBusinessPartnerName2` | String | 40 | Group Name Line 2 | 组名称 第2行 |

### 导航属性 / Navigation Properties

| 属性名 | 目标实体 | 基数 | 描述 |
|--------|----------|------|------|
| `to_BusinessPartnerAddress` | A_BusinessPartnerAddress | 0..* | 业务伙伴地址 |
| `to_BusinessPartnerRole` | A_BusinessPartnerRole | 0..* | 业务伙伴角色 |
| `to_BusinessPartnerBank` | A_BusinessPartnerBank | 0..* | 业务伙伴银行信息 |
| `to_BusinessPartnerContact` | A_BusinessPartnerContact | 0..* | 业务伙伴联系人 |
| `to_BusinessPartnerTax` | A_BusinessPartnerTaxNumber | 0..* | 业务伙伴税号 |
| `to_BusPartAddrDepdntTaxNmbr` | A_BPAddrDepdntTaxNumbers | 0..* | 地址相关税号 |
| `to_BusinessPartnerRating` | A_BusinessPartnerRating | 0..* | 业务伙伴评级 |
| `to_BuPaIdentification` | A_BuPaIdentification | 0..* | 业务伙伴标识 |
| `to_BuPaIndustry` | A_BuPaIndustry | 0..* | 业务伙伴行业 |
| `to_BPRelationship` | A_BusinessPartnerRelationship | 0..* | 业务伙伴关系 |
| `to_Customer` | A_Customer | 0..1 | 客户视图 |
| `to_Supplier` | A_Supplier | 0..1 | 供应商视图 |
| `to_BPDataController` | A_BPDataController | 0..* | 数据控制者 |

---

## 2. A_BusinessPartnerAddress — 业务伙伴地址

**实体集合路径:** `A_BusinessPartnerAddress`  
**主键 (Key):** `BusinessPartner` (CHAR 10), `AddressID` (CHAR 10)  
**ETag:** 支持

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BusinessPartner` | String | 10 | Business Partner Number | 业务伙伴编号 |
| `AddressID` | String | 10 | Address Number | 地址编号 |
| `ValidityStartDate` | DateTime | - | Address Validity Start | 地址有效起始日期 |
| `ValidityEndDate` | DateTime | - | Address Validity End | 地址有效截止日期 |
| `AuthorizationGroup` | String | 4 | Authorization Group | 授权组 |
| `AddressUUID` | GUID | - | Address UUID | 地址UUID |
| `AdditionalStreetPrefixName` | String | 40 | Additional Street Prefix | 附加街道前缀 |
| `AdditionalStreetSuffixName` | String | 40 | Additional Street Suffix | 附加街道后缀 |
| `AddressTimeZone` | String | 6 | Time Zone of Address | 地址时区 |
| `CareOfName` | String | 40 | c/o Name | 代收人名称 |
| `CityCode` | String | 12 | City Code | 城市代码 |
| `CityName` | String | 40 | City | 城市 |
| `CompanyPostalCode` | String | 10 | Company Postal Code | 公司邮政编码 |
| `Country` | String | 3 | Country/Region Key | 国家/地区代码 |
| `County` | String | 40 | County | 县 |
| `CountyCode` | String | 8 | County Code | 县代码 |
| `DeliveryServiceNumber` | String | 10 | Delivery Service No. | 投递服务编号 |
| `DeliveryServiceTypeCode` | String | 4 | Delivery Service Type | 投递服务类型 |
| `District` | String | 40 | District | 区 |
| `FormOfAddress` | String | 4 | Form of Address | 称呼格式 |
| `FullName` | String | 80 | Full Name | 完整名称 |
| `HomeCityName` | String | 40 | Home City | 家乡城市 |
| `HouseNumber` | String | 10 | House Number | 门牌号 |
| `HouseNumberSupplementText` | String | 10 | House Number Supplement | 门牌号补充 |
| `Language` | String | 2 | Language Key | 语言代码 |
| `Person` | String | 10 | Person Number | 人员编号 |
| `POBox` | String | 10 | PO Box | 邮政信箱 |
| `POBoxDeviatingCityName` | String | 40 | PO Box City | 邮政信箱城市 |
| `POBoxDeviatingCountry` | String | 3 | PO Box Country | 邮政信箱国家 |
| `POBoxDeviatingRegion` | String | 3 | PO Box Region | 邮政信箱地区 |
| `POBoxIsWithoutNumber` | Boolean | - | PO Box w/o Number | 无编号邮政信箱 |
| `POBoxLobbyName` | String | 40 | PO Box Lobby | 邮政信箱大厅 |
| `POBoxPostalCode` | String | 10 | PO Box Postal Code | 邮政信箱邮编 |
| `PostalCode` | String | 10 | Postal Code | 邮政编码 |
| `PrfrdCommMediumType` | String | 3 | Preferred Comm. Medium | 首选通信方式 |
| `Region` | String | 3 | Region (State) | 地区/州 |
| `StreetName` | String | 60 | Street | 街道名称 |
| `StreetPrefixName` | String | 40 | Street Prefix | 街道前缀 |
| `StreetSuffixName` | String | 40 | Street Suffix | 街道后缀 |
| `TaxJurisdiction` | String | 15 | Tax Jurisdiction | 税务管辖区 |
| `TownshipCode` | String | 8 | Township Code | 乡镇代码 |
| `TownshipName` | String | 40 | Township | 乡镇名称 |
| `TransportZone` | String | 10 | Transportation Zone | 运输区域 |
| `AddressIDByExternalSystem` | String | 20 | External Address ID | 外部系统地址ID |

### 导航属性 / Navigation Properties

| 属性名 | 目标实体 | 基数 | 描述 |
|--------|----------|------|------|
| `to_AddressUsage` | A_BuPaAddressUsage | 0..* | 地址用途 |
| `to_BPAddrDepdntIntlLocNumber` | A_BPAddrDepdntIntlLocNumber | 0..1 | 国际位置编号 |
| `to_EmailAddress` | A_AddressEmailAddress | 0..* | 电子邮件 |
| `to_FaxNumber` | A_AddressFaxNumber | 0..* | 传真号码 |
| `to_PhoneNumber` | A_AddressPhoneNumber | 0..* | 电话号码 |
| `to_MobilePhoneNumber` | A_AddressPhoneNumber | 0..* | 手机号码 |
| `to_URLAddress` | A_AddressHomePageURL | 0..* | 主页网址 |

---

## 3. A_BusinessPartnerRole — 业务伙伴角色

**实体集合路径:** `A_BusinessPartnerRole`  
**主键 (Key):** `BusinessPartner` (CHAR 10), `BusinessPartnerRole` (CHAR 6)

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BusinessPartner` | String | 10 | Business Partner Number | 业务伙伴编号 |
| `BusinessPartnerRole` | String | 6 | BP Role | 业务伙伴角色编码 |
| `ValidFrom` | DateTime | - | Role Validity Start | 角色有效起始日期 |
| `ValidTo` | DateTime | - | Role Validity End | 角色有效截止日期 |
| `AuthorizationGroup` | String | 4 | Authorization Group | 授权组 |

### 常见角色值 / Common Role Values

| 角色值 | 描述 (EN) | 描述 (CN) |
|--------|-----------|-----------|
| `FLCU01` | Customer | 客户 |
| `FLCU00` | Customer (One-Time) | 一次性客户 |
| `FLVN01` | Supplier | 供应商 |
| `FLVN00` | Supplier (One-Time) | 一次性供应商 |
| `BUP002` | Contact Person | 联系人 |
| `BUP001` | Prospect | 潜在客户 |
| `BUP003` | Employee *(Not Supported)* | 员工 *(不支持)* |
| `BBP010` | Freelancer *(Not Supported)* | 自由职业者 *(不支持)* |

---

## 4. A_BusinessPartnerBank — 业务伙伴银行信息

**实体集合路径:** `A_BusinessPartnerBank`  
**主键 (Key):** `BusinessPartner` (CHAR 10), `BankIdentification` (CHAR 4)

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BusinessPartner` | String | 10 | Business Partner Number | 业务伙伴编号 |
| `BankIdentification` | String | 4 | Bank Details ID | 银行信息ID |
| `BankCountryKey` | String | 3 | Bank Country | 银行国家 |
| `BankNumber` | String | 15 | Bank Key | 银行代码 |
| `BankName` | String | 60 | Bank Name | 银行名称 |
| `BankAccount` | String | 18 | Bank Account Number | 银行账号 |
| `BankAccountName` | String | 40 | Account Name | 账户名称 |
| `BankAccountHolderName` | String | 60 | Account Holder | 账户持有人 |
| `BankAccountReferenceText` | String | 20 | Reference Text | 参考文本 |
| `BankControlKey` | String | 2 | Bank Control Key | 银行控制码 |
| `SWIFTCode` | String | 11 | SWIFT/BIC Code | SWIFT/BIC代码 |
| `IBAN` | String | 34 | IBAN | 国际银行账号 |
| `IBANValidityStartDate` | DateTime | - | IBAN Valid From | IBAN有效起始日期 |
| `ValidityStartDate` | DateTime | - | Validity Start | 有效起始日期 |
| `ValidityEndDate` | DateTime | - | Validity End | 有效截止日期 |
| `CollectionAuthInd` | Boolean | - | Collection Auth. Indicator | 托收授权标识 |
| `CityName` | String | 35 | Bank City | 银行所在城市 |
| `AuthorizationGroup` | String | 4 | Authorization Group | 授权组 |

---

## 5. A_BusinessPartnerContact — 业务伙伴联系人

**实体集合路径:** `A_BusinessPartnerContact`  
**主键 (Key):** `RelationshipNumber` (CHAR 12), `BusinessPartnerCompany` (CHAR 10), `BusinessPartnerPerson` (CHAR 10)

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `RelationshipNumber` | String | 12 | Relationship Number | 关系编号 |
| `BusinessPartnerCompany` | String | 10 | BP Company (Org) | 业务伙伴公司 |
| `BusinessPartnerPerson` | String | 10 | BP Person (Contact) | 业务伙伴联系人 |
| `BusinessPartnerPersonFullName` | String | 81 | Contact Full Name | 联系人全名 |
| `BusinessPartnerCompanyFullName` | String | 81 | Company Full Name | 公司全名 |
| `RelationshipCategory` | String | 6 | Relationship Category | 关系类别 |
| `RelationshipType` | String | 6 | Relationship Type | 关系类型 |
| `ValidityStartDate` | DateTime | - | Relationship Start | 关系有效起始日期 |
| `ValidityEndDate` | DateTime | - | Relationship End | 关系有效截止日期 |
| `DefaultRelationship` | Boolean | - | Default Relationship | 默认关系标识 |
| `AuthorizationGroup` | String | 4 | Authorization Group | 授权组 |
| `ContactPersonDepartment` | String | 40 | Department | 部门 |
| `ContactPersonFunction` | String | 40 | Job Function | 职务 |
| `ContactPersonVIPType` | String | 1 | VIP Type | VIP类型 |
| `ContactPersonEmailAddress` | String | 241 | Email | 联系人邮箱 |
| `ContactPersonTelephoneNumber` | String | 30 | Phone | 联系人电话 |
| `ContactPersonCorrLanguage` | String | 2 | Correspondence Language | 通信语言 |

---

## 6. A_BusinessPartnerTaxNumber — 业务伙伴税号

**实体集合路径:** `A_BusinessPartnerTaxNumber`  
**主键 (Key):** `BusinessPartner` (CHAR 10), `BPTaxType` (CHAR 4)

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BusinessPartner` | String | 10 | Business Partner Number | 业务伙伴编号 |
| `BPTaxType` | String | 4 | Tax Type | 税类型 |
| `BPTaxNumber` | String | 20 | Tax Number | 税号 |
| `BPTaxLongNumber` | String | 60 | Tax Long Number | 长税号 |
| `AuthorizationGroup` | String | 4 | Authorization Group | 授权组 |
| `ValidityStartDate` | DateTime | - | Validity Start | 有效起始日期 |
| `ValidityEndDate` | DateTime | - | Validity End | 有效截止日期 |

---

## 7. A_BusinessPartnerRelationship — 业务伙伴关系

**实体集合路径:** `A_BPRelationship`  
**主键 (Key):** `RelationshipNumber` (CHAR 12), `BusinessPartner1` (CHAR 10), `BusinessPartner2` (CHAR 10), `ValidityStartDate`

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `RelationshipNumber` | String | 12 | Relationship Number | 关系编号 |
| `BusinessPartner1` | String | 10 | BP 1 | 业务伙伴1 |
| `BusinessPartner2` | String | 10 | BP 2 | 业务伙伴2 |
| `ValidityStartDate` | DateTime | - | Valid From | 有效起始日期 |
| `ValidityEndDate` | DateTime | - | Valid To | 有效截止日期 |
| `RelationshipCategory` | String | 6 | Relationship Category | 关系类别 |
| `RelationshipType` | String | 6 | Relationship Type | 关系类型 |
| `IsStandardRelationship` | Boolean | - | Standard Relationship | 标准关系标识 |
| `AuthorizationGroup` | String | 4 | Authorization Group | 授权组 |

---

## 8. A_BuPaIdentification — 业务伙伴标识

**实体集合路径:** `A_BuPaIdentification`  
**主键 (Key):** `BusinessPartner` (CHAR 10), `BPIdentificationType` (CHAR 6)

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BusinessPartner` | String | 10 | Business Partner Number | 业务伙伴编号 |
| `BPIdentificationType` | String | 6 | ID Type | 标识类型 (护照、身份证等) |
| `BPIdentificationNumber` | String | 60 | ID Number | 标识编号 |
| `BPIDNNumber` | String | 60 | ID Number (alt.) | 备选标识编号 |
| `ValidityStartDate` | DateTime | - | ID Valid From | 有效起始日期 |
| `ValidityEndDate` | DateTime | - | ID Valid To | 有效截止日期 |
| `ResponsibleInstitution` | String | 40 | Issuing Institution | 签发机构 |
| `Country` | String | 3 | Issuing Country | 签发国家 |
| `Region` | String | 3 | Issuing Region | 签发地区 |
| `AuthorizationGroup` | String | 4 | Authorization Group | 授权组 |

---

## 9. A_BuPaIndustry — 业务伙伴行业

**实体集合路径:** `A_BuPaIndustry`  
**主键 (Key):** `BusinessPartner` (CHAR 10), `IndustrySector` (CHAR 10), `IndustrySystemType` (CHAR 4)

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BusinessPartner` | String | 10 | Business Partner Number | 业务伙伴编号 |
| `IndustrySector` | String | 10 | Industry Sector | 行业分类 |
| `IndustrySystemType` | String | 4 | Industry System Type | 行业体系类型 |
| `IndustryKey` | String | 17 | Industry Key | 行业代码 |
| `IsStandardIndustry` | Boolean | - | Standard Industry | 标准行业标识 |
| `AuthorizationGroup` | String | 4 | Authorization Group | 授权组 |

---

## 10. A_BusinessPartnerRating — 业务伙伴评级

**实体集合路径:** `A_BusinessPartnerRating`  
**主键 (Key):** `BusinessPartner` (CHAR 10), `BusinessPartnerRatingProcedure` (CHAR 10), `BPValidityStartDate`

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BusinessPartner` | String | 10 | Business Partner Number | 业务伙伴编号 |
| `BusinessPartnerRatingProcedure` | String | 10 | Rating Procedure | 评级程序 |
| `BPValidityStartDate` | DateTime | - | Valid From | 有效起始日期 |
| `BPValidityEndDate` | DateTime | - | Valid To | 有效截止日期 |
| `RatingValue` | String | 10 | Rating Value | 评级值 |
| `RatingGrade` | String | 10 | Rating Grade | 评级等级 |
| `RatingComment` | String | 40 | Comment | 评级备注 |
| `RatingTrend` | String | 1 | Trend | 评级趋势 |

---

## 11. A_BPAddrDepdntIntlLocNumber — 地址相关国际位置编号

**实体集合路径:** `A_BPAddrDepdntIntlLocNumber`  
**主键 (Key):** `BusinessPartner` (CHAR 10), `AddressID` (CHAR 10), `AddrDepdntIntlLocNumber` (CHAR 7)

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BusinessPartner` | String | 10 | Business Partner Number | 业务伙伴编号 |
| `AddressID` | String | 10 | Address Number | 地址编号 |
| `AddrDepdntIntlLocNumber` | String | 7 | Intl Location Number | 国际位置编号 |
| `AddrDepdntIntlLocNumber2` | String | 5 | Intl Location No. 2 | 国际位置编号2 |

---

## 12. A_BPAddrDepdntTaxNumbers — 地址相关税号

**实体集合路径:** `A_BusPartAddrDepdntTaxNmbr`  
**主键 (Key):** `BusinessPartner` (CHAR 10), `AddressID` (CHAR 10), `BPTaxType` (CHAR 4)

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BusinessPartner` | String | 10 | Business Partner Number | 业务伙伴编号 |
| `AddressID` | String | 10 | Address Number | 地址编号 |
| `BPTaxType` | String | 4 | Tax Type | 税类型 |
| `BPTaxNumber` | String | 20 | Tax Number | 税号 |
| `BPTaxLongNumber` | String | 60 | Tax Long Number | 长税号 |
| `AuthorizationGroup` | String | 4 | Authorization Group | 授权组 |

---

## 13. A_BusinessPartnerIsBank — 业务伙伴银行标识

**实体集合路径:** `A_BusinessPartnerIsBank`  
**主键 (Key):** `BusinessPartner` (CHAR 10)

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BusinessPartner` | String | 10 | BP Number | 业务伙伴编号 |
| `BankCategory` | String | 15 | Bank Category | 银行类别 |
| `BankNationalID` | String | 30 | Bank National ID | 银行国家ID |

---

## 14. A_AddressEmailAddress — 电子邮件地址

**实体集合路径:** `A_AddressEmailAddress`  
**主键 (Key):** `BusinessPartner`, `AddressID`, `Person`, `OrdinalNumber`

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BusinessPartner` | String | 10 | BP Number | 业务伙伴编号 |
| `AddressID` | String | 10 | Address Number | 地址编号 |
| `Person` | String | 10 | Person Number | 人员编号 |
| `OrdinalNumber` | String | 3 | Ordinal Number | 序号 |
| `EmailAddress` | String | 241 | Email Address | 电子邮件地址 |
| `IsDefaultEmailAddress` | Boolean | - | Default Email Flag | 默认邮箱标识 |
| `EmailAddressUsageType` | String | 1 | Usage Type | 使用类型 |
| `AuthorizationGroup` | String | 4 | Authorization Group | 授权组 |

---

## 15. A_AddressFaxNumber — 传真号码

**实体集合路径:** `A_AddressFaxNumber`  
**主键 (Key):** `BusinessPartner`, `AddressID`, `Person`, `OrdinalNumber`

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BusinessPartner` | String | 10 | BP Number | 业务伙伴编号 |
| `AddressID` | String | 10 | Address Number | 地址编号 |
| `Person` | String | 10 | Person Number | 人员编号 |
| `OrdinalNumber` | String | 3 | Ordinal Number | 序号 |
| `FaxNumber` | String | 30 | Fax Number | 传真号码 |
| `IsDefaultFaxNumber` | Boolean | - | Default Fax Flag | 默认传真标识 |
| `FaxNumberUsageType` | String | 1 | Usage Type | 使用类型 |
| `AuthorizationGroup` | String | 4 | Authorization Group | 授权组 |

---

## 16. A_AddressPhoneNumber — 电话号码

**实体集合路径:** `A_AddressPhoneNumber`  
**主键 (Key):** `BusinessPartner`, `AddressID`, `Person`, `OrdinalNumber`

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BusinessPartner` | String | 10 | BP Number | 业务伙伴编号 |
| `AddressID` | String | 10 | Address Number | 地址编号 |
| `Person` | String | 10 | Person Number | 人员编号 |
| `OrdinalNumber` | String | 3 | Ordinal Number | 序号 |
| `PhoneNumber` | String | 30 | Phone Number | 电话号码 |
| `IsDefaultPhoneNumber` | Boolean | - | Default Phone Flag | 默认电话标识 |
| `PhoneNumberUsageType` | String | 1 | Usage Type | 使用类型 |
| `PhoneNumberType` | String | 1 | Phone Type (1=Office, 2=Home, 3=Mobile) | 电话类型 |
| `CountryCodeForPhoneNumber` | String | 3 | Country Code | 国家代码 |
| `Extension` | String | 10 | Extension | 分机号 |
| `AuthorizationGroup` | String | 4 | Authorization Group | 授权组 |

---

## 17. A_AddressHomePageURL — 主页网址

**实体集合路径:** `A_AddressHomePageURL`  
**主键 (Key):** `BusinessPartner`, `AddressID`, `Person`, `OrdinalNumber`

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `BusinessPartner` | String | 10 | BP Number | 业务伙伴编号 |
| `AddressID` | String | 10 | Address Number | 地址编号 |
| `Person` | String | 10 | Person Number | 人员编号 |
| `OrdinalNumber` | String | 3 | Ordinal Number | 序号 |
| `HomePageURLAddress` | String | 2048 | URL Address | 主页网址 |
| `IsDefaultURLAddress` | Boolean | - | Default URL Flag | 默认网址标识 |
| `URLAddressUsageType` | String | 1 | Usage Type | 使用类型 |
| `AuthorizationGroup` | String | 4 | Authorization Group | 授权组 |

---

## CRUD 端点 / CRUD Endpoints

所有实体的 CRUD 端点遵循 OData V2 约定。以下以 `A_BusinessPartner` 为例：

### 创建 (Create) — POST

```
POST /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner
Content-Type: application/json
```

### 读取 (Read) — GET

```
GET /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner(BusinessPartner='12345')
GET /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner?$filter=...&$expand=...
```

### 更新 (Update) — PATCH

```
PATCH /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner(BusinessPartner='12345')
Content-Type: application/json
```

### 替换 (Replace) — PUT

```
PUT /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner(BusinessPartner='12345')
Content-Type: application/json
```

### 删除 (Delete) — DELETE

```
DELETE /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner(BusinessPartner='12345')
```

### 各实体端点路径速查表

| 实体 | 端点路径 |
|------|---------|
| A_BusinessPartner | `A_BusinessPartner` |
| A_BusinessPartnerAddress | `A_BusinessPartnerAddress` |
| A_BusinessPartnerRole | `A_BusinessPartnerRole` |
| A_BusinessPartnerBank | `A_BusinessPartnerBank` |
| A_BusinessPartnerContact | `A_BusinessPartnerContact` |
| A_BusinessPartnerRating | `A_BusinessPartnerRating` |
| A_BusinessPartnerTaxNumber | `A_BusinessPartnerTaxNumber` |
| A_BusinessPartnerRelationship | `A_BPRelationship` |
| A_BPAddrDepdntIntlLocNumber | `A_BPAddrDepdntIntlLocNumber` |
| A_BPAddrDepdntTaxNumbers | `A_BusPartAddrDepdntTaxNmbr` |
| A_BusinessPartnerIsBank | `A_BusinessPartnerIsBank` |
| A_BuPaIdentification | `A_BuPaIdentification` |
| A_BuPaIndustry | `A_BuPaIndustry` |
| A_AddressEmailAddress | `A_AddressEmailAddress` |
| A_AddressFaxNumber | `A_AddressFaxNumber` |
| A_AddressPhoneNumber | `A_AddressPhoneNumber` |
| A_AddressHomePageURL | `A_AddressHomePageURL` |

---

## 深插入 (Deep Insert) — 一次性创建业务伙伴及子对象

API_BUSINESS_PARTNER 支持通过单次 POST 携带导航属性创建业务伙伴及其关联子对象。

### 深插入示例: 创建业务伙伴 + 地址 + 角色 + 银行信息

```json
POST /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner
Content-Type: application/json

{
  "BusinessPartnerCategory": "2",
  "OrganizationBPName1": "ABC Technology Ltd",
  "BusinessPartnerGrouping": "BP01",
  "SearchTerm1": "ABC TECH",
  "to_BusinessPartnerRole": [
    { "BusinessPartnerRole": "FLCU01" },
    { "BusinessPartnerRole": "FLVN01" }
  ],
  "to_BusinessPartnerAddress": [
    {
      "Country": "CN",
      "CityName": "Shanghai",
      "PostalCode": "200120",
      "StreetName": "Pudong Avenue",
      "HouseNumber": "100",
      "Language": "ZH",
      "to_EmailAddress": [
        {
          "EmailAddress": "contact@abctech.cn",
          "IsDefaultEmailAddress": true
        }
      ],
      "to_PhoneNumber": [
        {
          "PhoneNumber": "+86-21-12345678",
          "PhoneNumberType": "1",
          "IsDefaultPhoneNumber": true
        }
      ]
    }
  ],
  "to_BusinessPartnerBank": [
    {
      "BankCountryKey": "CN",
      "BankNumber": "123456789",
      "BankAccount": "9876543210",
      "BankName": "Bank of China",
      "SWIFTCode": "BKCHCNBJ"
    }
  ]
}
```

### 深插入支持的关系

| 导航属性 | 目标实体 | 说明 |
|----------|----------|------|
| `to_BusinessPartnerAddress` | A_BusinessPartnerAddress | 业务伙伴地址 (及其子通信数据) |
| `to_BusinessPartnerRole` | A_BusinessPartnerRole | 业务伙伴角色 |
| `to_BusinessPartnerBank` | A_BusinessPartnerBank | 银行信息 |
| `to_BuPaIdentification` | A_BuPaIdentification | 标识信息 |
| `to_BusinessPartnerContact` | A_BusinessPartnerContact | 联系人 |
| `to_Customer` | A_Customer | 客户视图 (及公司/销售区域) |
| `to_Supplier` | A_Supplier | 供应商视图 (及公司/采购组织) |

---

## 导航属性关系总表 / Navigation Property Matrix

| 源实体 | 导航属性 | 目标实体 | 基数 |
|--------|----------|----------|------|
| A_BusinessPartner | `to_BusinessPartnerAddress` | A_BusinessPartnerAddress | 0..* |
| A_BusinessPartner | `to_BusinessPartnerRole` | A_BusinessPartnerRole | 0..* |
| A_BusinessPartner | `to_BusinessPartnerBank` | A_BusinessPartnerBank | 0..* |
| A_BusinessPartner | `to_BusinessPartnerContact` | A_BusinessPartnerContact | 0..* |
| A_BusinessPartner | `to_BusinessPartnerTax` | A_BusinessPartnerTaxNumber | 0..* |
| A_BusinessPartner | `to_BusPartAddrDepdntTaxNmbr` | A_BPAddrDepdntTaxNumbers | 0..* |
| A_BusinessPartner | `to_BusinessPartnerRating` | A_BusinessPartnerRating | 0..* |
| A_BusinessPartner | `to_BuPaIdentification` | A_BuPaIdentification | 0..* |
| A_BusinessPartner | `to_BuPaIndustry` | A_BuPaIndustry | 0..* |
| A_BusinessPartner | `to_BPRelationship` | A_BusinessPartnerRelationship | 0..* |
| A_BusinessPartner | `to_Customer` | A_Customer | 0..1 |
| A_BusinessPartner | `to_Supplier` | A_Supplier | 0..1 |
| A_BusinessPartner | `to_BPDataController` | A_BPDataController | 0..* |
| A_BusinessPartnerAddress | `to_AddressUsage` | A_BuPaAddressUsage | 0..* |
| A_BusinessPartnerAddress | `to_BPAddrDepdntIntlLocNumber` | A_BPAddrDepdntIntlLocNumber | 0..1 |
| A_BusinessPartnerAddress | `to_EmailAddress` | A_AddressEmailAddress | 0..* |
| A_BusinessPartnerAddress | `to_FaxNumber` | A_AddressFaxNumber | 0..* |
| A_BusinessPartnerAddress | `to_PhoneNumber` | A_AddressPhoneNumber | 0..* |
| A_BusinessPartnerAddress | `to_MobilePhoneNumber` | A_AddressPhoneNumber | 0..* |
| A_BusinessPartnerAddress | `to_URLAddress` | A_AddressHomePageURL | 0..* |

---

## OData 查询选项 / Query Options

| 参数 | 示例 | 说明 |
|------|------|------|
| `$filter` | `$filter=BusinessPartnerCategory eq '2'` | 过滤 |
| `$select` | `$select=BusinessPartner,OrganizationBPName1` | 选择字段 |
| `$expand` | `$expand=to_BusinessPartnerAddress,to_BusinessPartnerRole` | 展开导航属性 |
| `$top` | `$top=100` | 返回前 N 条 |
| `$skip` | `$skip=50` | 跳过前 N 条 |
| `$orderby` | `$orderby=BusinessPartner desc` | 排序 |
| `$count` | `$count=true` | 返回计数 |
| `$inlinecount` | `$inlinecount=allpages` | 内联计数 (OData V2) |

### $expand 示例

```http
GET /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('12345')?$expand=to_BusinessPartnerAddress,to_BusinessPartnerRole,to_BusinessPartnerBank,to_BuPaIdentification
```

### 多层展开

```http
GET /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('12345')?$expand=to_BusinessPartnerAddress/to_EmailAddress,to_BusinessPartnerAddress/to_PhoneNumber
```

---

## ETag 处理 / ETag Handling

API_BUSINESS_PARTNER 通过 ETag 支持乐观锁并发控制。

### 读取时获取 ETag

```http
GET /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('12345')
```
响应头将包含 `ETag: W/"datetime'2026-07-23T14%3A17%3A02'"`。

### 更新时携带 ETag (If-Match)

```http
PATCH /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('12345')
If-Match: W/"datetime'2026-07-23T14%3A17%3A02'"
Content-Type: application/json

{ "OrganizationBPName1": "Updated Name" }
```

### 强制更新 (忽略 ETag)

```http
PATCH /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('12345')
If-Match: *
Content-Type: application/json

{ "OrganizationBPName1": "Updated Name" }
```

---

## 批处理 / Batch Processing

批处理通过在单个 HTTP 请求中组合多个 CRUD 操作，减少网络开销。

### 批处理端点

```
POST /sap/opu/odata/sap/API_BUSINESS_PARTNER/$batch
Content-Type: multipart/mixed; boundary=batch_123
```

### 批处理示例 (创建 + 读取 + 更新)

```http
--batch_123
Content-Type: application/http
Content-Transfer-Encoding: binary

POST A_BusinessPartner HTTP/1.1
Content-Type: application/json

{ "BusinessPartnerCategory": "2", "OrganizationBPName1": "New BP" }

--batch_123
Content-Type: application/http
Content-Transfer-Encoding: binary

GET A_BusinessPartner('12345')?$select=BusinessPartner,OrganizationBPName1 HTTP/1.1

--batch_123
Content-Type: application/http
Content-Transfer-Encoding: binary

PATCH A_BusinessPartner('12345') HTTP/1.1
If-Match: *
Content-Type: application/json

{ "OrganizationBPName1": "Updated via Batch" }

--batch_123--
```

### 变更集 (Change Sets) — 原子性操作

```http
--batch_123
Content-Type: multipart/mixed; boundary=changeset_456

--changeset_456
Content-Type: application/http
Content-Transfer-Encoding: binary

POST A_BusinessPartner HTTP/1.1
Content-Type: application/json

{ "BusinessPartnerCategory": "2", "OrganizationBPName1": "BP in Batch" }

--changeset_456
Content-Type: application/http
Content-Transfer-Encoding: binary

POST A_BusinessPartner HTTP/1.1
Content-Type: application/json

{ "BusinessPartnerCategory": "1", "OrganizationBPName1": "Another BP" }

--changeset_456--
--batch_123--
```

---

## 认证 / Authentication

### OAuth 2.0 (推荐)

```
Authorization: Bearer <access_token>
Content-Type: application/json
```

SAP S/4HANA Cloud 通常使用 OAuth 2.0 客户端凭证流。

### 基本认证 (Basic Auth)

```
Authorization: Basic <base64(username:password)>
```

用于 Service User / Communication User 场景。

### CSRF Token 处理

SAP 要求写操作必须携带有效的 CSRF Token：

```http
# 步骤 1: 获取 CSRF Token
GET /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner
X-CSRF-Token: Fetch

# 响应: X-CSRF-Token: <token_value>

# 步骤 2: 使用 Token 执行写操作
POST /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner
X-CSRF-Token: <token_value>
Content-Type: application/json
Cookie: SAP-SESSIONID=<session_id>
```

---

## 错误码 / Error Codes

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

---

## 可扩展性 / Extensibility

通过 SAP Fiori "Custom Fields and Logic" 应用添加自定义字段：

| 实体 | 业务上下文 |
|------|-----------|
| A_BusinessPartner | Business Partner Core View |
| A_Customer | Customer Core View |
| A_CustomerCompany | Customer company code core |
| A_CustomerSalesArea | Customer Sales Core |
| A_Supplier | Supplier Core View |
| A_SupplierCompany | Supplier Company Code Core |
| A_SupplierPurchasingOrg | Supplier Purchasing Org Core |

自定义字段以 `YY1_<FieldName>_<Context>` 格式返回。

---

## 服务限制 / Constraints

通过此 API **无法** 执行以下操作：

1. 维护具有非零分化类型值的关系类别
2. 维护员工 Employee (`BUP003`) 和自由职业者 (`BBP010`) 角色
3. 维护 HTML 帮助文档
4. 维护 SaaS 及身份认证相关信息

---

## 相关资源 / References

| 资源 | 链接 |
|------|------|
| SAP API Business Hub | [https://api.sap.com/api/API_BUSINESS_PARTNER/overview](https://api.sap.com/api/API_BUSINESS_PARTNER/overview) |
| SAP Help Portal (Cloud) | [https://help.sap.com/docs/SAP_S4HANA_CLOUD/3c916ef10fc240c9afc594b346ffaf77/85043858ea0f9244e10000000a4450e5.html](https://help.sap.com/docs/SAP_S4HANA_CLOUD/3c916ef10fc240c9afc594b346ffaf77/85043858ea0f9244e10000000a4450e5.html) |
| SAP Help Portal (On-Prem) | [https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/44e06f22436c43e582db6ccd5250e29b/85043858ea0f9244e10000000a4450e5.html](https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/44e06f22436c43e582db6ccd5250e29b/85043858ea0f9244e10000000a4450e5.html) |
| SAP Cloud SDK Java VDM | [https://javadoc.io/static/com.sap.cloud.sdk.s4hana/s4hana-api-odata/4.5.0](https://javadoc.io/static/com.sap.cloud.sdk.s4hana/s4hana-api-odata/4.5.0) |
| SAP Cloud SDK JavaScript | [https://sap.github.io/cloud-sdk/docs/js/features/odata/v2-client](https://sap.github.io/cloud-sdk/docs/js/features/odata/v2-client) |
| SAP Cloud SDK Java | [https://sap.github.io/cloud-sdk/docs/java/features/odata/v4-vdm-client](https://sap.github.io/cloud-sdk/docs/java/features/odata/v4-vdm-client) |
| OpenAPI Spec (YAML) | [https://github.com/SAP-samples/manage-apis-codejam/blob/main/exercises/01-open-api-specification/assets/API_BUSINESS_PARTNER.yaml](https://github.com/SAP-samples/manage-apis-codejam/blob/main/exercises/01-open-api-specification/assets/API_BUSINESS_PARTNER.yaml) |
| PHP SDK (Community) | [https://github.com/be-lenka/sap_business-partner](https://github.com/be-lenka/sap_business-partner) |
| SAP KBA 3569467 | [https://userapps.support.sap.com/sap/support/knowledge/en/3569467](https://userapps.support.sap.com/sap/support/knowledge/en/3569467) |
| Deep Payload Guide | [https://community.sap.com/t5/enterprise-resource-planning-blog-posts-by-sap/how-to-prepare-a-deep-payload-for-business-partner-master-data-api-business/ba-p/14278616](https://community.sap.com/t5/enterprise-resource-planning-blog-posts-by-sap/how-to-prepare-a-deep-payload-for-business-partner-master-data-api-business/ba-p/14278616) |
