# ECC_CASHPOINTCLOSINGDOCNO

**SOAP v1.0.0 — ACTIVE**

## Title / 标题
**External Cash Point - Inbound Closing Notification / 外部收银点 - 入库结算通知**

## Operation / 操作
`CashPointClosingNotification`

---

## Description / 描述
Transfer cash desk closing data to Contract Accounting (FI-CA) using this inbound asynchronous service.

使用此入站异步服务将收银台结算数据传输到合同会计（FI-CA）。

---

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

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `CashPointClosing` | `CASHPOINT_CLOSE` | Cash point closing header | 收银点结算抬头 |
| `?CashPointID` | `CHAR(10)` | Cash point identifier | 收银点标识 |
| `?ClosingDate` | `DATE` | Closing date | 结算日期 |
| `?ClosingTime` | `TIME` | Closing time | 结算时间 |
| `?CompanyCode` | `CHAR(4)` | Company code | 公司代码 |
| `?CashierID` | `CHAR(10)` | Cashier identifier | 收银员标识 |
| `Items` | Table | Payment items summary | 付款项目汇总 |
| `?PaymentMethod` | `CHAR(1)` | Payment method (C=Cash, K=Card, T=Transfer) | 付款方式（C=现金，K=卡，T=转账） |
| `?Amount` | `DECIMAL` | Total amount per method | 每种方式的总金额 |
| `?Currency` | `CUKY(5)` | Currency | 货币 |
| `?Count` | `INT4` | Number of transactions | 交易笔数 |

### 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 | 消息文本 |
| `ClosingDocument` | `CHAR(20)` | Closing document number | 结算凭证编号 |

---

## Example Payload / 示例负载

### Request
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <CashPointClosingNotification>
      <CashPointClosing>
        <CashPointID>CP-001</CashPointID>
        <ClosingDate>2026-07-24</ClosingDate>
        <ClosingTime>18:00:00</ClosingTime>
        <CompanyCode>1000</CompanyCode>
        <CashierID>USR001</CashierID>
      </CashPointClosing>
      <Items>
        <item>
          <PaymentMethod>C</PaymentMethod>
          <Amount>25000.00</Amount>
          <Currency>CNY</Currency>
          <Count>45</Count>
        </item>
        <item>
          <PaymentMethod>K</PaymentMethod>
          <Amount>12300.50</Amount>
          <Currency>CNY</Currency>
          <Count>28</Count>
        </item>
        <item>
          <PaymentMethod>T</PaymentMethod>
          <Amount>8900.00</Amount>
          <Currency>CNY</Currency>
          <Count>12</Count>
        </item>
      </Items>
    </CashPointClosingNotification>
  </soap:Body>
</soap:Envelope>
```

### Response
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <CashPointClosingNotificationResponse>
      <Return>
        <Type>S</Type>
        <Message>Closing data transferred successfully / 结算数据传输成功</Message>
      </Return>
      <ClosingDocument>CLOSE-20260724-001</ClosingDocument>
    </CashPointClosingNotificationResponse>
  </soap:Body>
</soap:Envelope>
```

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `CPD_001` | Cash point not active | 收银点未激活 |
| `CPD_002` | Duplicate closing for same date/time | 同日期时间重复结算 |
| `CPD_003` | Company code mismatch | 公司代码不匹配 |
| `CPD_004` | Payment method not valid | 付款方式无效 |

---

## Notes / 备注
- Closing data is posted to FI-CA accounts / 结算数据过账到FI-CA账户
- Multiple closings per day are allowed for different cash points / 不同收银点每天允许多次结算
- This is an asynchronous inbound service / 此为异步入站服务