# CO_MMPUR_INVC_STS_UPD_NOTF_OUT

**SOAP v1.0.0 — ACTIVE**

## Title / 标题
**Supplier Invoice - Send Status Update Notification (Outbound) / 供应商发票 - 发送状态更新通知（出站）**

## Operation / 操作
`InvoiceStatusUpdateNotificationOut`

---

## Description / 描述
Send notifications about the invoice status updates using this outbound asynchronous service.

使用此出站异步服务发送有关发票状态更新的通知。

---

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

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `InvoiceStatusNotification` | `INVC_STS_NOTF` | Invoice status notification header | 发票状态通知抬头 |
| `?InvoiceReference` | `CHAR(10)` | Supplier invoice reference | 供应商发票参考 |
| `?FiscalYear` | `CHAR(4)` | Fiscal year | 会计年度 |
| `?DocumentNumber` | `CHAR(10)` | Invoice document number | 发票凭证编号 |
| `?Status` | `CHAR(2)` | Invoice status (e.g. 01=posted, 02=blocked, 03=paid) | 发票状态（如 01=已过账，02=已冻结，03=已付款） |
| `?StatusChangedAt` | `DATETIME` | Status change timestamp | 状态更改时间戳 |
| `?CompanyCode` | `CHAR(4)` | Company code | 公司代码 |
| `?Supplier` | `CHAR(10)` | Supplier account number | 供应商账户号 |
| `?GrossAmount` | `DECIMAL` | Invoice gross amount | 发票总金额 |
| `?Currency` | `CUKY(5)` | Currency | 货币 |
| `?StatusText` | `CHAR(60)` | Status description text | 状态描述文本 |

### 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>
    <InvoiceStatusUpdateNotificationOut>
      <InvoiceStatusNotification>
        <InvoiceReference>INV-2026-0089</InvoiceReference>
        <FiscalYear>2026</FiscalYear>
        <DocumentNumber>5100000123</DocumentNumber>
        <Status>02</Status>
        <StatusChangedAt>2026-07-23T10:15:00</StatusChangedAt>
        <CompanyCode>1000</CompanyCode>
        <Supplier>0010001000</Supplier>
        <GrossAmount>12500.00</GrossAmount>
        <Currency>CNY</Currency>
        <StatusText>Invoice blocked for payment / 发票已冻结付款</StatusText>
      </InvoiceStatusNotification>
    </InvoiceStatusUpdateNotificationOut>
  </soap:Body>
</soap:Envelope>
```

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

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `INV_001` | Invalid invoice reference | 无效的发票参考 |
| `INV_002` | Invoice document not found | 发票凭证未找到 |
| `INV_003` | Unknown status code | 未知的状态代码 |
| `INV_004` | Missing company code | 缺少公司代码 |

---

## Notes / 备注
- Status codes: 01=posted, 02=blocked, 03=paid, 04=cancelled / 状态代码：01=已过账，02=已冻结，03=已付款，04=已取消
- This is an asynchronous outbound service triggered by invoice status changes / 这是一个由发票状态更改触发的异步出站服务
- The notification is sent to external systems for downstream processing / 通知发送到外部系统用于下游处理