# ECC_CASHPOINTPAYMENTREVNO

**SOAP v1.0.0 — ACTIVE**

## Title / 标题
**External Cash Point - Inbound Reversal Notification / 外部收银点 - 入库冲销通知**

## Operation / 操作
`CashPointPaymentReversal`

---

## Description / 描述
Transfer payment reversal 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_CASHPOINTPAYMENTREVNO` |
| Test | `https://sap-test.example.com/sap/bc/srt/rfc/sap/ECC_CASHPOINTPAYMENTREVNO` |

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `CashPointPaymentRev` | `CASHPOINT_REV` | Payment reversal header | 付款冲销抬头 |
| `?CashPointID` | `CHAR(10)` | Cash point ID | 收银点编号 |
| `?ReversalDate` | `DATE` | Reversal date | 冲销日期 |
| `?ReversalTime` | `TIME` | Reversal time | 冲销时间 |
| `?CompanyCode` | `CHAR(4)` | Company code | 公司代码 |
| `OriginalPayment` | `CHAR(20)` | Original payment document | 原始付款凭证 |
| `ReversalReason` | `CHAR(2)` | Reversal reason code | 冲销原因代码 |
| `Amount` | `DECIMAL` | Reversed amount | 冲销金额 |
| `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) | 消息类型（成功/错误/警告/信息） |
| `?Message` | `CHAR(220)` | Message text | 消息文本 |
| `ReversalDocument` | `CHAR(20)` | Reversal document number | 冲销凭证编号 |

---

## Example Payload / 示例负载

### Request
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <CashPointPaymentReversal>
      <CashPointPaymentRev>
        <CashPointID>CP-001</CashPointID>
        <ReversalDate>2026-07-24</ReversalDate>
        <ReversalTime>16:00:00</ReversalTime>
        <CompanyCode>1000</CompanyCode>
      </CashPointPaymentRev>
      <OriginalPayment>PAY-20260723-015</OriginalPayment>
      <ReversalReason>02</ReversalReason>
      <Amount>1500.00</Amount>
      <Currency>CNY</Currency>
    </CashPointPaymentReversal>
  </soap:Body>
</soap:Envelope>
```

### Response
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <CashPointPaymentReversalResponse>
      <Return>
        <Type>S</Type>
        <Message>Payment reversed successfully / 付款冲销成功</Message>
      </Return>
      <ReversalDocument>REVPAY-20260724-001</ReversalDocument>
    </CashPointPaymentReversalResponse>
  </soap:Body>
</soap:Envelope>
```

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `CPR_001` | Original payment not found | 未找到原始付款凭证 |
| `CPR_002` | Payment already reversed | 付款已冲销 |
| `CPR_003` | Reversal amount exceeds payment | 冲销金额超出付款金额 |
| `CPR_004` | Reversal reason invalid | 冲销原因无效 |

---

## Notes / 备注
- Original payment must exist and not be already reversed / 原始付款必须存在且尚未冲销
- Reversal posts a corresponding negative entry in FI-CA / 冲销在FI-CA中过账相应的负数分录
- This is an asynchronous inbound service / 此为异步入站服务