# CO_SDSLS_ESR_SO_BULK_CONF_O_V2

**SOAP v1.0.0 —ACTIVE**

## Title / 标题
**Sales Order - Confirm Processing in Bulk (A2A) / 销售订单 - 批量确认处理**

## Operation / 操作
`SalesOrderBulkConfirmation`

---

## Description / 描述
Send back automatic confirmations for the processing of sales orders with this asynchronous outbound SOAP service. Enables bulk confirmation of multiple sales orders from SAP S/4HANA Cloud to external systems.

通过此异步出站 SOAP 服务批量发送销售订单处理的自动确认。支持将多个销售订单的处理确认从 SAP S/4HANA Cloud 批量发送到外部系统。

---

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

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `SalesOrderBulkConfirmation` | `BULK_CONF` | Bulk confirmation header | 批量确认抬头 |
| `?SenderID` | `CHAR(60)` | Sender system ID | 发送方系统标识 |
| `?ReceiverID` | `CHAR(60)` | Receiver system ID | 接收方系统标识 |
| `?TransactionID` | `CHAR(35)` | Transaction ID for tracking | 跟踪用交易标识 |
| `ConfirmationItems` | Table | List of sales order confirmations | 销售订单确认列表 |
| `?SalesOrder` | `CHAR(10)` | Sales order number | 销售订单号 |
| `?SalesOrderType` | `CHAR(4)` | Sales order type | 销售订单类型 |
| `?SalesOrganization` | `CHAR(4)` | Sales organization | 销售组织 |
| `?DistributionChannel` | `CHAR(2)` | Distribution channel | 分销渠道 |
| `?Division` | `CHAR(2)` | Division | 部门 |
| `?SoldToParty` | `CHAR(10)` | Sold-to party | 售达方 |
| `?PurchaseOrderByCustomer` | `CHAR(35)` | Customer purchase order number | 客户采购订单号 |
| `?DocumentDate` | `DATE` | Document date | 凭证日期 |
| `?TotalNetAmount` | `DECIMAL` | Total net amount | 总净额 |
| `?DocumentCurrency` | `CUKY(5)` | Document currency | 凭证货币 |
| `?OverallStatus` | `CHAR(1)` | Processing status (C=Completed, E=Error) | 处理状态（C=已完成、E=错误） |
| `?ProcessingTimestamp` | `CHAR(16)` | Processing timestamp (YYYYMMDDHHMMSS) | 处理时间戳（YYYYMMDDHHMMSS） |
| `OrderItems` | Table | Sales order items | 销售订单行项目 |
| `?ItemNumber` | `NUM(6)` | Item number | 行项目号 |
| `?Material` | `CHAR(40)` | Material number | 物料编码 |
| `?ConfirmedQuantity` | `QUAN` | Confirmed quantity | 已确认数量 |
| `?BaseUnit` | `UNIT(3)` | Base unit of measure | 基本计量单位 |
| `?ItemStatus` | `CHAR(1)` | Item confirmation status | 行项目确认状态 |
| `?ItemMessage` | `CHAR(220)` | Item-level message | 行项目级消息 |

### Response / 响应
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `Return` | `BAPIRETURN` | Application log message | 应用程序日志消息 |
| `?Type` | `CHAR(1)` | Message type (S/E/W/I) | 消息类型（成功/错误/警告/信息） |
| `?Message` | `CHAR(220)` | Message text | 消息文本 |
| `?LogNo` | `CHAR(20)` | Log number | 日志编号 |

---

## Example Payload / 示例负载

### Request
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SalesOrderBulkConfirmation>
      <SalesOrderBulkConfirmation>
        <SenderID>S4HANA_100</SenderID>
        <ReceiverID>EXT_ERP_001</ReceiverID>
        <TransactionID>TRX-20260723-001</TransactionID>
      </SalesOrderBulkConfirmation>
      <ConfirmationItems>
        <item>
          <SalesOrder>10000001</SalesOrder>
          <SalesOrderType>OR</SalesOrderType>
          <SalesOrganization>1000</SalesOrganization>
          <SoldToParty>0001001000</SoldToParty>
          <PurchaseOrderByCustomer>PO-2026-001</PurchaseOrderByCustomer>
          <DocumentDate>2026-07-23</DocumentDate>
          <TotalNetAmount>150000.00</TotalNetAmount>
          <DocumentCurrency>CNY</DocumentCurrency>
          <OverallStatus>C</OverallStatus>
          <ProcessingTimestamp>20260723120000</ProcessingTimestamp>
          <OrderItems>
            <item>
              <ItemNumber>10</ItemNumber>
              <Material>FG-001</Material>
              <ConfirmedQuantity>100.000</ConfirmedQuantity>
              <BaseUnit>PC</BaseUnit>
              <ItemStatus>C</ItemStatus>
            </item>
          </OrderItems>
        </item>
        <item>
          <SalesOrder>10000002</SalesOrder>
          <SalesOrderType>OR</SalesOrderType>
          <SalesOrganization>1000</SalesOrganization>
          <SoldToParty>0001001002</SoldToParty>
          <PurchaseOrderByCustomer>PO-2026-002</PurchaseOrderByCustomer>
          <DocumentDate>2026-07-23</DocumentDate>
          <TotalNetAmount>50000.00</TotalNetAmount>
          <DocumentCurrency>CNY</DocumentCurrency>
          <OverallStatus>C</OverallStatus>
          <ProcessingTimestamp>20260723120100</ProcessingTimestamp>
          <OrderItems>
            <item>
              <ItemNumber>10</ItemNumber>
              <Material>FG-002</Material>
              <ConfirmedQuantity>25.000</ConfirmedQuantity>
              <BaseUnit>PC</BaseUnit>
              <ItemStatus>C</ItemStatus>
            </item>
          </OrderItems>
        </item>
      </ConfirmationItems>
    </SalesOrderBulkConfirmation>
  </soap:Body>
</soap:Envelope>
```

### Response
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SalesOrderBulkConfirmationResponse>
      <Return>
        <Type>S</Type>
        <Message>Bulk confirmation processed - 2 orders confirmed / 批量确认已处理 - 已确认 2 个订单</Message>
      </Return>
    </SalesOrderBulkConfirmationResponse>
  </soap:Body>
</soap:Envelope>
```

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `SBC_001` | Invalid transaction ID | 无效的交易标识 |
| `SBC_002` | Duplicate confirmation for sales order | 销售订单重复确认 |
| `SBC_003` | Sales order not found | 未找到销售订单 |
| `SBC_004` | Maximum batch size exceeded (max 1000) | 超出最大批处理大小（最多 1000） |
| `SBC_005` | Invalid item confirmation data | 无效的行项目确认数据 |

---

## Notes / 备注
- This is an asynchronous outbound service (version 2) / 此为异步出站服务（版本 2）
- Supports up to 1000 sales orders per bulk request / 每个批量请求最多支持 1000 个销售订单
- Each sales order can contain up to 500 items / 每个销售订单最多包含 500 个行项目
- The transaction ID should be unique for tracking purposes / 交易标识应为唯一值以便跟踪
- Processing timestamp format: YYYYMMDDHHMMSS / 处理时间戳格式：YYYYMMDDHHMMSS