This blog post describes the procedure to display the payment due date on the output form of the manual invoice for Singapore. This extension scenario can be implemented using the
Adobe LiveCycle Designer and
Maintain Form templates App of SAP S/4HANA Cloud.
Scope
The scope of this extension is limited to SAP S/4HANA Cloud core financials only and does not cover customer invoices created from other modules like FICA, RE_FX, etc. This extension scenario is applicable to manual invoices and does not support other customer invoices posted using background jobs, EDI, etc. The scenario described below is relevant for
Create Outgoing Invoice App and it’s related PDF form. This does not cover any electronic files like XML, CSV format.
Prerequisites
You have administrative access to
SAP S/4HANA Cloud and have implementation experience on the system. This extension requires knowledge of working with Adobe LiveCycle Designer and FormCalc scripting language.
Localization Challenge
When a manual invoice is posted, the due date is computed automatically. The standard system does not provide a BAdI to read the automatically computed due date. However, a company may want to display the due date on the invoice form, which is sent across to their customer.
Solution Approach
The solution approach here is to compute the Due Date using the Payment Term and the Baseline Date, and display the same using a custom form template.
Disclaimer
When implementing this solution there may be situations wherein the payment due date communicated to the customer is different from the one captured in the system. Such a scenario may cause audit and compliance issues since the payment date in the system is earlier than what is communicated to the customer.
For example, the due date captured in the system during invoice posting is 30th March and the due date computed using baseline date and payment term is 5th April. In such a scenario, there is a delay in receiving the payment from the customer who might make the payment by the 5th of April and not 30th of March.
Since this is a custom logic implementation, it is at the discretion of the implementation partner to check the needs of its customers and provide the right implementation. SAP does not have a liability to support this custom implementation.
Implementation
- Download the form template corresponding to the SG manual invoice using the Maintain Form Templates App and edit the same using Adobe LiveCycle Designer.
- Create two hidden text fields and bind them to the BaselineDate and Zterm (payment term).
- Create the Due Date text field, set the value to Calculated-Read Only and scripting language to FormCalc. Refer to the code sample captured in the code snippet below.
Form.BodyPage1.TypeTxt.DueDate::calculate - (FormCalc, client)
//in this example payment terms are captured as PT00, PT02, PT15,
//PT30 representing 0,15 and 30 days)
var zTerm = Form.BodyPage1.TypeTxt.Zterm.rawValue;
var dateTerm = Substr(zTerm,3,2);
dateTerm = Floor(dateTerm);
var dateText = Substr(Form.BodyPage1.TypeTxt.BaselineDateText,0,10);
this.rawValue = Date2Num(dateText, "YYYY-MM-DD") + dateTerm;
this.rawValue = Num2Date(this.rawValue, "DD-MM-YYYY");
- Create a new customized form template to display the payment due date field on the invoice form.
- Navigate to Maintain Form Templates App to create a custom template for the invoice for Singapore.
- Provide the necessary details and the correct data source – FDP_J_1HKORDSG_SRV.
- Upload the modified XDP file.
- Print the invoice form.
- Navigate to Print Document Extracts App.
- Select the custom form template with the modifications for the payment due date field.
- Capture the other necessary information and execute the print program.
Conclusion
With the above approach, the newly created Payment Due Date field should now be visible on the output form of the manual invoice. Though this is not a fully integrated solution, I believe this caters to address the problem faced by our partners and provides an automatic way of printing the Due Date on the manual invoice output form.