# CO_PPINT_MRPCHANGE_REQUEST_CON

**SOAP v1.0.0 — ACTIVE**

## Title / 标题
**MRP Change Request Confirmation / MRP更改请求确认**

## Operation / 操作
`MRPChangeRequestConfirmation`

---

## Description / 描述
This service allows external systems to confirm changes to Material Requirements Planning (MRP) data, including planning parameters, lot sizes, and procurement types.

该服务允许外部系统确认对物料需求计划（MRP）数据的更改，包括计划参数、批量大小和采购类型。

---

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

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `ChangeRequest` | `BAPIMRPCHG` | MRP change request header | MRP更改请求抬头 |
| `?Material` | `CHAR(40)` | Material number | 物料编号 |
| `?Plant` | `CHAR(4)` | Plant | 工厂 |
| `?MRPArea` | `CHAR(10)` | MRP area | MRP区域 |
| `?ChangeType` | `CHAR(2)` | Change type (01-10) | 更改类型（01-10） |
| `?RequestID` | `CHAR(20)` | Change request ID | 更改请求ID |
| `PlanningParams` | Table | Planning parameter changes | 计划参数更改 |
| `?ParamName` | `CHAR(30)` | Parameter name | 参数名称 |
| `?OldValue` | `CHAR(50)` | Old parameter value | 旧参数值 |
| `?NewValue` | `CHAR(50)` | New parameter value | 新参数值 |
| `?EffectiveFrom` | `DATE` | Effective start date | 生效起始日期 |
| `?ReasonCode` | `CHAR(3)` | Change reason code | 更改原因代码 |
| `ConfirmedBy` | `CHAR(12)` | Confirmed by user | 确认用户 |
| `ConfirmationDate` | `DATE` | Confirmation date | 确认日期 |

### Response / 响应
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `Return` | `BAPIRETURN` | Application log message | 应用程序日志消息 |
| `?Type` | `CHAR(1)` | Message type (S/E/W/I) | 消息类型（成功/错误/警告/信息） |
| `?Code` | `CHAR(20)` | Message code | 消息代码 |
| `?Message` | `CHAR(220)` | Message text | 消息文本 |
| `Status` | `CHAR(1)` | Confirmation status (A=accepted, R=rejected) | 确认状态（A=已接受，R=已拒绝） |

---

## Example Payload / 示例负载

### Request
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <MRPChangeRequestConfirmation>
      <ChangeRequest>
        <Material>MAT-1000</Material>
        <Plant>PL01</Plant>
        <MRPArea>M001</MRPArea>
        <ChangeType>01</ChangeType>
        <RequestID>REQ-2026-0001</RequestID>
      </ChangeRequest>
      <PlanningParams>
        <item>
          <ParamName>MRP_TYPE</ParamName>
          <OldValue>PD</OldValue>
          <NewValue>ND</NewValue>
          <EffectiveFrom>2026-08-01</EffectiveFrom>
          <ReasonCode>OPT</ReasonCode>
        </item>
      </PlanningParams>
      <ConfirmedBy>USER001</ConfirmedBy>
      <ConfirmationDate>2026-07-23</ConfirmationDate>
    </MRPChangeRequestConfirmation>
  </soap:Body>
</soap:Envelope>
```

### Response
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <MRPChangeRequestConfirmationResponse>
      <Return>
        <Type>S</Type>
        <Code>MRP_001</Code>
        <Message>MRP change confirmed successfully / MRP更改已成功确认</Message>
      </Return>
      <Status>A</Status>
    </MRPChangeRequestConfirmationResponse>
  </soap:Body>
</soap:Envelope>
```

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `MRP_001` | Material not found in plant | 物料在工厂中未找到 |
| `MRP_002` | Invalid MRP type | 无效的MRP类型 |
| `MRP_003` | Change request already processed | 更改请求已处理 |
| `MRP_004` | Effective date is in the past | 生效日期为过去日期 |

---

## Notes / 备注
- Change type 01=MRP type, 02=Lot sizing, 03=Procurement type, 04=Scheduling / 更改类型 01=MRP类型，02=批量，03=采购类型，04=排程
- Confirmation is final and cannot be reversed once accepted / 确认为最终确认，一旦接受不可撤销
- Reason code must be from customizing table TCO1 / 原因代码必须来自定制表TCO1