# CO_NGC_SOAP_CLASSBULKREPREQOUT

**SOAP v1.0.0 — ACTIVE**

## Title / 标题
**Class Bulk Replication Request / 分类批量复制请求**

## Operation / 操作
`ClassBulkReplicationRequest`

---

## Description / 描述
This service enables bulk replication of classification data (classes, characteristics, and values) from external systems into SAP S/4HANA Cloud.

该服务支持将分类数据（类别、特征和值）从外部系统批量复制到 SAP S/4HANA Cloud。

---

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

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `ClassBulkReplication` | `BAPICLASSBULK` | Class bulk replication header | 分类批量复制抬头 |
| `?ClassType` | `CHAR(3)` | Class type (e.g. 001, 023) | 类别类型（如 001、023） |
| `?ClassNum` | `CHAR(18)` | Class number | 类别编号 |
| `?ChangeNumber` | `CHAR(12)` | Change number | 更改编号 |
| `?ValidityDate` | `DATE` | Validity start date | 有效期起始日期 |
| `Characteristics` | Table | List of characteristics to replicate | 待复制的特征列表 |
| `?CharName` | `CHAR(30)` | Characteristic name | 特征名称 |
| `?CharValue` | `CHAR(40)` | Characteristic value | 特征值 |
| `?ValueDesc` | `CHAR(40)` | Value description | 值描述 |
| `?Unit` | `UNIT(3)` | Unit of measure | 计量单位 |
| `KeyDate` | `DATE` | Key date for validity | 有效性的关键日期 |
| `ReplicationMode` | `CHAR(1)` | Replication mode (I=insert, U=update, D=delete) | 复制模式（I=插入，U=更新，D=删除） |

### Response / 响应
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `Return` | `BAPIRETURN` | Application log message | 应用程序日志消息 |
| `?Type` | `CHAR(1)` | Message type (S/E/W/I) | 消息类型（成功/错误/警告/信息） |
| `?Code` | `CHAR(20)` | Message code | 消息代码 |
| `?Message` | `CHAR(220)` | Message text | 消息文本 |
| `?LogNo` | `CHAR(20)` | Application log number | 应用程序日志编号 |
| `ProcessedCount` | `INT` | Number of classes processed | 已处理的类别数量 |

---

## Example Payload / 示例负载

### Request
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ClassBulkReplicationRequest>
      <ClassBulkReplication>
        <ClassType>001</ClassType>
        <ClassNum>MATERIAL_GROUP_A</ClassNum>
        <ChangeNumber>CHG000001</ChangeNumber>
        <ValidityDate>2026-07-23</ValidityDate>
        <ReplicationMode>I</ReplicationMode>
      </ClassBulkReplication>
      <Characteristics>
        <item>
          <CharName>COLOR</CharName>
          <CharValue>RED</CharValue>
          <ValueDesc>Red Color / 红色</ValueDesc>
        </item>
        <item>
          <CharName>WEIGHT</CharName>
          <CharValue>10.5</CharValue>
          <Unit>KG</Unit>
        </item>
      </Characteristics>
    </ClassBulkReplicationRequest>
  </soap:Body>
</soap:Envelope>
```

### Response
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ClassBulkReplicationRequestResponse>
      <Return>
        <Type>S</Type>
        <Code>CLS_001</Code>
        <Message>Classes replicated successfully / 类别已成功复制</Message>
      </Return>
      <ProcessedCount>1</ProcessedCount>
    </ClassBulkReplicationRequestResponse>
  </soap:Body>
</soap:Envelope>
```

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `CLS_001` | Class type not found | 类别类型未找到 |
| `CLS_002` | Invalid characteristic value | 无效的特征值 |
| `CLS_003` | Class number already exists | 类别编号已存在 |
| `CLS_004` | Replication mode not supported | 不支持的复制模式 |

---

## Notes / 备注
- Maximum 100 characteristic entries per class / 每个类别最多 100 个特征条目
- All classes in a single request share the same validity date / 单个请求中的所有类别共享相同的有效期
- Replication mode "D" (delete) removes the entire class and all its characteristics / 复制模式 "D"（删除）将移除整个类别及其所有特征