---
# API: 41
# File: API_EVENT_BASED_REVREC_PROJECT_SRV.md
# Version: 1.1.0
# Status: ACTIVE
---

# Event-Based Revenue Recognition Integration / 事件驱动型收入确认集成（项目）

## 概述 / Overview

**Event-Based Revenue Recognition Integration (Projects)**

Clear or reevaluate the revenue recognition postings, and change the revenue recognition key for WBS elements (projects) using this synchronous inbound service.

清除或重新评估收入确认过帐，并使用此同步入站服务更改 WBS 元素（项目）的收入确认密钥。

This service is part of communication scenario **Finance - Event-Based Revenue Recognition Integration (SAP_COM_0312)**.

---

## Service Root / 服务根路径

```
/sap/opu/odata/sap/API_EVENT_BASED_REVREC_PROJECT_SRV/
```

---

## Protocol / 协议

- OData Version: **V2**
- Protocol: **Synchronous Inbound**
- Communication Scenario: **SAP_COM_0312**

---

## Business Context / 业务上下文

Event-Based Revenue Recognition (EBRR) recognizes costs and revenues as they occur, providing real-time margin reporting for project-based transactions.

事件驱动型收入确认（EBRR）在交易发生时即时确认成本和收入，为基于项目的交易提供实时毛利报告。

Key objects / 关键对象：
- **WBS Element / WBS 元素** — billing element for customer projects / 客户项目的开票元素
- **Revenue Recognition Key / 收入确认密钥** — defines the revenue recognition method / 定义收入确认方法
- **Project / 项目** — customer project or EPPM project / 客户项目或企业项目管理项目

---

## Operations / 操作

| Action / 操作 | Method / 方法 | Description / 描述 |
| --- | --- | --- |
| **Clear** | POST | Clear revenue recognition postings / 清除收入确认过帐 |
| **Reevaluate** | POST | Reevaluate revenue recognition postings / 重新评估收入确认过帐 |
| **ChangeRevenueRecognitionKey** | POST | Change revenue recognition key for WBS element / 更改 WBS 元素收入确认密钥 |

---

## Entity Types / 实体类型

### es_ActionResult

| Field / 字段 | Type / 类型 | Description / 描述 |
| --- | --- | --- |
| **LogMessage** | Edm.String | Log message from action execution / 操作执行的日志消息 |
| **LogMessageNumber** | Edm.String | Log message number / 日志消息编号 |
| **LogMessageType** | Edm.String | Type of log message (S/E/W) / 日志消息类型（S=成功/E=错误/W=警告） |
| **FinancialPeriod** | Edm.String | Financial period of posting / 过帐所在的会计期间 |
| **AccountingDocument** | Edm.String | Accounting document number created / 创建的会计凭证编号 |
| **FiscalYear** | Edm.String | Fiscal year of accounting document / 会计凭证的会计年度 |

---

## Action Details / 操作详情

### Clear Revenue Recognition / 清除收入确认

Clears revenue recognition postings for WBS elements, reverting previously recognized entries.

清除 WBS 元素的收入确认过帐，撤销先前确认的收入和成本分录。

**Request / 请求**:
```
POST /sap/opu/odata/sap/API_EVENT_BASED_REVREC_PROJECT_SRV/Clear
```

**Parameters / 参数**:

| Field / 字段 | Type / 类型 | Description / 描述 |
| --- | --- | --- |
| **WbsElement** | Edm.String | WBS element to clear / 要清除的 WBS 元素 |
| **PostingDate** | Edm.DateTime | Posting date / 过帐日期 |

### Reevaluate Revenue Recognition / 重新评估收入确认

Reevaluates revenue recognition postings based on updated project data.

基于更新后的项目数据重新评估收入确认过帐。

**Request / 请求**:
```
POST /sap/opu/odata/sap/API_EVENT_BASED_REVREC_PROJECT_SRV/Reevaluate
```

**Parameters / 参数**:

| Field / 字段 | Type / 类型 | Description / 描述 |
| --- | --- | --- |
| **WbsElement** | Edm.String | WBS element to reevaluate / 要重新评估的 WBS 元素 |
| **PostingDate** | Edm.DateTime | Posting date / 过帐日期 |

### Change Revenue Recognition Key / 更改收入确认密钥

Changes the revenue recognition key for a WBS billing element.

更改 WBS 开票元素的收入确认密钥。

**Request / 请求**:
```
POST /sap/opu/odata/sap/API_EVENT_BASED_REVREC_PROJECT_SRV/ChangeRevenueRecognitionKey
```

**Parameters / 参数**:

| Field / 字段 | Type / 类型 | Description / 描述 |
| --- | --- | --- |
| **WbsElement** | Edm.String | WBS billing element to update / 要更新的 WBS 开票元素 |
| **RevenueRecognitionKey** | Edm.String | New revenue recognition key / 新收入确认密钥 |
| **ValidFrom** | Edm.DateTime | Validity start date / 有效开始日期 |

---

## Sample Request / 请求示例

```json
{
  "WbsElement": "SW006-BIL",
  "RevenueRecognitionKey": "ZZ01",
  "ValidFrom": "/Date(1704067200000)/"
}
```

---

## Error Handling / 错误处理

| HTTP Status / 状态码 | Description / 描述 |
| --- | --- |
| **200 OK** | Action executed successfully / 操作成功执行 |
| **400 Bad Request** | Invalid input parameters / 输入参数无效 |
| **401 Unauthorized** | Authentication failed / 身份验证失败 |
| **403 Forbidden** | Insufficient authorization / 权限不足 |
| **500 Internal Server Error** | Server error / 服务器错误 |

---

## Notes / 备注

- Requires communication scenario **SAP_COM_0312** / 需要配置通信场景 SAP_COM_0312
- Revenue recognition keys are defined in customizing / 收入确认密钥在定制中定义
- WBS elements must be billing elements (category 2) / WBS 元素必须为开票元素（类别 2）
- Refer to SAP API Business Hub for the complete specification / 完整规范请参考 SAP API Business Hub
- [API Business Hub](https://api.sap.com/api/API_EVENT_BASED_REVREC_PROJECT_SRV/overview)