Skip to Content
Technical Articles
Author's profile photo Prashanth Kothapally

Retention Process Configuration & its Process Flow

Hi Friends,

I’m Prashanth Kothapally. I have over 10 years of experience in Manufacturing, Construction and Oil & Gas refinery industries.

The purpose of this blog post is to have a clear understanding of Retention concept, its process flow in SAP and configurations required. One should have basic knowledge on creation of Purchase Order, MIGO & MIRO transactions for a better understanding of this concept.

Retention concept is used to retain (hold) some percent of amount from the amount due to the vendors. This is generally done to ensure that a vendor perform all obligations under the terms and conditions. This retention amount will be released on a specified date that vendor has agreed with respect to the fulfillment of all the obligations by the vendor from the performance.


1. As a first step we need to Activate Business Function LOG_MMFI_P2P through T-Code SFW5 as shown in below screen

Once the business function LOG_MMFI_P2P is activated, system opens up certain features, additional tabs and configuration paths related to this process.


2. Now we need to assign Document Type for retention because when invoice is posted, another accounting document is generated for Retention amount.

T.Code OMR4 (Path: SPRO – IMG – Materials Management – Logistic Invoice Verification – Incoming Invoice – Number Assignment – Maintain Number Assignments for Accounting Documents)

Click on “Document Types in Invoice Verification


Choose Transaction Code MIRO and click on Details


Now provide document type at DType. Ret. field as per your requirements as shown in below screen


3. Now we will create a Purchase Order using T-Code ME21N. We can see a tab “Payment Processing” in Header area. Here we can select Retention from dropdown either Applicable (Header Level) or Applicable (Item Level).

When we choose Retention Applicable (Header Level), beside that a new field appears “Retention” where we maintain retention% as shown in below screen.


Once we choose Retention Applicable (Header Level) and provide the percentage, same percentage is applicable for all the items in order at Item level in Invoice tab and we cannot change that percent at Item level as shown in below screen.


If we choose Retention Applicable (Item Level) in Header area, then we need to provide retention percent at Item level for all the items individually in Invoice tab. In this option, we can choose different retention percentages for different items as shown in below screens.


Here as an example we have considered Purchase Order with Retention Applicable (Item Level), 5% for 1st item & 10% for 2nd item as shown in below screens.

After filling all the required details in order, Save it.


4. Create Goods receipt using T-Code MIGO. After filling all the required details like Purchase order No, Date, Quantity, Storage Location, post the document. Here one accounting document is generated as shown in the below screen.


5. Now Post the Invoice using T-Code MIRO. Fill the required details like Invoice Date, posting Date, Purchase Order No and click Enter. As the Purchase Order is consisting of Retention percent, a pop up window appears showing information that the document is relevant to retention as shown in below screen.


In invoice screen, at Items area we can find Retention in Doc Cry, Retention % columns where we have a provision to edit the retention% (We can restrict edit option by configuration)


Enter Amount & Retention Due Date fields and click enter. Make sure no error messages are left and click on simulate button. We can see a Warning “Retention Amount ______ INR as shown in below screen.

Below screen is Accounting entry preview and then Post the Invoice.


6. Open the posted Invoice and click on Follow-on documents. There we can see two accounting documents generated.


Below accounting document is related to Retention.


Below document is vendor posting accounting document


Now we have completed the Invoice process. Based on retention due date, retention amount can be released to the Vendor through payment transactions.


We can also set some other configurations based on requirements through the following path

SPRO – Materials Management – Logistics Invoice Verification – Incoming Invoice – Retention


Through Define Default Due Date for Retention, we can define default duration for Retention Amount at Material Group level as shown in below screen


By using Define Tax Handling for Retention, we can define whether Retention is to be calculated on Net or Gross and also we can define whether withholding tax is included in retention document.


By using Define Control Parameters for Retention, we need to assign Special G/L Indicator that we configured earlier for Retention to the respective Company Code. And here we can define Retention Due date is Required or optional.


Important Points:

  1. Activate Business Function LOG_MMFI_P2P
  2. Need to configure a Special G/L Indicator for Retention which will allow deduction of retention money from Vendor Account to Special G/L Account.




For any queries please add a comment through “Add Comment” button at bottom of this blog post or you can also Ask a Question by using the following link


Hope this blog post is helpful to you and Please Like, Share and Comment on anything else you want to share or add points..


Thank you





Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Farid Azzi
      Farid Azzi

      Useful blog. thanks for the effort and for sharing you knowledge.

      Author's profile photo Prashanth Kothapally
      Prashanth Kothapally
      Blog Post Author

      Thank you Farid Azzi

      Author's profile photo MURALI REDDY BATTU

      Thanks for your efforts Prashanth. It is useful blog

      I have a question that how this retention money will be released to vendor at the end of contract/project. Retention money get credited to security/retention money deposit account. so how this can be released to vendor . what is the entry?. Is system generate any automatic entry at the end?





      Author's profile photo MOHAMED PERVIZ


      How the Process in SAP S 4HANA CLOUD for Customer retention deduction ( 5%) in every invoice.

      Entry should be :

      Receivable  Dr. 95

      Retention    Dr. 05

      Revenue               Cr. 100

      Author's profile photo Sriram Raghunathan
      Sriram Raghunathan

      Thank you for the explanation.... Earlier document retention type was RG and now it is KA....

      Author's profile photo 3rd Party
      3rd Party

      Excellent piece of work Dear..