---
# API: Key Mapping - Replicate to Client
# File: KEYMAPPINGBULKREPLICATEREQUEST.md
# Version: 1.0.0
# Status: ACTIVE
# Protocol: SOAP (Synchronous/Asynchronous)
# Source URL: https://api.sap.com/api/KEYMAPPINGBULKREPLICATEREQUEST/overview
# Generated: 2026-07-23 14:17:02
---

# Key Mapping - Replicate to Client / 键映射 - 复制到客户端

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

## 概述 / Overview

该服务用于批量复制键映射（Key Mapping）到目标客户端。支持键映射的源系统、目标系统、源ID、目标ID等关键字段的传输。

This service is used to replicate key mappings in bulk to the target client. It supports transmission of key fields such as SourceSystem, TargetSystem, SourceID, TargetID, etc.

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

---

## 消息结构 / Message Structure

| # | 结构名称 | 描述 (EN) | 描述 (CN) |
|---|----------|-----------|-----------|
| 1 | `KeyMappingRequest` | Key Mapping Replicate Request | 键映射复制请求 |
| 2 | `KeyMappingResponse` | Key Mapping Replicate Response | 键映射复制响应 |

---

## 1. 请求结构: KeyMappingRequest / 键映射复制请求

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

```
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:ns="urn:sap-com:document:sap:soap:functions:mc-style">
  <soap:Header/>
  <soap:Body>
    <ns:KeyMappingBulkReplicate>
      <KeyMappings>
        <item>
          <SourceSystem>ERP_CLNT090</SourceSystem>
          <TargetSystem>SCM_CLNT100</TargetSystem>
          <SourceID>MAT_000123</SourceID>
          <TargetID>MAT_000456</TargetID>
          <MappingType>EQUIVALENCE</MappingType>
          <ValidFrom>2026-01-01</ValidFrom>
          <ValidTo>9999-12-31</ValidTo>
        </item>
      </KeyMappings>
    </ns:KeyMappingBulkReplicate>
  </soap:Body>
</soap:Envelope>
```

## 2. 响应结构: KeyMappingResponse / 键映射复制响应

```
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:ns="urn:sap-com:document:sap:soap:functions:mc-style">
  <soap:Header/>
  <soap:Body>
    <ns:KeyMappingBulkReplicateResponse>
      <Success>true</Success>
      <Message>Key mappings replicated successfully</Message>
    </ns:KeyMappingBulkReplicateResponse>
  </soap:Body>
</soap:Envelope>
```

---

## 字段详细说明 / Field Details

### KeyMapping 键映射字段

| 字段 | 类型 | 描述 (EN) | 描述 (CN) | 备注 |
|------|------|-----------|-----------|------|
| `SourceSystem` | STRING | Source System | 源系统 | 字符长度: 10 |
| `TargetSystem` | STRING | Target System | 目标系统 | 字符长度: 10 |
| `SourceID` | STRING | Source Identifier | 源标识 | 字符长度: 60 |
| `TargetID` | STRING | Target Identifier | 目标标识 | 字符长度: 60 |
| `MappingType` | STRING | Mapping Type | 映射类型 | 例如: EQUIVALENCE |
| `ValidFrom` | DATE | Valid From Date | 有效起始日期 | 格式: YYYY-MM-DD |
| `ValidTo` | DATE | Valid To Date | 有效截止日期 | 格式: YYYY-MM-DD |

---

## 错误处理 / Error Handling

| HTTP状态码 | 错误代码 | 描述 (EN) | 描述 (CN) |
|-----------|----------|-----------|-----------|
| 400 | `INVALID_MAPPING` | Invalid key mapping data | 无效的键映射数据 |
| 500 | `REPLICATION_FAILED` | Key mapping replication failed | 键映射复制失败 |

---

## 使用示例 / Usage Examples

### PowerShell 调用示例

```powershell
$body = "<soap:Envelope xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:ns=""urn:sap-com:document:sap:soap:functions:mc-style""><soap:Header/><soap:Body><ns:KeyMappingBulkReplicate><KeyMappings><item><SourceSystem>ERP_CLNT090</SourceSystem><TargetSystem>SCM_CLNT100</TargetSystem><SourceID>MAT_000123</SourceID><TargetID>MAT_000456</TargetID></item></KeyMappings></ns:KeyMappingBulkReplicate></soap:Body></soap:Envelope>"

$response = Invoke-WebRequest -Uri "https://your-sap-system.com/sap/bc/srt/rfc/sap/keymappingbulkreplicate/100/keymappingbulkreplicate/binding" -Method Post -Body $body -ContentType "text/xml; charset=utf-8"
$response.Content
```

---

## 相关资源 / Related Resources

- SAP API Business Hub: [Key Mapping](https://api.sap.com/api/KEYMAPPINGBULKREPLICATEREQUEST/overview)
- SAP Communication Scenario: SAP_COM_0276
