# CO_SDBIL_ESR_BDUPDSBI_CONF_OUT

**SOAP v1.0.0 — ACTIVE**

## Title / 标题
**Billing Document - Send Confirmation of Fields Updated for Self-Billing / 开票凭证 - 发送自开票字段更新确认**

## Operation / 操作
`BillingDocumentFieldsUpdateConfirmation`

---

## Description / 描述
This asynchronous outbound service sends confirmations of billing document fields updated for self-billing scenarios in SAP S/4HANA Cloud.

该异步出站服务发送 SAP S/4HANA Cloud 中为自开票场景更新的开票凭证字段确认。

---

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

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `BillingDocumentUpdate` | `BD_UPD_SBI` | Billing document update header | 开票凭证更新抬头 |
| `?BillingDocument` | `CHAR(10)` | Billing document number | 开票凭证编号 |
| `?CompanyCode` | `CHAR(4)` | Company code | 公司代码 |
| `?Supplier` | `CHAR(10)` | Supplier account number | 供应商账户编号 |
| `?OriginalAmount` | `DECIMAL(16,2)` | Original billing amount | 原始开票金额 |
| `?UpdatedAmount` | `DECIMAL(16,2)` | Updated billing amount | 更新后开票金额 |
| `?Currency` | `CUKY(5)` | Currency | 货币 |
| `?UpdateReason` | `CHAR(60)` | Reason for update | 更新原因 |
| `?ChangedAt` | `TIMESTAMP` | Timestamp of update | 更新时间戳 |
| `UpdatedFields` | Table | List of updated fields | 更新的字段列表 |
| `?FieldName` | `CHAR(30)` | Name of the updated field | 更新的字段名称 |
| `?OldValue` | `CHAR(100)` | Previous field value | 字段原值 |
| `?NewValue` | `CHAR(100)` | New field value | 字段新值 |

### 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 | 消息文本 |
| `?LogNumber` | `CHAR(20)` | Application log number | 应用程序日志编号 |

---

## Example Payload / 示例负载

### Request
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <BillingDocumentFieldsUpdateConfirmation>
      <BillingDocumentUpdate>
        <BillingDocument>0090000001</BillingDocument>
        <CompanyCode>1000</CompanyCode>
        <Supplier>SUPPLIER01</Supplier>
        <OriginalAmount>15000.00</OriginalAmount>
        <UpdatedAmount>14500.00</UpdatedAmount>
        <Currency>CNY</Currency>
        <UpdateReason>Price correction after goods receipt / 收货后价格修正</UpdateReason>
        <ChangedAt>2026-07-23T10:15:00Z</ChangedAt>
      </BillingDocumentUpdate>
      <UpdatedFields>
        <item>
          <FieldName>NET_PRICE</FieldName>
          <OldValue>300.00</OldValue>
          <NewValue>290.00</NewValue>
        </item>
        <item>
          <FieldName>TOTAL_AMOUNT</FieldName>
          <OldValue>15000.00</OldValue>
          <NewValue>14500.00</NewValue>
        </item>
      </UpdatedFields>
    </BillingDocumentFieldsUpdateConfirmation>
  </soap:Body>
</soap:Envelope>
```

### Response
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <BillingDocumentFieldsUpdateConfirmationResponse>
      <Return>
        <Type>S</Type>
        <Message>Update confirmation sent successfully / 更新确认已成功发送</Message>
        <LogNumber>LOG-BDUPD-20260723-001</LogNumber>
      </Return>
    </BillingDocumentFieldsUpdateConfirmationResponse>
  </soap:Body>
</soap:Envelope>
```

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `BDU_001` | Billing document not found | 未找到开票凭证 |
| `BDU_002` | Billing document not in self-billing scope | 开票凭证不在自开票范围内 |
| `BDU_003` | Invalid field name for update | 无效的更新字段名称 |
| `BDU_004` | Update amount mismatch | 更新金额不匹配 |

---

## Notes / 备注
- Only fields relevant to self-billing are transmitted / 仅传输与自开票相关的字段
- Update confirmations are sent asynchronously / 更新确认以异步方式发送
- Original and updated amounts are compared for validation / 原始金额与更新金额将进行比对验证