# CO_MMPUR_SES_STATUS_NOTIF_OUT

**SOAP v1.1.0 — ACTIVE**

## Title / 标题
**Service Entry Sheet - Send Status Update Notification (Lean Services) / 服务条目表 - 发送状态更新通知（精益服务）**

## Operation / 操作
`ServiceEntrySheetStsNotif_Out`

---

## Description / 描述
This outbound SOAP service enables you to send status update notifications from SAP S/4HANA to an external system when changes relevant to the business process have been made to a service entry sheet.

此出站SOAP服务使您能够在服务条目表发生与业务流程相关的更改时，将状态更新通知从SAP S/4HANA发送到外部系统。

---

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

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `MessageHeader` | `BUS_DOC_MSG_HDR` | Service message header | 服务消息头 |
| `?ID` | `CHAR(35)` | Message ID | 消息ID |
| `?UUID` | `RAW(16)` | Message UUID | 消息UUID |
| `?CreationDateTime` | `DATETIME` | Message creation timestamp | 消息创建时间戳 |
| `?SenderID` | `CHAR(60)` | Sender business system ID | 发送方业务系统ID |
| `?ReceiverID` | `CHAR(60)` | Receiver business system ID | 接收方业务系统ID |
| `ServiceEntrySheetStatusEntity` | `SES_STATUS` | Status notification entity | 状态通知实体 |
| `?SESNumber` | `CHAR(10)` | Service Entry Sheet number | 服务条目表编号 |
| `?CompanyCode` | `CHAR(4)` | Company code | 公司代码 |
| `?Plant` | `CHAR(4)` | Plant | 工厂 |
| `?PurchasingDocument` | `CHAR(10)` | Purchasing document number | 采购凭证号 |
| `?Supplier` | `CHAR(10)` | Supplier account | 供应商账户号 |
| `?ApprovalStatus` | `CHAR(2)` | Document status (10/20/21/25/30/40/60) | 凭证状态 |
| `?ActionCode` | `CHAR(2)` | Action (01=create, 03=delete) | 操作（01=创建，03=删除） |
| `?HasError` | `CHAR(1)` | Error indicator (X=error) | 错误指示符（X=错误） |
| `?ErrorDescription` | `CHAR(200)` | Error description text | 错误描述文本 |
| `Items` | Table | Service entry sheet items | 服务条目表项目 |
| `?ItemNumber` | `NUMC(5)` | Line item number | 行项目号 |
| `?Quantity` | `QUAN(13)` | Entry quantity | 条目数量 |
| `?Unit` | `UNIT(3)` | Unit of measure | 计量单位 |
| `?Amount` | `CURR(13)` | Amount in document currency | 凭证货币金额 |
| `?Currency` | `CUKY(5)` | Currency | 货币码 |

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

---

## Approval Status Codes / 审批状态代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `10` | In Process | 处理中 |
| `20` | In Approval | 审批中 |
| `21` | In External Approval | 外部审批中 |
| `25` | Automatic Approval Pending | 等待自动审批 |
| `30` | Approved | 已批准 |
| `40` | Rejected | 已拒绝 |
| `60` | Deleted | 已删除 |

---

## Example Payload / 示例负载

### Request
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ServiceEntrySheetStsNotif_Out>
      <MessageHeader>
        <ID>MSG-20260723-001</ID>
        <UUID>3F2504E0-4F89-11D3-9A0C-0305E82C3301</UUID>
        <CreationDateTime>2026-07-23T10:30:00Z</CreationDateTime>
        <SenderID>SAP_S4HANA_100</SenderID>
        <ReceiverID>EXT_SYSTEM_001</ReceiverID>
      </MessageHeader>
      <ServiceEntrySheetStatusEntity>
        <SESNumber>4500000001</SESNumber>
        <CompanyCode>1000</CompanyCode>
        <Plant>1000</Plant>
        <PurchasingDocument>4500012345</PurchasingDocument>
        <Supplier>0010001000</Supplier>
        <ApprovalStatus>30</ApprovalStatus>
        <ActionCode>01</ActionCode>
        <HasError></HasError>
      </ServiceEntrySheetStatusEntity>
      <Items>
        <item>
          <ItemNumber>00010</ItemNumber>
          <Quantity>100.000</Quantity>
          <Unit>PC</Unit>
          <Amount>5000.00</Amount>
          <Currency>CNY</Currency>
        </item>
        <item>
          <ItemNumber>00020</ItemNumber>
          <Quantity>50.000</Quantity>
          <Unit>KG</Unit>
          <Amount>2500.00</Amount>
          <Currency>CNY</Currency>
        </item>
      </Items>
    </ServiceEntrySheetStsNotif_Out>
  </soap:Body>
</soap:Envelope>
```

### Response
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ServiceEntrySheetStsNotif_OutResponse>
      <Return>
        <Type>S</Type>
        <Code>SES_100</Code>
        <Message>Status notification sent / 状态通知已发送</Message>
      </Return>
    </ServiceEntrySheetStsNotif_OutResponse>
  </soap:Body>
</soap:Envelope>
```

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `SES_001` | Service Entry Sheet not found | 未找到服务条目表 |
| `SES_002` | Invalid approval status transition | 无效的审批状态转换 |
| `SES_003` | Missing action code | 缺少操作代码 |
| `SES_004` | External system unreachable | 外部系统不可达 |

---

## Notes / 备注
- This service only processes service entry sheets created via the inbound web service / 此服务仅处理通过入站Web服务创建的服务条目表
- Use transaction `/AIF/IFMON` for message monitoring / 使用事务`/AIF/IFMON`进行消息监控
- Relevant SAP Notes: 2553061, 2554317 / 相关SAP注释：2553061、2554317
- AIF namespace: `/MMPUR`, recipient: `MMPUR_SES_STATUS_NOTIF_OUTBOUND` / AIF命名空间：`/MMPUR`，接收方：`MMPUR_SES_STATUS_NOTIF_OUTBOUND`