# CO_SDBIL_ESR_BDCR_SBI_CONF_OUT

**SOAP v1.0.0 — ACTIVE**

## Title / 标题
**Self Billing Invoice - Send Creation Confirmation / 自开票发票 - 发送创建确认**

## Operation / 操作
`SelfBillingInvoiceCreationConfirmation`

---

## Description / 描述
This outbound asynchronous SOAP service sends confirmations of newly created self-billing invoices to the SAP Self-Billing Cockpit.

该出站异步 SOAP 服务将新创建的自开票发票确认发送至 SAP 自开票驾驶舱。

---

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

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `SelfBillingInvoice` | `SBI_INVOICE` | Self-billing invoice header | 自开票发票抬头 |
| `?InvoiceNumber` | `CHAR(10)` | Self-billing invoice number | 自开票发票编号 |
| `?CompanyCode` | `CHAR(4)` | Company code | 公司代码 |
| `?Supplier` | `CHAR(10)` | Supplier account number | 供应商账户编号 |
| `?DocumentDate` | `DATE` | Document date | 凭证日期 |
| `?PostingDate` | `DATE` | Posting date | 过账日期 |
| `?Amount` | `DECIMAL(16,2)` | Total invoice amount | 发票总金额 |
| `?Currency` | `CUKY(5)` | Currency | 货币 |
| `?Reference` | `CHAR(16)` | External reference number | 外部参考编号 |
| `InvoiceItems` | Table | Invoice items | 发票行项目 |
| `?ItemNumber` | `NUMC(6)` | Item number | 行项目编号 |
| `?Material` | `CHAR(40)` | Material number | 物料编号 |
| `?Quantity` | `QUAN(13)` | Quantity | 数量 |
| `?Unit` | `UNIT(3)` | Unit of measure | 计量单位 |
| `?NetPrice` | `DECIMAL(16,2)` | Net price per unit | 单价（净价） |
| `?Amount` | `DECIMAL(16,2)` | Item amount | 项目金额 |
| `?TaxCode` | `CHAR(2)` | Tax code | 税码 |

### 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>
    <SelfBillingInvoiceCreationConfirmation>
      <SelfBillingInvoice>
        <InvoiceNumber>SBI-2026-0001</InvoiceNumber>
        <CompanyCode>1000</CompanyCode>
        <Supplier>SUPPLIER01</Supplier>
        <DocumentDate>2026-07-23</DocumentDate>
        <PostingDate>2026-07-23</PostingDate>
        <Amount>12500.00</Amount>
        <Currency>CNY</Currency>
        <Reference>EXT-REF-001</Reference>
      </SelfBillingInvoice>
      <InvoiceItems>
        <item>
          <ItemNumber>000010</ItemNumber>
          <Material>MAT-20001</Material>
          <Quantity>50.000</Quantity>
          <Unit>PC</Unit>
          <NetPrice>200.00</NetPrice>
          <Amount>10000.00</Amount>
          <TaxCode>V1</TaxCode>
        </item>
        <item>
          <ItemNumber>000020</ItemNumber>
          <Material>MAT-20002</Material>
          <Quantity>100.000</Quantity>
          <Unit>M</Unit>
          <NetPrice>25.00</NetPrice>
          <Amount>2500.00</Amount>
          <TaxCode>V1</TaxCode>
        </item>
      </InvoiceItems>
    </SelfBillingInvoiceCreationConfirmation>
  </soap:Body>
</soap:Envelope>
```

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

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `SBI_001` | Invalid invoice number | 无效的发票编号 |
| `SBI_002` | Invoice already confirmed | 发票已确认 |
| `SBI_003` | Supplier not found | 未找到供应商 |
| `SBI_004` | Amount mismatch with reference document | 金额与参考凭证不匹配 |

---

## Notes / 备注
- Only applicable to self-billing invoice scenarios / 仅适用于自开票发票场景
- Confirmation is sent asynchronously to SAP Self-Billing Cockpit / 确认信息异步发送至 SAP 自开票驾驶舱
- Invoice items must match the referenced purchase order / 发票行项目必须与引用的采购订单匹配