---
# API: Product Availability Info Service / 产品可用性信息服务
# File: CE_API_PRODUCT_AVAILY_INFO_0001.md
# Version: 1.6.0
# Status: ACTIVE
# Protocol: OData V4
# Source URL: https://api.sap.com/api/CE_API_PRODUCT_AVAILY_INFO_0001/overview
# Generated: 2026-07-23 14:17:02
---

# Product Availability Info Service / 产品可用性信息服务 API

> **API 版本:** 1.6.0 | **状态:** ACTIVE | **协议:** OData V4  
> **技术名称:** `CE_API_PRODUCT_AVAILY_INFO_0001`  
> **服务根路径:** `/sap/opu/odata4/sap/ce_api_product_availy_info/srvd_a2x/sap/productavailabilityinfo/0001/`  
> **SAP 通信场景:** `SAP_COM_0172`

## 概述 / Overview

该服务允许外部系统查询产品的可用性情况，例如在网店浏览产品目录时显示库存可用性。该服务提供全时间序列的产品可用性快照，支持 MRP 区域、库存地点、批次和段级别。该服务为只读查询，不会创建预留或锁定。

You can use this OData V4 service in external systems to display the availability of products, for example, in a web shop while browsing through the product catalog. It provides a full time series for availability at MRP Area, Storage Location, Batch, and Segment levels. This is a read-only availability check that does not create reservations or locks.

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

---

## 功能导入 / Function Imports

该服务不提供标准的 CRUD 实体端点，而是通过 Function Import 提供产品可用性检查。

| # | 功能名称 | 描述 (EN) | 描述 (CN) |
|---|----------|-----------|-----------|
| 1 | `GetProductAvailabilityInfo` | Get Product Availability Information | 获取产品可用性信息 |

---

## GetProductAvailabilityInfo — 获取产品可用性信息

该 Function Import 通过 POST 请求调用，输入产品、工厂等参数，返回可用性数据。

### 请求端点

```
POST /sap/opu/odata4/sap/ce_api_product_availy_info/srvd_a2x/sap/productavailabilityinfo/0001/GetProductAvailabilityInfo
Content-Type: application/json
```

### 输入参数 / Input Parameters

| 参数名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `Product` | String | 40 | Product Number | 产品编号 |
| `Plant` | String | 4 | Plant | 工厂 |
| `BusinessPartner` | String | 10 | Business Partner | 业务伙伴 |
| `StorageLocation` | String | 4 | Storage Location | 库存地点 |
| `Batch` | String | 10 | Batch Number | 批次号 |
| `MRPArea` | String | 10 | MRP Area | MRP 区域 |
| `ATPCheckingRule` | String | 1 | ATP Checking Rule | ATP 检查规则 |
| `RequestedQuantity` | Decimal | - | Requested Quantity | 请求数量 |
| `RequestedQuantityUnit` | String | 3 | Requested Quantity Unit | 请求数量单位 |
| `RequestedDate` | DateTimeOffset | - | Requested Date | 请求日期 |

### 可选特性参数 / Optional Characteristics (Supply Protection)

可通过 `_Characteristics` 数组传递分销渠道、国家等特性值，用于供应保护匹配：

```json
"_Characteristics": [
  {
    "CharcCatalogCharacteristicName": "SD-DISTRIBUTIONCHANNEL",
    "CharcCatalogCharcValue": "10"
  },
  {
    "CharcCatalogCharacteristicName": "SD_PAR_ADR_PF.WE-COUNTRY",
    "CharcCatalogCharcValue": "DE"
  }
]
```

### 输出字段 / Output Fields

| 字段名 | 类型 | 描述 (EN) | 描述 (CN) |
|--------|------|-----------|-----------|
| `Material` | String | Product Number | 产品编号 |
| `Plant` | String | Plant | 工厂 |
| `StorageLocation` | String | Storage Location | 库存地点 |
| `Batch` | String | Batch | 批次 |
| `MRPArea` | String | MRP Area | MRP 区域 |
| `AvailableQuantity` | Decimal | Available Quantity | 可用数量 |
| `BaseUnit` | String | Base Unit of Measure | 基本计量单位 |
| `AvailabilityDate` | Date | Availability Date | 可用日期 |
| `AvailabilityDateTime` | DateTimeOffset | Availability Date/Time | 可用日期时间 |
| `ConfirmedQuantity` | Decimal | Confirmed Quantity | 已确认数量 |
| `ConfirmedQuantityUnit` | String | Confirmed Quantity Unit | 已确认数量单位 |
| `ConfirmationDate` | Date | Confirmation Date | 确认日期 |
| `ConfirmationDateTime` | DateTimeOffset | Confirmation Date/Time | 确认日期时间 |
| `ATPCheckingRule` | String | ATP Checking Rule | ATP 检查规则 |
| `AvailabilityStatus` | String | Availability Status | 可用性状态 |
| `AvailabilityTimeSeries` | Collection | Time Series of Availability | 可用性时间序列 |

### 可用性时间序列 / Availability Time Series

`AvailabilityTimeSeries` 包含以下字段：

| 字段名 | 类型 | 描述 (EN) | 描述 (CN) |
|--------|------|-----------|-----------|
| `Date` | Date | Date | 日期 |
| `AvailableQuantity` | Decimal | Available Qty on this Date | 该日可用数量 |
| `BaseUnit` | String | Base Unit | 基本单位 |
| `StockQuantity` | Decimal | Stock Qty | 库存数量 |
| `ReceiptQuantity` | Decimal | Receipt Qty | 入库数量 |
| `IssueQuantity` | Decimal | Issue Qty | 出库数量 |

### 请求示例 / Request Example

```json
POST /sap/opu/odata4/sap/ce_api_product_availy_info/srvd_a2x/sap/productavailabilityinfo/0001/GetProductAvailabilityInfo
Content-Type: application/json

{
  "Product": "TG11",
  "Plant": "1000",
  "StorageLocation": "0001",
  "RequestedQuantity": 100,
  "RequestedQuantityUnit": "PCE",
  "ATPCheckingRule": "A",
  "RequestedDate": "2026-08-15"
}
```

### 使用供应保护特性

```json
{
  "Product": "PAC_INFO_API_DEMO_004",
  "MRPArea": "0001",
  "ATPCheckingRule": "A",
  "_Characteristics": [
    {
      "CharcCatalogCharacteristicName": "SD-DISTRIBUTIONCHANNEL",
      "CharcCatalogCharcValue": "ECom"
    },
    {
      "CharcCatalogCharacteristicName": "SD_PAR_ADR_PF.WE-COUNTRY",
      "CharcCatalogCharcValue": "DE"
    }
  ]
}
```

---

## 可用性级别 / Availability Levels

该服务支持以下级别的可用性查询：

- **MRP 区域级别** — Product Availability on MRP Area Level
- **库存地点级别** — Product Availability on Storage Location Level
- **批次级别** — Product Availability on Batch Level
- **段级别 (供应保护)** — Product Availability on Segment Level (Supply Protection)

---

## 与 Advanced ATP Check 的区别 / Difference from Advanced ATP Check

| 特性 | Product Availability Info | Advanced ATP Check |
|------|--------------------------|-------------------|
| 目的 | "How much is available?" | "How much could I get?" |
| 预留 | 不创建预留 | 可以创建临时预留 |
| 产品分配 | 不考虑 | 考虑 |
| 供应保护 | 通过特性匹配 | 通过特性匹配 |
| 多次调用结果 | 相同 | 不同(消耗后) |

---

## 相关资源 / References

| 资源 | 链接 |
|------|------|
| SAP API Business Hub | [https://api.sap.com/api/CE_API_PRODUCT_AVAILY_INFO_0001/overview](https://api.sap.com/api/CE_API_PRODUCT_AVAILY_INFO_0001/overview) |
| SAP Help Portal | [https://help.sap.com/docs/SAP_S4HANA_CLOUD/c9c5fac64898472bb1bdacceb773206d.html](https://help.sap.com/docs/SAP_S4HANA_CLOUD/c9c5fac64898472bb1bdacceb773206d.html) |
| SAP Community Blog | [https://community.sap.com/t5/enterprise-resource-planning-blog-posts-by-sap/two-apis-to-retrieve-availability-information/ba-p/13576755](https://community.sap.com/t5/enterprise-resource-planning-blog-posts-by-sap/two-apis-to-retrieve-availability-information/ba-p/13576755) |
| SAP Cloud SDK Java | [https://javadoc.io/static/com.sap.cloud.sdk.s4hana/s4hana-api-odata-onpremise/4.24.0/](https://javadoc.io/static/com.sap.cloud.sdk.s4hana/s4hana-api-odata-onpremise/4.24.0/) |
