SAP Ariba to SAP S/4HANA Integration – Retention Percentage Missing in Purchase Order (ME23N)

By Published On: March 20th, 20245.5 min read
Share Post
Retention Percentage Missing in Purchase Order (ME23N)
Table of contents

Hello Community, 

In the world of procurement management, where every detail matters, encountering a missing piece of information can disrupt the entire process. Picture this: a diligent procurement team diligently crafts purchase orders in SAP Ariba, only to realize that a vital piece of data is absent when they review the orders in the SAP S/4HANA system.  

This missing puzzle piece? The Retention Percentage. 

Introduction 

SAP Ariba is a cloud-based application that enables businesses to effectively manage their procurement processes and overcome procurement challenges. The Ariba network and S/4HANA system are integrated through SAP Ariba Cloud Integration Gateway (CIG), enabling the exchange of documents pertaining to standard procurement processes like Request for quotation, purchase order.  

We encountered a data missing issue during the exchange of purchase orders from Ariba system to S/4HANA system. While creating purchase order in Ariba system, the retention percentage is provided which is not reflected in purchase order screen (ME23N) of S/4HANA system. 

Addressing the Issue – Enhancement Implementation 

On inspection, we identified ARBCIG_BUY_PURCHORD_BADI as the Badi associated with Purchase order. While debugging this Badi, it was understood that the retention-percentage had not been updated in the required table and there was no support documentation for the Badi. 

 

Addressing the Issue - Enhancement Implementation 

 

Understanding ARBCIG_BUY_PURCHORD_BADI 

To tackle this issue, we must improve or modify the data for the create purchase order message by implementing an enhancement with assistance of the ARBCIG_BUY_PURCHORD_BADI Badi.  

The Retention percentage is provided for purchase orders either in header level retention type or item level retention type. The Badi, the retention percentage is getting updated in the EXTENSIONIN changing parameter table type of the badi. The fields VALUEPART1, VALUEPART2, and VALUEPART3 in EXTENSIONIN hold the retention type, retention percentage, and line-item number. 

 

Understanding ARBCIG_BUY_PURCHORD_BADI 

 

Determination of PO Retention Type 

Initially, we must determine if this PO is generated as a header or as an item level retention type by the Ariba system. To confirm this, we must examine the retention type and retention percentage data in the EXTENSIONIN table. If the VALUEPART1 (retention type) field contains the character ‘H’ and the VALUEPART2 (retention percentage) field is not initial, then PO is generated as a header level retention type. On the other hand, if VALUEPART2 is initial, then PO is generated as the item level retention type. 

 

Determination of PO Retention Type

 

Updating Retention Percentage for Header Level Retention

Once the retention type of the purchase order is identified, the retention percentage data must be updated in the corresponding internal tables as per the 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.

Step 1: The retention percentage in the EXTENSIONIN table must be passed to the RETENTION_PERCENTAGE field of the PO_HEADER1 changing parameter.

 

Updating Retention Percentage

 

Step 2: We must also ensure that in PO_POHEADERX changing parameter, The RETENTION_TYPE and RETENTION_PERCENTAGE fields must be marked with ‘X’.

 

Verification and Testing 

Now, we can find the retention percentage is updated in the display purchase order screen (ME23N) in SAP S/4HANA system. As it is Header level, all the items in purchase order will have the same retention percentage. 

 

Updating Retention Percentage for Item Level Retention

If the retention type is item level, the retention percentage is specifically assigned for each line item in the purchase order.

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.

Step 1: the retention percentage value must be updated in PO_ITEM and IT_BAPIMEPOITEM changing parameter. Based on the Line-item number, the retention percentage in the EXTENSIONIN changing parameter must be passed to the corresponding retention percentage fields of PO_ITEM and IT_BAPIMEPOITEM.

 

 

Step 2: We must also ensure that in POITEMX and IT_BAPIMEPOITEMX changing parameter, The RETENTION_TYPE and RETENTION_PERCENTAGE fields must be marked with ‘X’.

 

After implementing the above steps, we can find the retention percentage values are updated in the display purchase order screen (ME23N) of SAP S/4HANA system. 

Retention Percentage

Retention Percentage Missing in Purchase Order

Conclusion 

In conclusion, the meticulous enhancement of the ARBCIG_BUY_PURCHORD_BADI Badi enabled us to address the issue of missing retention percentage in ME23N effectively. This experience underscores the significance of maintaining precise procurement data for streamlined operations and informed decision-making. 

For further inquiries or assistance regarding SAP Ariba integration and procurement solutions, please reach out to KaarTech. Our dedicated team stands ready to provide expert guidance and support tailored to your business needs. 

 

FAQ’s 

Why is the retention percentage missing in ME23N? 

It may be missing due to a discrepancy in data transmission between SAP Ariba and S/4HANA. Specifically, an issue with the ARBCIG_BUY_PURCHORD_BADI could prevent the retention percentage from being updated in the required table. 

How can we determine if a purchase order is generated with header or item level retention type? 

To determine this, we examine the retention type and percentage data in the EXTENSIONIN table. If the retention type field contains ‘H’ and the percentage field is not initial, it’s a header level retention type; otherwise, it’s an item level retention type. 

What steps are involved in updating the retention percentage? 

After identifying the retention type, we update the corresponding internal tables accordingly. For header level retention, we pass the retention-percentage to the RETENTION_PERCENTAGE field of the PO_HEADER1 changing parameter. 

How can we ensure correct display of the retention percentage in ME23N? 

To ensure it is displayed accurately in ME23N, it’s essential to mark the relevant fields with ‘X’ in the changing parameters (PO_POHEADERX, POITEMX, IT_BAPIMEPOITEMX). 

  

Sai

Stay in the loop

Subscribe to our free newsletter

Related Articles