Introduction
Managing supplier down payments and clearing them against supplier invoices in SAP S/4HANA Public Cloud involves several manual activities. Users need to identify the relevant invoice, find the correct open down payment, associate it with the invoice, and complete the clearing process in SAP. When this is repeated across a high volume of invoices, it can become time-consuming and increase the possibility of selection errors.
However, the standard API capabilities do not support the required down payment clearing process, making it necessary for users to perform the clearing activities manually in SAP.
For a leading Israeli power and renewable energy producer, the recurring volume of supplier transactions made this process a significant manual effort. The requirement was to make the process more efficient by reliably associating the relevant down payment with each invoice and automating the repetitive clearing activities that followed.
To address this, an automation was implemented using SAP Build Process Automation (BPA) with SAP S/4HANA Public Cloud. The solution captures the required reference in the invoice, identifies transactions ready for clearing, and automates the subsequent clearing activities.
Solution Overview
The solution extends the standard clearing process by combining custom SAP functionality with automation. The required down payment information is captured during invoice processing and later used by BPA to identify and process the relevant transactions.
The implementation consists of three key elements:
- Custom Down Payment Field on the Supplier Invoice
- Custom CDS View for Down Payment Value Help
- SAP Build Process Automation Bot for Automated Invoice and Down Payment Clearing
1. Custom Down Payment Field on the Supplier Invoice
A custom field was added to the Supplier Invoice screen to capture the Down Payment ID that needs to be cleared against the invoice.
The field was configured with Value Help, SAP's search and selection functionality, so users can choose a down payment from an available list rather than manually entering its ID.
A supplier may have multiple open down payments. To make the selection more efficient and reduce the possibility of choosing an unrelated document, the available options are filtered based on the supplier associated with the current invoice.
Once the required Down Payment ID is selected, it is stored against the supplier invoice. This reference is then available for the subsequent automated processing.

2. Custom CDS View for Down Payment Value Help
A custom CDS (Core Data Services) view was developed as the data source for the Down Payment Value Help.
The view identifies the supplier associated with the current invoice and retrieves the corresponding open down payments. This ensures that the selection presented to the user contains only relevant Down Payment IDs.
This CDS view therefore provides the data required to support the supplier-specific selection in the custom field.

3. Custom CDS View for BPA Processing
A separate custom CDS view was created to provide the BPA bot with the information required for automated processing. The view identifies supplier invoices that are pending clearance and provides the Down Payment ID stored against them. This information is exposed through an OData service, allowing BPA to retrieve the relevant records directly from SAP. The API uses the clearing status and availability of the down payment reference to identify the transactions that are ready for processing.
For example:
"https://TenantURL.sap/sap/opu/odata/sap/YY1_CLEAROUTGOINGPAYMENT_CDS/YY1_ClearOu
tgoingPayment?$format=json&$filter=ClearingDate eq null and YY1_downpaymenta1_MIH gt '0'"
The resulting data gives BPA the required invoice and Down Payment information to proceed with the automated clearing.
4. SAP Build Process Automation – Automated Clearing
The SAP Build Process Automation (BPA) bot retrieves the pending transactions through the SAP S/4HANA Public Cloud OData API and uses the returned information to process them.
The bot then navigates to the Clear Outgoing Payment application in SAP S/4HANA Public Cloud. Using the information retrieved through the API, it identifies the relevant company code and supplier, selects the required documents, validates the open-item information, and executes the clearing posting.
The interaction with the SAP application is handled through BPA screen recording, enabling the bot to recognize the required screens and UI elements and perform the defined actions.

Clear Outgoing Payment



Automation for Screen recording
5. Why SAP Build Process Automation Was Used
The solution required two different capabilities: retrieving the required transaction information through an API and interacting with the existing Clear Outgoing Payment application. Since the standard APIs do not support the required down payment clearing process, the solution had to combine API-based data retrieval with actions in the existing SAP application.
The custom CDS view and OData service provide the required data, while BPA uses that information to perform the corresponding actions within SAP S/4HANA Public Cloud. This made SAP Build Process Automation a suitable choice to connect the available APIs with the existing clearing functionality and automate the process without replacing the standard Clear Outgoing Payment application.
End to End Process

Benefits
- Lower manual effort: Reduces the repetitive work required to process and clear supplier transactions.
- Fewer selection errors: Links the invoice to the relevant down payment through a defined reference.
- Faster processing: Automates routine clearing activities that would otherwise require manual intervention.
- Consistent execution: Applies the same clearing logic and sequence across transactions.
- Improved scalability: Supports higher transaction volumes without a proportional increase in manual workload.
- Preserved SAP functionality: Automates the existing Clear Outgoing Payment application instead of introducing a separate clearing solution.
Conclusion
The success of this solution lies in turning a recurring, manual finance task into a controlled and repeatable operation. Instead of relying on users to repeatedly carry the same workload, the required information is captured once and then carried through the automation, allowing the clearing activity to be completed with far less manual intervention.
More importantly, the approach demonstrates how SAP S/4HANA Public Cloud can be extended around existing business processes without disrupting the standard functionality already in use. By combining targeted customisation with SAP Build Process Automation, the solution creates a practical path to improve operational efficiency while keeping the underlying financial process familiar and manageable for the business.


