# CO_LOG_MDR_ACCT_ASS_CATEGORY

**SOAP v1.0.0 — ACTIVE**

## Title / 标题
**Account Assignment Categories – Replicate / 科目分配类别 – 复制**

## Operation / 操作
`AccountAssignmentCategoryBulkReplicateRequest`

---

## Description / 描述
Transfers account assignment categories from an SAP S/4HANA Cloud system to an external system using this asynchronous outbound service.

使用此异步出站服务，将科目分配类别从 SAP S/4HANA Cloud 系统传输到外部系统。

---

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

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `AccountAssignmentCategory` | Table | List of account assignment categories | 科目分配类别列表 |
| `?Category` | `CHAR(2)` | Account assignment category (e.g. K, M, P) | 科目分配类别（如 K、M、P） |
| `?Description` | `CHAR(40)` | Category description text | 类别描述文本 |
| `?Language` | `LANG(2)` | Language key (e.g. EN, ZH) | 语言代码（如 EN、ZH） |

### Response / 响应
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `Return` | `BAPIRETURN` | Replication result status | 复制结果状态 |
| `?Type` | `CHAR(1)` | Message type (S/E/W/I) | 消息类型（成功/错误/警告/信息） |
| `?Message` | `CHAR(220)` | Status message text | 状态消息文本 |
| `?LogMsgNo` | `NUMC(6)` | Message sequence number | 消息序号 |

---

## Example Payload / 示例负载

### Request
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <AccountAssignmentCategoryBulkReplicateRequest>
      <AccountAssignmentCategory>
        <item>
          <Category>K</Category>
          <Description>Cost Center / 成本中心</Description>
          <Language>EN</Language>
        </item>
        <item>
          <Category>M</Category>
          <Description>Order / 订单</Description>
          <Language>EN</Language>
        </item>
        <item>
          <Category>P</Category>
          <Description>Project / 项目</Description>
          <Language>EN</Language>
        </item>
        <item>
          <Category>F</Category>
          <Description>Asset / 资产</Description>
          <Language>EN</Language>
        </item>
      </AccountAssignmentCategory>
    </AccountAssignmentCategoryBulkReplicateRequest>
  </soap:Body>
</soap:Envelope>
```

### Response
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <AccountAssignmentCategoryBulkReplicateResponse>
      <Return>
        <Type>S</Type>
        <Message>Data replicated successfully / 数据复制成功</Message>
        <LogMsgNo>000001</LogMsgNo>
      </Return>
    </AccountAssignmentCategoryBulkReplicateResponse>
  </soap:Body>
</soap:Envelope>
```

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `AAC_001` | Invalid account assignment category | 无效的科目分配类别 |
| `AAC_002` | Missing category description | 缺少类别描述 |
| `AAC_003` | Language key not maintained | 未维护语言代码 |
| `AAC_004` | Replication system not configured | 未配置复制系统 |

---

## Notes / 备注
- This is an asynchronous outbound service / 这是一个异步出站服务
- Categories are replicated in bulk; max 1000 records per call / 类别批量复制，每次调用最多 1000 条记录
- Supported categories: K (Cost Center), M (Order), P (Project), F (Asset), S (Sales Order), A (Network) / 支持的类别：K（成本中心）、M（订单）、P（项目）、F（资产）、S（销售订单）、A（网络）