# CO_SDSLS_ESR_SALES_ORDER_NOTIF

**SOAP v1.0.0 —ACTIVE**

## Title / 标题
**Sales Order - Send Processing Notification (A2A) / 销售订单 - 发送处理通知**

## Operation / 操作
`SalesOrderProcessingNotification`

---

## Description / 描述
Send back automatic notifications about the processing of sales orders with this asynchronous outbound SOAP service. Notifies external systems about sales order creation, changes, or status updates in SAP S/4HANA Cloud.

通过此异步出站 SOAP 服务发送有关销售订单处理的自动通知。将 SAP S/4HANA Cloud 中销售订单的创建、更改或状态更新通知外部系统。

---

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

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `SalesOrderNotification` | `SALES_ORDER_NOTIF` | Sales order notification header | 销售订单通知抬头 |
| `?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 | 售达方 |
| `?DocumentDate` | `DATE` | Document date | 凭证日期 |
| `?DeliveryDate` | `DATE` | Requested delivery date | 请求交货日期 |
| `?TotalNetAmount` | `DECIMAL` | Total net amount | 总净额 |
| `?DocumentCurrency` | `CUKY(5)` | Document currency | 凭证货币 |
| `?OverallStatus` | `CHAR(1)` | Overall status (N=New, C=Changed, P=Processed) | 总体状态（N=新建、C=已更改、P=已处理） |
| `?ProcessingMode` | `CHAR(1)` | Processing mode (1=Create, 2=Change, 3=Delete) | 处理模式（1=创建、2=更改、3=删除） |
| `NotificationItems` | Table | Sales order items in notification | 通知中的销售订单行项目 |
| `?ItemNumber` | `NUM(6)` | Item number | 行项目号 |
| `?Material` | `CHAR(40)` | Material number | 物料编码 |
| `?OrderQuantity` | `QUAN` | Ordered quantity | 已订数量 |
| `?BaseUnit` | `UNIT(3)` | Base unit of measure | 基本计量单位 |
| `?ItemStatus` | `CHAR(1)` | Item status | 行项目状态 |

### 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 | 消息文本 |

---

## Example Payload / 示例负载

### Request
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SalesOrderProcessingNotification>
      <SalesOrderNotification>
        <SalesOrder>10000001</SalesOrder>
        <SalesOrderType>OR</SalesOrderType>
        <SalesOrganization>1000</SalesOrganization>
        <DistributionChannel>10</DistributionChannel>
        <Division>00</Division>
        <SoldToParty>0001001000</SoldToParty>
        <DocumentDate>2026-07-23</DocumentDate>
        <DeliveryDate>2026-08-15</DeliveryDate>
        <TotalNetAmount>150000.00</TotalNetAmount>
        <DocumentCurrency>CNY</DocumentCurrency>
        <OverallStatus>N</OverallStatus>
        <ProcessingMode>1</ProcessingMode>
      </SalesOrderNotification>
      <NotificationItems>
        <item>
          <ItemNumber>10</ItemNumber>
          <Material>FINISHED-GOOD-001</Material>
          <OrderQuantity>100.000</OrderQuantity>
          <BaseUnit>PC</BaseUnit>
          <ItemStatus>N</ItemStatus>
        </item>
        <item>
          <ItemNumber>20</ItemNumber>
          <Material>FINISHED-GOOD-002</Material>
          <OrderQuantity>50.000</OrderQuantity>
          <BaseUnit>PC</BaseUnit>
          <ItemStatus>N</ItemStatus>
        </item>
      </NotificationItems>
    </SalesOrderProcessingNotification>
  </soap:Body>
</soap:Envelope>
```

### Response
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SalesOrderProcessingNotificationResponse>
      <Return>
        <Type>S</Type>
        <Message>Notification sent successfully / 通知已成功发送</Message>
      </Return>
    </SalesOrderProcessingNotificationResponse>
  </soap:Body>
</soap:Envelope>
```

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `SON_001` | Invalid sales order number | 无效的销售订单号 |
| `SON_002` | Missing notification type | 缺少通知类型 |
| `SON_003` | Invalid item data | 无效的行项目数据 |
| `SON_004` | Duplicate notification | 重复的通知 |

---

## Notes / 备注
- This is an asynchronous outbound service / 此为异步出站服务
- Notifications are triggered automatically by business events in S/4HANA / 通知由 S/4HANA 中的业务事件自动触发
- Supported processing modes: Create (1), Change (2), Delete (3) / 支持的处理模式：创建（1）、更改（2）、删除（3）
- Maximum 500 items per notification / 每个通知最多 500 个项目