PO Retention Percentage Change in SAP Ariba is not Reflecting in ME23N

By Published On: March 21st, 20246.4 min read
Share Post
PO Retention Percentage Change in SAP Ariba is not Reflecting in ME23N
Table of contents

Hello Community,

Ever encountered a situation where you meticulously update  PO retention percentages in your SAP Ariba system, only to find them missing when you view the purchase order in ME23N (display purchase order screen) of SAP S/4HANA?  

You’re not alone! This common integration hiccup can be a source of confusion and delay procurement processes. 

But fear not, there’s a solution!  

This blog post dives into the root cause of this mismatch and provides a step-by-step guide to implementing an enhancement in the ARBCIG_BUY_ORDCHANGE_BADI. With this fix, you can ensure seamless synchronization of retention percentages between your Ariba and S/4HANA systems, streamlining your procurement workflows and saving valuable time. 

Introduction 

SAP Ariba, a cloud-based procurement solution, integrates seamlessly with SAP S/4HANA through the SAP Ariba Cloud Integration Gateway (CIG). This integration enables the smooth exchange of documents, essential for typical purchase order processes. 

Identifying the Issue: 

SAP Ariba enables us to modify the retention percentages in the purchase order. However, we encountered an issue during the modification. The modification in the purchase order of Ariba system is not reflected in the display purchase order screen (ME23N) of the SAP S/4HANA system. 

Understanding the Solution: 

Initially, we identified the ARBCIG_BUY_ORDCHANGE_BADI as the Badi associated with change purchase order. In Badi, the method PUBLISH_PO_CHANGE is used to modify the change purchase order request. After debugging, it was identified that the change of retention percentage is not getting updated in the required table. 

 

Understanding the Solution - PO Retention Percentage

 

The change in retention percentage is updated in the EXTENSIONIN parameter however, based on whether it is header level or item level purchase order, the changed retention percentage values must be updated in PO_HEADER, BAPIPOHEADER, PO_ITEMS and BAPIPOITEM parameters.  

 

PO Retention Percentage

PO Retention Percentage 2

 

To resolve this, we must implement an enhancement to the Badi ARBCIG_BUY_ORDCHANGE_BADI. Firstly, to identify whether the purchase order is header level or item level purchase order, we must check the retention type and retention percentage fields in the EXTENSIONIN table. The fields VALUEPART1, VALUEPART2, and VALUEPART3 in the Badi ARBCIG_BUY_PURCHORD_BADI’s EXTENSIONIN changing parameter hold the retention type, retention percentage, and line-item number.  

 

PO Retention Percentage 3

 

In the EXTENSIONIN table, if the valuepart1 (retention type) field contains ‘H’ and if the valuepart2 (retention percentage) is not initial, then the po is header level. Whereas if the value part2 (retention percentage) is initial, then po is the item level. The retention percentage data must be updated in the relevant internal tables in accordance with the purchase order’s retention type once determined. 

read EXTENSIONIN where STRUCTURE = ‘RETENTION’ and RETENTION_TYPE = ‘H’  

if RETENTION_PERCENTAGE has value 

“It is Header level purchase order” 

else 

“It is item level purchase order” 

Purchase Order with Header level Retention Type 

For a Header level retention type, In the EXTENSIONIN table the valuepart1 (retention type) field contains ‘H’ and the valuepart2 (retention percentage) is not initial. then below two steps must be implemented. 

 

Purchase Order with Header level Retention Type 

 

The retention type and percentage information from the EXTENSIONIN table must be given to the PO_HEADER and BAPIPOHEADER table’s RETENTION_TYPE and RETENTION_PERCENTAGE fields.  

If RETENTION_PERCENTAGE has value and RETENTION_TYPE = ‘H’ 

PO_HEADER-RETENTION_PERCENTAGE = EXTENSIONIN-RETENTION_PERCENTAGE 

BAPIPOHEADER-RETENTION_PERCENTAGE = EXTENSIONIN-RETENTION_PERCENTAGE 

 

Purchase Order with Header level Retention Type 

Purchase Order with Header level Retention Type 
 

Additionally, we must confirm that the BAPIPOHEADERX table’s RETENTION_TYPE and RETENTION_PERCENTAGE entries are both marked with a “X.” 

 

Purchase Order with Header level Retention Type 

 

After all the above steps were implemented. In the Ariba system, the purchase order of the Header level retention type previously had retention percentages of 25% which is modified to 20%. Now in the below images of display purchase order screen (ME23N) we can find the recent revisions to these retention rates have been incorporated. 

 

Purchase Order with Header level Retention Type 

 

Purchase Order with Item level Retention Type 

For an item level retention type, In the EXTENSIONIN table the valuepart1 (retention type) field contains ‘H’ and the valuepart2 (retention percentage) is initial. then below two steps must be implemented. 

 

Purchase Order with Item level Retention Type 

 

The retention percentage information in the EXTENSIONIN table needs to be supplied to the appropriate RETENTION_PERCENTAGE column of PO_ITEMS and BAPIPOITEM, depending on the item level number.  

If RETENTION_PERCENTAGE has no value and RETENTION_TYPE = ‘H’ 

PO_ITEMS-RETENTION_PERCENTAGE = EXTENSIONIN-RETENTION_PERCENTAGE 

BAPIPOITEM-RETENTION_PERCENTAGE = EXTENSIONIN-RETENTION_PERCENTAGE 

 

Purchase Order with Item level Retention Type 

Purchase Order with Item level Retention Type 

 

In BAPIPOITEMX, we also need to make sure that the RETENTION_PERCENTAGE column is indicated with a ‘X’. 

 

Purchase Order with Item level Retention Type 

 

After all the above steps were implemented. In the Ariba system, the purchase order of the item level retention type previously had three-line items with retention percentages of 16%, 10%, and 11%, which is modified to 27%, 42% and 30%. Now in the below images of display purchase order screen (ME23N), we can find that the recent revisions to these retention rates have been incorporated. 

 

Purchase Order with Item level Retention Type 

Purchase Order with Item level Retention Type 

Purchase Order with Item level Retention Type 

 

Validation and Testing:  

Before concluding the implementation, thorough validation and testing are necessary to ensure that the changes have been successfully incorporated into both SAP Ariba and SAP S/4HANA. Only after confirming the accurate display of retention percentages in the ME23N screen can, we consider the issue resolved. 

Conclusion:  

In conclusion, resolving the discrepancy between retention percentages in SAP Ariba and SAP S/4HANA is necessary for maintaining the integrity of procurement processes. By implementing the outlined solution and ensuring proper integration between these systems, businesses can effectively manage their purchase orders and mitigate potential discrepancies. 

Next Steps:  

We encourage all users facing similar issues to implement the proposed solution in their SAP Ariba systems. Should further assistance be required, our team at KaarTech is readily available to provide support and consultation to ensure seamless procurement operations. Contact us today! 

Additional Resources:

For further reading or assistance, please refer to the following resources: 

 

FAQ’s  

What is the main issue addressed in this blog? 

The blog addresses the issue of retention percentage changes made in SAP Ariba not reflecting in the ME23N display purchase order screen of SAP S/4HANA. 

How is the issue resolved? 

The issue is resolved by implementing an enhancement to the ARBCIG_BUY_ORDCHANGE_BADI, ensuring proper synchronization of retention percentages between SAP Ariba and SAP S/4HANA. 

What are the key steps involved in resolving the issue? 

The key steps involve identifying the root cause of the issue, implementing enhancements to the relevant BADI, and ensuring proper updating of retention percentage values in internal tables based on the purchase order’s retention type. 

How can users validate the resolution of the issue? 

Users can validate the resolution by conducting thorough testing to ensure that the changes are accurately reflected in both SAP Ariba and SAP S/4HANA, particularly in the ME23N display purchase order screen. 

 

 

 

Sai

Stay in the loop

Subscribe to our free newsletter

Related Articles