# CO_FKC_CNVCHRG_PRVCTR_BLK_OUT

**SOAP v1.0.0 —ACTIVE**

## Title / 标题
**Provider Contract - Return Status / 提供商合?- 返回状?*

## Operation / 操作
`ProviderContractReturnStatus`

---

## Description / 描述
This service returns the processing status of provider contract changes (conversion/charges) from an external system to SAP.

该服务将提供商合同变更（转换/费用）的处理状态从外部系统返回到SAP?
---

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

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `BatchHeader` | `BATCH_HEAD` | Batch processing header | 批量处理抬头 |
| `?BatchID` | `CHAR(20)` | Unique batch identifier | 唯一批处理标?|
| `?ProcessType` | `CHAR(2)` | Process type (CV=conversion, CH=charge) | 处理类型（CV=转换，CH=费用?|
| `StatusRecords` | Table | Provider contract status records | 提供商合同状态记?|
| `?ContractID` | `CHAR(20)` | Provider contract ID | 提供商合同ID |
| `?ExternalRef` | `CHAR(30)` | External system reference number | 外部系统参考号 |
| `?Status` | `CHAR(2)` | Processing status | 处理状?|
| `?StatusDate` | `DATE` | Status date | 状态日?|
| `?StatusTime` | `TIME` | Status time | 状态时?|
| `?Message` | `CHAR(220)` | Detailed status message | 详细状态消?|
| `?ErrorCode` | `CHAR(10)` | Error code if failed | 错误代码（如果失败） |

### Status Codes / 状态代?| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `00` | Received / 已接?| Initial receipt acknowledged | 初始接收确认 |
| `01` | Processing / 处理?| Being processed externally | 正在外部处理 |
| `02` | Completed / 已完?| Successfully completed | 成功完成 |
| `03` | Failed / 失败 | Processing failed | 处理失败 |
| `04` | Rejected / 已拒?| Rejected by business rules | 被业务规则拒?|

### 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>
    <ProviderContractReturnStatus>
      <BatchHeader>
        <BatchID>STATUS-20260723-001</BatchID>
        <ProcessType>CV</ProcessType>
      </BatchHeader>
      <StatusRecords>
        <item>
          <ContractID>PC-2003001</ContractID>
          <ExternalRef>EXT-REF-987654</ExternalRef>
          <Status>02</Status>
          <StatusDate>2026-07-23</StatusDate>
          <StatusTime>14:30:00</StatusTime>
          <Message>Provider contract conversion completed successfully / 提供商合同转换已成功完成</Message>
          <ErrorCode></ErrorCode>
        </item>
        <item>
          <ContractID>PC-2003002</ContractID>
          <ExternalRef>EXT-REF-987655</ExternalRef>
          <Status>03</Status>
          <StatusDate>2026-07-23</StatusDate>
          <StatusTime>14:35:00</StatusTime>
          <Message>Validation failed: invalid tariff / 验证失败：无效的费率</Message>
          <ErrorCode>VAL_TARIFF</ErrorCode>
        </item>
      </StatusRecords>
    </ProviderContractReturnStatus>
  </soap:Body>
</soap:Envelope>
```

### Response
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ProviderContractReturnStatusResponse>
      <Return>
        <Type>S</Type>
        <Message>2 status records processed / 已处?条状态记?/Message>
      </Return>
    </ProviderContractReturnStatusResponse>
  </soap:Body>
</soap:Envelope>
```

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `PRV_001` | Contract not found in SAP | SAP中未找到合同 |
| `PRV_002` | Invalid process type | 无效的处理类?|
| `PRV_003` | Duplicate external reference | 重复的外部参考号 |
| `PRV_004` | Status sequence invalid | 状态顺序无?|
| `PRV_005` | Batch ID already processed | 批次ID已处?|

---

## Notes / 备注
- Status updates must follow the sequence: 00 ?01 ?02/03/04 / 状态更新必须按顺序?0 ?01 ?02/03/04
- Maximum 500 status records per batch / 每批次最?00条状态记?- External reference must be unique per contract / 每个合同的外部参考号必须唯一