# KB_SD_1EZ_附录 — Credit Memo Processing 可选流程

> 1EZ 主文件覆盖 2 个必选步骤。本附录展开 3 个 Optional 流程 + 4 个配置前置，仅当触发条件满足时使用。

---

## 附录 A：Process Credit Memo Request Approval（可选）

**触发条件**（BPD 原文 Note）：
- 审批原因已定义 + 分配
- Cloud BAdI 已实现（返回审批原因）

### A.1 Withdraw from Approval
**App**：Manage Credit Memo Requests - Version 2 (F1989A) | **角色**：Internal Sales Representative
- 在 Display Credit Memo Request xxx: Overview 选 More → Edit → Additional Functions → Withdraw Approval Request
- 选 Continue 确认

### A.2 Approve/Reject/Rework Credit Memo Request
**App**：My Inbox - All Items (F0862) | **角色**：Sales Manager
- 收到通知后做批准/拒绝/退回决定

### A.3 Rework Credit Memo Request
**App**：Manage Credit Memo Requests - Version 2 (F1989A) | **角色**：Internal Sales Representative
- 收到退回通知后改 Credit Memo Request
- 子步骤：Check the Notifications / Change Credit Memo Request

---

## 附录 B：Preliminary Steps for Credit Memo Request（配置前置，仅启用工作流时执行）

### B.1 Define and Assign Approval Reasons
- **Configure Your Solution 路径**：Manage Your Solution (F1241) → Sales / Basic Functions → Sales Document Approvals
- 新建：Approval Request Reason ID=ZCR1；Approval Request Reason="Credit memo needs approval"
- 分配：Ducoment Category=K（Credit Memo Request）

### B.2 Implement Cloud BAdI
- **App**：Custom Fields and Logic (Obsolete) (F1481) | **角色**：Administrator
- 创建：Business Context=Sales: Sales Document；BADI Description="Set Approval Request Reasons for Sales Documents"；Implementation Description="Set Approval Reason for Sales Documents"
- 示例代码：
  ```abap
  if salesdocument-sddocumentcategory = 'K' and salesdocument-sddocumentreason = '005'.
    salesdocapprovalreason = 'ZCR1'.
  endif.
  ```
- 选 Save Draft → Publish

### B.3 Manage Teams and Responsibilities
- **App**：Manage Teams and Responsibilities - Just-In-Time (F2412) | **角色**：Business Process Specialist
- 创建 Team：Name="credit memo workflow"；Status=Enabled；Type=SALES
- 添加成员：Last Name=Sales Manager
- 添加功能：CMR1LVLA（Sales Document Approver - Level 1）/ CMR2LVLA（Level 2）

### B.4 Set up Workflow
- **App**：Manage Sales Document Workflows (F3014) | **角色**：Configuration Expert - Business Process Configuration
- 创建两个 Workflow：
  - 2 级审批：Net Amount > 1000 CNY → Sales Document Approver - Level 2
  - 1 级审批：无条件 / Level 1
- 异常处理：Rework Credit Memo Request → Restart Workflow

### B.5 Remove Billing Block from Order Type
- 默认 Credit Memo 类型带 billing block（保存自动加）
- 如需调整：Manage Sales Order Reasons / Customizing

---

*版本 v0.1 | 2026-06-13*
