---
# API: Material Stock - Replicate
# File: CO_MMIM_MATSTOCK_REPLICATION.md
# Version: 1.0.0
# Status: ACTIVE
# Protocol: SOAP (Asynchronous)
# Source URL: https://api.sap.com/api/CO_MMIM_MATSTOCK_REPLICATION/overview
# Generated: 2026-07-23 14:17:02
---

# Material Stock - Replicate / 物料库存复制 API

> **API 版本:** 1.0.0 | **状态:** ACTIVE (Asynchronous) | **协议:** SOAP
> **技术名称:** `CO_MMIM_MATSTOCK_REPLICATION`
> **WSDL 绑定:** `/sap/bc/srt/wsdl/flv_10002A111AD1/bndr_url/sap/bc/srt/rfc/sap/co_mmim_matstock_replication/100/co_mmim_matstock_replication/binding`
> **SAP 通信场景:** `SAP_COM_0119`

## 概述 / Overview

该 SOAP 出站服务用于将物料库存数据从源系统复制到目标系统。支持工厂级别和存储地点级别的库存数据传输。

This outbound SOAP service replicates material stock data from source to target systems. Supports plant-level and storage location-level stock data transfer.

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

---

## 消息结构 / Message Structure

| # | 结构名称 | 描述 (EN) | 描述 (CN) |
|---|----------|-----------|-----------|
| 1 | `MaterialStockReplicationRequest` | Material Stock Replication Request | 物料库存复制请求 |
| 2 | `MaterialStockReplicationResponse` | Material Stock Replication Response | 物料库存复制响应 |

---

## 1. 请求结构: MaterialStockReplicationRequest / 物料库存复制请求

**命名空间:** `urn:sap-com:document:sap:soap:functions:mc-style`

### 1.1 工厂库存 / Plant Stock

**结构名称:** `MaterialStockReplicationRequest.PlantStock`

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `MaterialNumber` | String | 40 | Material Number | 物料编号 |
| `Plant` | String | 4 | Plant | 工厂 |
| `MaterialYear` | String | 4 | Material Year | 物料年度 |
| `ValuationType` | String | 10 | Valuation Type | 评估类型 |
| `ValuationArea` | String | 4 | Valuation Area | 评估范围 |
| `TotalStock` | Decimal | 15 | Total Stock Quantity | 总库存数量 |
| `BaseUnitOfMeasure` | String | 3 | Base Unit of Measure | 基本计量单位 |
| `TotalValue` | Decimal | 15 | Total Stock Value | 总库存价值 |
| `Currency` | String | 5 | Currency | 货币 |
| `MovementType` | String | 3 | Movement Type | 移动类型 |
| `PostingDate` | DateTime | - | Posting Date | 过账日期 |

### 1.2 存储地点库存 / Storage Location Stock

**结构名称:** `MaterialStockReplicationRequest.StorageLocationStock`

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `MaterialNumber` | String | 40 | Material Number | 物料编号 |
| `Plant` | String | 4 | Plant | 工厂 |
| `StorageLocation` | String | 4 | Storage Location | 存储地点 |
| `BatchNumber` | String | 10 | Batch Number | 批次号 |
| `StockQuantity` | Decimal | 15 | Stock Quantity | 库存数量 |
| `BaseUnitOfMeasure` | String | 3 | Base Unit of Measure | 基本计量单位 |
| `StockCategory` | String | 1 | Stock Category | 库存类别 |
| `StockType` | String | 1 | Stock Type | 库存类型 |
| `ValuatedStock` | Decimal | 15 | Valuated Stock Quantity | 评估库存数量 |
| `BlockedStock` | Decimal | 15 | Blocked Stock Quantity | 冻结库存数量 |
| `QualityInspectionStock` | Decimal | 15 | Quality Inspection Stock | 质检库存数量 |
| `UnrestrictedStock` | Decimal | 15 | Unrestricted Stock | 非限制使用库存 |
| `StockValue` | Decimal | 15 | Stock Value | 库存价值 |

### 1.3 批次库存 / Batch Stock

**结构名称:** `MaterialStockReplicationRequest.BatchStock`

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `MaterialNumber` | String | 40 | Material Number | 物料编号 |
| `Plant` | String | 4 | Plant | 工厂 |
| `StorageLocation` | String | 4 | Storage Location | 存储地点 |
| `BatchNumber` | String | 10 | Batch Number | 批次号 |
| `StockQuantity` | Decimal | 15 | Stock Quantity | 库存数量 |
| `BaseUnitOfMeasure` | String | 3 | Base Unit of Measure | 基本计量单位 |
| `ManufactureDate` | DateTime | - | Manufacture Date | 生产日期 |
| `ExpirationDate` | DateTime | - | Expiration Date | 过期日期 |

---

## 2. 响应结构: MaterialStockReplicationResponse / 物料库存复制响应

**命名空间:** `urn:sap-com:document:sap:soap:functions:mc-style`

### 2.1 返回信息 / Return Information

**结构名称:** `MaterialStockReplicationResponse.Return`

| 字段名 | 类型 | 长度 | 描述 (EN) | 描述 (CN) |
|--------|------|------|-----------|-----------|
| `Type` | String | 1 | Message Type (S/E/W/I) | 消息类型 (S/E/W/I) |
| `ID` | String | 20 | Message ID | 消息ID |
| `Number` | String | 3 | Message Number | 消息编号 |
| `Message` | String | 220 | Message Text | 消息文本 |
| `System` | String | 10 | Logical System | 逻辑系统 |

---

## 3. XML 请求示例 / XML Request Example

```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <MaterialStockReplicationRequest xmlns="urn:sap-com:document:sap:soap:functions:mc-style">
      <PlantStock>
        <MaterialNumber>MAT-10001</MaterialNumber>
        <Plant>1000</Plant>
        <TotalStock>12500</TotalStock>
        <BaseUnitOfMeasure>EA</BaseUnitOfMeasure>
        <TotalValue>625000</TotalValue>
        <Currency>CNY</Currency>
        <PostingDate>2026-07-23</PostingDate>
      </PlantStock>
      <StorageLocationStock>
        <MaterialNumber>MAT-10001</MaterialNumber>
        <Plant>1000</Plant>
        <StorageLocation>0001</StorageLocation>
        <UnrestrictedStock>10000</UnrestrictedStock>
        <QualityInspectionStock>1500</QualityInspectionStock>
        <BlockedStock>1000</BlockedStock>
        <BaseUnitOfMeasure>EA</BaseUnitOfMeasure>
      </StorageLocationStock>
      <StorageLocationStock>
        <MaterialNumber>MAT-10001</MaterialNumber>
        <Plant>1000</Plant>
        <StorageLocation>0002</StorageLocation>
        <UnrestrictedStock>2500</UnrestrictedStock>
        <BaseUnitOfMeasure>EA</BaseUnitOfMeasure>
      </StorageLocationStock>
    </MaterialStockReplicationRequest>
  </soap:Body>
</soap:Envelope>
```

---

## 4. XML 响应示例 / XML Response Example

```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <MaterialStockReplicationResponse xmlns="urn:sap-com:document:sap:soap:functions:mc-style">
      <Return>
        <Type>S</Type>
        <ID>MM</ID>
        <Number>001</Number>
        <Message>Material stock for MAT-10001 replicated successfully</Message>
      </Return>
    </MaterialStockReplicationResponse>
  </soap:Body>
</soap:Envelope>
```
