# CO_KEY_MAP_RPLCTCO

**SOAP v1.0.0 — ACTIVE**

## Title / 标题
**Key Mapping - Receive Confirmation from Client / 接收客户端的密钥映射确认**

## Operation / 操作
`KeyMappingReplicationConfirmation_In`

---

## Description / 描述
This service receives key mapping replication status from client systems, confirming the mapping of business partner identifiers, product numbers, and other master data objects between source and target systems.

该服务从客户端系统接收密钥映射复制状态，确认源系统和目标系统之间的业务伙伴标识符、产品编号和其他主数据对象的映射。

---

## Endpoint / 端点
| Environment | URL |
|-------------|-----|
| Production | `https://sap.example.com/sap/bc/srt/rfc/sap/CO_KEY_MAP_RPLCTCO` |
| Test | `https://sap-test.example.com/sap/bc/srt/rfc/sap/CO_KEY_MAP_RPLCTCO` |

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `KeyMappingReplicationConfirmation` | `KEY_MAP_CONF` | Key mapping confirmation root | 密钥映射确认根节点 |
| `?MessageHeader` | `MSG_HEADER` | Message header metadata | 消息头元数据 |
| `??MessageID` | `UUID` | Unique message identifier | 唯一消息标识符 |
| `??CreationDateTime` | `DATETIME` | Message creation timestamp | 消息创建时间戳 |
| `??SenderID` | `CHAR(60)` | Sender system ID | 发送方系统ID |
| `??ReceiverID` | `CHAR(60)` | Receiver system ID | 接收方系统ID |
| `KeyMappingEntries` | Table | Key mapping entry details | 密钥映射条目详情 |
| `?ObjectTypeCode` | `CHAR(10)` | Object type (e.g. BP, PRODUCT) | 对象类型（如BP、PRODUCT） |
| `?SourceSystemID` | `CHAR(60)` | Source system identifier | 源系统标识符 |
| `?SourceObjectID` | `CHAR(60)` | Source system object ID | 源系统对象ID |
| `?TargetSystemID` | `CHAR(60)` | Target system identifier | 目标系统标识符 |
| `?TargetObjectID` | `CHAR(60)` | Target system object ID | 目标系统对象ID |
| `?MappingStatus` | `CHAR(2)` | Mapping status (00=success, 01=error) | 映射状态（00=成功，01=错误） |
| `?StatusCode` | `CHAR(20)` | Status code from target | 目标返回的状态码 |
| `?StatusMessage` | `CHAR(200)` | Status description | 状态描述 |
| `?ProcessingDate` | `DATE` | Processing date | 处理日期 |

### Response / 响应
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `Return` | `BAPIRETURN` | Processing result | 处理结果 |
| `?Type` | `CHAR(1)` | Message type (S/E/W/I) | 消息类型（成功/错误/警告/信息） |
| `?Code` | `CHAR(20)` | Message code | 消息代码 |
| `?Message` | `CHAR(220)` | Message text | 消息文本 |
| `?LogID` | `CHAR(32)` | Application log ID | 应用程序日志ID |

---

## Example Payload / 示例负载

### Request
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <KeyMappingReplicationConfirmation_In>
      <KeyMappingReplicationConfirmation>
        <MessageHeader>
          <MessageID>550e8400-e29b-41d4-a716-446655440000</MessageID>
          <CreationDateTime>2026-07-24T08:30:00Z</CreationDateTime>
          <SenderID>SAP_ERP_001</SenderID>
          <ReceiverID>SAP_S4_002</ReceiverID>
        </MessageHeader>
        <KeyMappingEntries>
          <item>
            <ObjectTypeCode>BP</ObjectTypeCode>
            <SourceSystemID>ERP_001</SourceSystemID>
            <SourceObjectID>BP100001</SourceObjectID>
            <TargetSystemID>S4_002</TargetSystemID>
            <TargetObjectID>BP200001</TargetObjectID>
            <MappingStatus>00</MappingStatus>
            <ProcessingDate>2026-07-24</ProcessingDate>
          </item>
          <item>
            <ObjectTypeCode>PRODUCT</ObjectTypeCode>
            <SourceSystemID>ERP_001</SourceSystemID>
            <SourceObjectID>MAT_A001</SourceObjectID>
            <TargetSystemID>S4_002</TargetSystemID>
            <TargetObjectID>MAT_B001</TargetObjectID>
            <MappingStatus>01</MappingStatus>
            <StatusCode>ERR_001</StatusCode>
            <StatusMessage>Product not found in target system</StatusMessage>
            <ProcessingDate>2026-07-24</ProcessingDate>
          </item>
        </KeyMappingEntries>
      </KeyMappingReplicationConfirmation>
    </KeyMappingReplicationConfirmation_In>
  </soap:Body>
</soap:Envelope>
```

### Response
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <KeyMappingReplicationConfirmation_InResponse>
      <Return>
        <Type>S</Type>
        <Code>KM_000</Code>
        <Message>Key mapping confirmation processed successfully / 密钥映射确认已成功处理</Message>
      </Return>
    </KeyMappingReplicationConfirmation_InResponse>
  </soap:Body>
</soap:Envelope>
```

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `KM_001` | Invalid object type code | 无效的对象类型代码 |
| `KM_002` | Source system not registered | 源系统未注册 |
| `KM_003` | Target object ID already exists | 目标对象ID已存在 |
| `KM_004` | Mapping entry already exists | 映射条目已存在 |
| `KM_005` | Processing date is invalid | 处理日期无效 |

---

## Notes / 备注
- The service is asynchronous; confirmation is processed in the background / 该服务为异步方式，确认信息在后台处理
- Key mapping is automatically created when confirmation messages are processed / 处理确认消息时自动创建密钥映射
- Object types include BP (Business Partner), PRODUCT (Material), and GL_ACCOUNT / 对象类型包括BP（业务伙伴）、PRODUCT（物料）和GL_ACCOUNT
- Configure communication scenario SAP_COM_0009 for this service / 为该服务配置通信场景SAP_COM_0009
