---
# API: Service Contract (A2X) / 服务合同 API
# File: CE_SERVICECONTRACT_0001.md
# Version: 1.10.2
# Status: ACTIVE
# Protocol: OData V4
# Source URL: https://api.sap.com/api/CE_SERVICECONTRACT_0001/overview
# Generated: 2026-07-23 14:17:02
---

# Service Contract (A2X) / 服务合同 API

> **API 版本:** 1.10.2 | **状态:** ACTIVE | **协议:** OData V4  
> **技术名称:** `CE_SERVICECONTRACT_0001`  
> **服务根路径:** `/sap/opu/odata4/sap/ce_servicecontract/srvd_a2x/sap/servicecontract/0001/`  
> **SAP 通信场景:** `SAP_COM_0111`

## 概述 / Overview

该服务允许外部系统对服务合同执行创建、读取、更新操作，以及删除行项目。支持深插入（Deep Insert）创建合同及行项目。

This synchronous inbound OData V4 service enables you to integrate external applications with service contract processing. You can use it to create, read, and update service contracts and items, as well as delete items.

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

---

## 实体列表 / Entity List

| # | 实体名称 | 描述 (EN) | 描述 (CN) | 主键 |
|---|----------|-----------|-----------|------|
| 1 | `A_ServiceContract` | Service Contract Header | 服务合同抬头 | `ServiceContract` |
| 2 | `A_ServiceContractItem` | Service Contract Item | 服务合同行项目 | `ServiceContract`, `ServiceContractItem` |

---

## 1. A_ServiceContract — 服务合同抬头

**实体集合路径:** `A_ServiceContract`  
**主键 (Key):** `ServiceContract` (STRING 10)  
**ETag:** 支持

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `ServiceContract` | String | 10 | Service Contract | 服务合同编号 (主键) |
| `ServiceContractType` | String | 4 | Service Contract Type | 服务合同类型 |
| `SalesOrganization` | String | 4 | Sales Organization | 销售组织 |
| `DistributionChannel` | String | 2 | Distribution Channel | 分销渠道 |
| `OrganizationDivision` | String | 2 | Division | 产品组 |
| `SoldToParty` | String | 10 | Sold-to Party | 售达方 |
| `BillToParty` | String | 10 | Bill-to Party | 收票方 |
| `PayerParty` | String | 10 | Payer | 付款方 |
| `ShipToParty` | String | 10 | Ship-to Party | 收货方 |
| `SalesOffice` | String | 4 | Sales Office | 销售办公室 |
| `SalesGroup` | String | 3 | Sales Group | 销售组 |
| `SalesDistrict` | String | 6 | Sales District | 销售地区 |
| `CreatedByUser` | String | 12 | Created By | 创建人 |
| `CreationDate` | DateTimeOffset | - | Created On | 创建日期 |
| `CreationTime` | Time | - | Created At | 创建时间 |
| `LastChangeDateTime` | DateTimeOffset | - | Last Changed On | 最后更改日期 |
| `LastChangedByUser` | String | 12 | Last Changed By | 最后更改人 |
| `PurchaseOrderByCustomer` | String | 35 | Customer Purchase Order Number | 客户采购订单号 |
| `CustomerPurchaseOrderDate` | DateTimeOffset | - | Customer Purchase Order Date | 客户采购订单日期 |
| `ServiceContractDate` | Date | - | Contract Date | 合同日期 |
| `RequestedStartDate` | Date | - | Requested Start Date | 请求开始日期 |
| `RequestedEndDate` | Date | - | Requested End Date | 请求结束日期 |
| `ContractValidityStartDate` | Date | - | Contract Validity Start | 合同有效起始日期 |
| `ContractValidityEndDate` | Date | - | Contract Validity End | 合同有效截止日期 |
| `BillingDocumentDate` | Date | - | Billing Date | 开票日期 |
| `PricingDate` | Date | - | Pricing Date | 定价日期 |
| `NetAmount` | Decimal | - | Net Value | 净额 |
| `TaxAmount` | Decimal | - | Tax Amount | 税额 |
| `GrossAmount` | Decimal | - | Gross Amount | 总金额 |
| `TransactionCurrency` | String | 5 | SD Document Currency | 凭证货币 |
| `ShippingCondition` | String | 2 | Shipping Condition | 发运条件 |
| `CompleteDeliveryIsDefined` | Boolean | - | Complete Delivery Defined | 完整交货标识 |
| `ShippingType` | String | 2 | Shipping Type | 发运类型 |
| `ReceivingPoint` | String | 2 | Receiving Point | 收货点 |
| `IncotermsClassification` | String | 3 | Incoterms (Part 1) | 国际贸易条款 |
| `IncotermsLocation1` | String | 70 | Incoterms Location 1 | 国际贸易条款地点1 |
| `IncotermsLocation2` | String | 70 | Incoterms Location 2 | 国际贸易条款地点2 |
| `CustomerPaymentTerms` | String | 4 | Payment Terms | 客户付款条件 |
| `PaymentMethod` | String | 1 | Payment Method | 付款方式 |
| `BillingCompanyCode` | String | 4 | Billing Company Code | 开票公司代码 |
| `CustomerGroup` | String | 2 | Customer Group | 客户组 |
| `AssignmentReference` | String | 18 | Assignment Number | 分配编号 |
| `ReferenceSDDocument` | String | 10 | Reference SD Document | 参考销售凭证 |
| `SDDocumentReason` | String | 3 | Order Reason | 订单原因 |
| `BillingBlockReason` | String | 2 | Billing Block | 开票冻结原因 |
| `DeliveryBlockReason` | String | 2 | Delivery Block | 交货冻结原因 |
| `OverallSDProcessStatus` | String | 2 | Overall Processing Status | 总体处理状态 |
| `OverallDeliveryStatus` | String | 1 | Overall Delivery Status | 总体交货状态 |
| `OverallBillingStatus` | String | 1 | Overall Billing Status | 总体开票状态 |
| `OverallSDDocReferenceStatus` | String | 1 | Reference Status | 参考状态 |
| `BillingDocCombinationMethod` | String | 1 | Billing Doc Combination Method | 开票凭证合并方式 |
| `AccountingDocExternalReference` | String | 50 | External Reference | 外部会计凭证参考 |
| `CustomerAccountAssignmentGroup` | String | 2 | Account Assignment Group | 客户科目分配组 |
| `SalesDistrict` | String | 6 | Sales District | 销售区域 |

### 导航属性 / Navigation Properties

| 属性名 | 目标实体 | 基数 | 描述 |
|--------|----------|------|------|
| `_Item` | A_ServiceContractItem | 0..* | 服务合同行项目 |
| `_Text` | (Text entity) | 0..* | 服务合同文本 |

---

## 2. A_ServiceContractItem — 服务合同行项目

**实体集合路径:** `A_ServiceContractItem`  
**主键 (Key):** `ServiceContract` (STRING 10), `ServiceContractItem` (STRING 6)

### 字段列表 / Field List

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `ServiceContract` | String | 10 | Service Contract | 服务合同编号 |
| `ServiceContractItem` | String | 6 | Service Contract Item | 行项目编号 |
| `ServiceContractItemCategory` | String | 4 | Item Category | 项目类别 |
| `ServiceContractItemText` | String | 40 | Short Text | 行项目短文本 |
| `Product` | String | 40 | Product Number | 产品编号 |
| `ProductGroup` | String | 9 | Product Group | 产品组 |
| `MaterialByCustomer` | String | 35 | Customer Material Number | 客户物料编号 |
| `InternationalArticleNumber` | String | 18 | EAN/UPC | 国际商品编码 |
| `PurchaseOrderByCustomer` | String | 35 | Customer PO Number | 客户采购订单号 |
| `RequestedQuantity` | Decimal | - | Requested Quantity | 请求数量 |
| `RequestedQuantityUnit` | String | 3 | Requested Quantity Unit | 请求数量单位 |
| `ConfirmedQuantity` | Decimal | - | Confirmed Quantity | 已确认数量 |
| `OrderQuantityUnit` | String | 3 | Order Quantity Unit | 订单数量单位 |
| `NetAmount` | Decimal | - | Net Value | 净额 |
| `TaxAmount` | Decimal | - | Tax Amount | 税额 |
| `TransactionCurrency` | String | 5 | Currency | 凭证货币 |
| `NetPriceAmount` | Decimal | - | Net Price | 净价 |
| `NetPriceQuantity` | Decimal | - | Net Price Quantity | 净价数量 |
| `NetPricePriceUnit` | String | 3 | Price Unit | 价格单位 |
| `Plant` | String | 4 | Plant | 工厂 |
| `StorageLocation` | String | 4 | Storage Location | 库存地点 |
| `ShippingPoint` | String | 4 | Shipping Point | 发运点 |
| `Route` | String | 6 | Route | 路线 |
| `Batch` | String | 10 | Batch Number | 批次号 |
| `ProfitCenter` | String | 10 | Profit Center | 利润中心 |
| `BusinessArea` | String | 4 | Business Area | 业务范围 |
| `MaterialPricingGroup` | String | 2 | Material Pricing Group | 物料定价组 |
| `CustomerPriceGroup` | String | 2 | Customer Price Group | 客户价格组 |
| `PriceListType` | String | 2 | Price List Type | 价格清单类型 |
| `CustomerPaymentTerms` | String | 4 | Payment Terms | 付款条件 |
| `RequestedStartDate` | Date | - | Requested Start Date | 请求开始日期 |
| `RequestedEndDate` | Date | - | Requested End Date | 请求结束日期 |
| `ContractItemValidityStartDate` | Date | - | Item Validity Start | 行项目有效起始日期 |
| `ContractItemValidityEndDate` | Date | - | Item Validity End | 行项目有效截止日期 |
| `PricingDate` | Date | - | Pricing Date | 定价日期 |
| `BillingDocumentDate` | Date | - | Billing Date | 开票日期 |
| `ServicesRenderedDate` | Date | - | Services Rendered Date | 服务提供日期 |
| `IncotermsClassification` | String | 3 | Incoterms | 国际贸易条款 |
| `IncotermsLocation1` | String | 70 | Incoterms Location 1 | 国际贸易条款地点1 |
| `IncotermsLocation2` | String | 70 | Incoterms Location 2 | 国际贸易条款地点2 |
| `ItemBillingBlockReason` | String | 2 | Billing Block (Item) | 行项目开票冻结原因 |
| `SalesDocumentRjcnReason` | String | 2 | Rejection Reason | 拒绝原因 |
| `SDProcessStatus` | String | 2 | Item Processing Status | 行项目处理状态 |
| `DeliveryStatus` | String | 1 | Delivery Status | 交货状态 |
| `BillingStatus` | String | 1 | Billing Status | 开票状态 |
| `ItemGeneralIncompletionStatus` | String | 1 | Incompletion Status | 不完整状态 |
| `DeliveryBlockStatus` | String | 1 | Delivery Block Status | 交货冻结状态 |

### 导航属性 / Navigation Properties

| 属性名 | 目标实体 | 基数 | 描述 |
|--------|----------|------|------|
| `_ServiceContract` | A_ServiceContract | 0..1 | 服务合同抬头 |

---

## CRUD 端点 / CRUD Endpoints

### 创建 (Create) — POST

```
POST /sap/opu/odata4/sap/ce_servicecontract/srvd_a2x/sap/servicecontract/0001/A_ServiceContract
Content-Type: application/json
```

### 读取 (Read) — GET

```
GET /sap/opu/odata4/sap/ce_servicecontract/srvd_a2x/sap/servicecontract/0001/A_ServiceContract(ServiceContract='12345')
```

### 更新 (Update) — PATCH

```
PATCH /sap/opu/odata4/sap/ce_servicecontract/srvd_a2x/sap/servicecontract/0001/A_ServiceContract(ServiceContract='12345')
Content-Type: application/json
```

### 删除行项目 — DELETE

```
DELETE /sap/opu/odata4/sap/ce_servicecontract/srvd_a2x/sap/servicecontract/0001/A_ServiceContractItem(ServiceContract='12345',ServiceContractItem='10')
```

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

| 实体 | 端点路径 |
|------|---------|
| A_ServiceContract | `A_ServiceContract` |
| A_ServiceContractItem | `A_ServiceContractItem` |

---

## 深插入 (Deep Insert) 示例

```json
POST /sap/opu/odata4/sap/ce_servicecontract/srvd_a2x/sap/servicecontract/0001/A_ServiceContract
Content-Type: application/json

{
  "ServiceContractType": "SRVC",
  "SalesOrganization": "1000",
  "DistributionChannel": "10",
  "OrganizationDivision": "00",
  "SoldToParty": "10100001",
  "BillToParty": "10100001",
  "PayerParty": "10100003",
  "ShipToParty": "10100002",
  "RequestedStartDate": "2026-08-01",
  "RequestedEndDate": "2027-07-31",
  "ContractValidityStartDate": "2026-08-01",
  "ContractValidityEndDate": "2027-07-31",
  "_Item": [
    {
      "Product": "SVC_PKG_01",
      "ServiceContractItemCategory": "TAX",
      "RequestedQuantity": 12,
      "RequestedQuantityUnit": "MON"
    }
  ]
}
```

---

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

| 源实体 | 导航属性 | 目标实体 | 基数 |
|--------|----------|----------|------|
| A_ServiceContract | `_Item` | A_ServiceContractItem | 0..* |
| A_ServiceContractItem | `_ServiceContract` | A_ServiceContract | 0..1 |

---

## 相关资源 / References

| 资源 | 链接 |
|------|------|
| SAP API Business Hub | [https://api.sap.com/api/CE_SERVICECONTRACT_0001/overview](https://api.sap.com/api/CE_SERVICECONTRACT_0001/overview) |
| SAP Help Portal | [https://help.sap.com/docs/SAP_S4HANA_CLOUD/6d57d4ab71e5408581e2018320a0ce49/2b28a57bd81242539cdd222d49447902.html](https://help.sap.com/docs/SAP_S4HANA_CLOUD/6d57d4ab71e5408581e2018320a0ce49/2b28a57bd81242539cdd222d49447902.html) |
| 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) |
