Symptom
- Post-upgrade, invoking MODIFY ENTITIES OF I_PURCHASEORDERTP_2 via EML returns item-level errors duplicated across all items in the REPORTED-purchaseorderitem structure.
- When a single purchaseorderitem contains invalid data (for example, missing account assignment or invalid storage location), the same error message appears for all line items, making it unclear which item actually failed.
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Launch a custom RAP application that calls MODIFY ENTITIES OF I_PURCHASEORDERTP_2 via EML to create a multi-item PO/STO (for example, items 00010, 00020, 00030).
- Provide input where only one item (for example, 00020) has an invalid attribute (such as a missing account assignment or an invalid storage location).
- Run the EML call and review ls_reported-purchaseorderitem: the failing item’s error is duplicated across all items.
Cause
A regression introduced by recent refactoring in the PO message handling (class/method CL_MM_PUR_PO_BIL_MSG_HANDLER~MSG_PROCESSING_ITEM) populated messages inside a loop without associating the item-specific key, causing a single item error to be duplicated for all items in REPORTED-purchaseorderitem.
Resolution
- Apply the correction when available: a hotfix is being implemented to restore item-key-specific message handling; inclusion in the next delivery (for example, CE2702) is planned. Coordinate deployment per the standard release window.
- Until the correction is deployed, identify the erroneous item based on the returned message, correct the item data, and reprocess the PO/STO. The document posts successfully after fixing the failing item.
- Alternatively, for STO creation, use the projection API I_STOCKTRANSPORTORDERTP as a temporary approach: API Business Object I_STOCKTRANSPORTORDERTP.
- After the correction is deployed, validate that REPORTED-purchaseorderitem only contains messages for the actually affected items.
Keywords
i_purchaseordertp_2, eml, reported-purchaseorderitem, duplicate error, purchaseorderitem, rap, post-upgrade, sto creation, po creation, modify entities, message handler, item-level error, regression, s/4hana cloud, i_stocktransportordertp , KBA , MM-PUR-PO-2CL , Purchase Orders (Public Cloud) , Problem
SAP Knowledge Base Article - Public