With SAP S/4HANA and margin analysis, you can take advantage of predictive accounting functionalities.
Finance departments must deliver real-time insights and analyses to be able to manage in a highly competitive market. Predictive accounting goes one step further and delivers predictive insight. The objective of predictive accounting is to advise and support a strategy through predictive and prescriptive analytics.
A large number of period-end tasks is shifting from the end of the period to the actual moment of the transaction. Predictive accounting can be seen as your strategic advisor in doing this. You might think that sounds like planning, but there is a difference between predictive data and planning data. Planning data defines what you would like to happen based on your company’s goals, whereas predictive data shows you what current data tells you about the future.
Predictive Logic in SAP S/4HANA
There are two different types of predictive logic that are applied in SAP S/4HANA.
The first, top-down predictions, is the application of machine learning for the analysis of large amounts of historical data. It is used to predict future values considering trend, cycles, and/or fluctuation. There is no drilldown functionality on predictive data that has been created with top-down predictions as the algorithms that are the basis for this kind of data are not self-explanatory. Top-down predictions are not limited to margin analysis or financial accounting at all, but can be applied across all modules. Top-down predictions are also known as predictive analysis.
The second, bottom-up predictions, were introduced with SAP S/4HANA 1809 and their task is to interpret the future document flow of existing documents as part of an individual business process. That means they analyze transactions and determine the future outcomes based on the data that is already available in the system. Bottom-up predictions basically enrich and enhance actuals with additional information. In contrast to top-down predictions, you can drilldown on bottom-up predictions and slice and dice the predictive data in all dimensions. The bottom-up predictions are also known as predictive accounting.
In the next sections, I want to give you an overview of existing and upcoming functionality for predictive accounting in margin analysis.
Predictive Accounting: Sales Order Stock
A prerequisite for predictive accounting is the creation of an extension ledger and the activation of it in margin analysis. In this post you will learn which configuration settings are necessary to create predictive insight by creating a profitability segment for incoming sales orders and their cost of goods sold (COGS). The predictive insight fulfills the requirements of the continuous accounting and allows faster decision making as you can react to increasing/decreasing demand in time.
To activate the predictive accounting for sales processes, follow the configuration path Financial Accounting > Predictive Accounting > Activate Predictive Accounting for Sales Processes. Navigate to your Controlling area (CO Area) and select the Column Sales Processes from the drop-down menu Active, with the date of entry. In the figure below, I show how to activate predictive accounting for sales processes in Controlling Area Z100. After you have activated predictive accounting in your controlling area, save your changes with Save or CTRL+S.
Define Sales Order Item Categories for Predictive Accounting
After we activate predictive accounting for sales processes, we need to define the sales order item categories for which the predictive journal entries shall be created. Only the sales order item categories that are maintained in the configuration will be considered in predictive accounting.
Follow the configuration path Financial Accounting > Predictive Accounting > Activate Predictive Accounting for Sales Order Item Categories to activate Sales Order Item Categories for predictive accounting. With New Entries or F5 you can add Sales Order Item Categories for activation. In the figure below, I activated predictive accounting for sales order item category TAN – Standard Item by clicking the checkbox in the activate column. I did not activate the sales order item category for TANN – Free of Charge Item as we do not create any revenue when shipping a free of charge item. Please note that the system also will not create a predictive journal entry for anticipated costs of free of charge orders.
If you want to make sure that you capture all sales order item categories in the figure above, you can use Get Missing Item Categories to include all sales order item categories. With Activate All or Deactivate All you can mass activate or deactivate all item categories at once. It is highly recommended to work together with your colleagues in the sales department on the activation of the sales order item categories to make sure you capture all of them correctly and completely to have meaningful predictive accounting. After you maintain all sales order item categories for predictive accounting, save your changes with Save or CTRL+S.
Predictive Journal Entry
When a sales order is saved, a program starts running in the background to create the predictive journal entry. The program is checking the configuration and master data and detects any errors early. If there are any errors, no predictive journal entry will be created. The system also checks for follow-on documents to the sales order and derives predictive journal entries for those. For the sales orders, it is checking if there is a goods issue following and therefore if COGS have to be derived to the extension ledger or not. There is no additional configuration necessary for this step.
Sales Order Creation
Let’s now create a sales order and see if the system is creating a predictive journal entry. In the figure below, we see sales order 1820 with a net value of 3,430.00 USD. We created a sales order with item category TAN, which we activated for predictive accounting earlier. You can also see in that the requested delivery date was determined to be 23.05.2020. The posting date of the predictive journal entry is determined by the goods issue date if the sales order is configured for delivery-related billing. Another important characteristic in the figure below is the overall status. If it is, for example, blocked, no predictive journal entry is getting created. The status of our sales order is open, so we expect a predictive journal entry for sales order 1820.
Review Goods Issue Date
Let’s double check the goods issue date in the sales order to be sure about the posting date of the predictive journal entry. Go to Schedule Lines for Item to find the scheduling details of the item. Double click on the delivery date and navigate to the Shipping tab. In the next figure, you can see that the goods issue date on the line item is 25.05.2020. This is the date we expect as the posting date in the predictive journal entry. The requested delivery date from earlier seems to not have been updated correctly.
Sales Order Document Flow
Unfortunately, we do not see predictive journal entries in the document flow. There is an SAP Fiori app (shown below) used to display predictive accounting documents. The predictive journal entries are displayed in a list view by item. I want to bring your attention to some additional characteristics of a predictive journal entry: why we go straight to the table view and display the predictive journal entry in ACDOCA.
Search for Predictive Journal Entry
You can search for your predictive journal entry with the sales order number. In the figure below we are searching for the predictive journal entry by entering the sales order we created in the field SRC_AWREF. (All logistic reference information for predictive journal entries is stored in fields starting with SRC_*.) There are no entries in table BKPF for the document header for predictive journal entries. All reports and SAP Fiori apps have been adjusted to show predictive data as actuals. For the audit trail you can drilldown to the source of the document or add an additional column for the source ledger to be able to differentiate between actual and predictive journal entries.
Review Predictive Journal Entry
In the next figure we have a look at the predictive journal entries the system has created.
Let’s have a look at the following columns:
- DocumentNo: The document number of the predictive journal entry is a technical number. You do not have to maintain any number ranges for predictive journal entries; the system gives the predictive journal entries a technical document number.
- Src*: All columns starting with Src* are for the storage of the link to the logistics reference documents. In our example we see the columns SrcRefTrn (Source Reference Transaction) and SrcRefDoc (Source Reference Document) as well as ScRelIt (Source Reference Item) filled. We see the sales order number and the sales order item number of the sales order created earlier.
- ObsR: The column obsoleteness reason tells you if the line item is part of a current active prediction or outdated. The following entries are possible in this column:
- blank - active prediction
- 1 - outdated prediction
- 2 - cancellation of outdated prediction
- 3 - reduction posting
- Posting Date: The posting date is for delivery-related billings derived from the goods issue date. For debit and credit memos the posting date equals the actual date of the creation of the sales order.
- Date: The document date is the date the sales order has been created. All currency conversions will be converted with the date at the time of the order entry date.
- S: If the document status (BSTAT) is P the document is a predictive journal entry.
What else do we see in the above figure? We can see in the column Amnt in TC (amount in transaction currency) the value of 3,430.00 for the sales order we created with the GL account 12100000. The GL account 12100000 is the receivables GL account. We also see the following in this table:
Goods Issue Posting
Let’s post the goods issue of the sales order and see what changes happen in predictive accounting. In the following figure you can see the document flow of sales order 1820. The goods issue has been posted with material document 4900001512.
What has happened in ACDOCA, the Universal Journal with our predictive universal journals the system created earlier, when we were saving the sales order? The next figure shows that the initial predictive journal entry for the COGS was reversed and that there is an entry of 3 = Reduction Posting in column ObsRsn.
Billing Invoice Posting
What happens to our predictive journal entry if we post the billing invoice? In this figure you can see that the billing invoice has been posted with document number 90000587.
Reversal of Predictive Journal Entry
What changes will we see now in ACDOCA? We saw earlier that the initial predictive journal entry for the billing invoice was reversed and that there is an entry of 3 = Reduction Posting in column ObsRsn. The total of the predictive journal entry for sales order 1820 is now zero, as the sales order has been completed.
Adjustments to the Sales Order
What happens with the predictive journal entry if there are adjustments made to the sales order? In the next figure you see the documents of a sales order where we adjusted the sales quantity after the sales order was saved. The document with the blue frame and the ObsRsn 1 for outdated prediction is the initial predictive journal entry for the sales order. The document with the orange frame and the ObsRsn 2 for cancellation of an outdated prediction is the cancellation of the initial predictive journal entry. The document with no frame and a blank in column ObsRsn is the new predictive journal entry with the adjusted quantity. The system is not able, yet, to create reversals at the line item level. If there is an adjustment to the sales order the complete predictive journal entry will be cancelled. SAP is working on enabling the reversal on a line item level and the functionality can be expected in one of the next SAP S/4HANA releases.
Archiving Predictive Journal Entries
You might think that there is a huge number of documents created with predictive accounting. Predictive journal entries can get archived with archiving object FINS_PRED.
In production it is possible that there is a balance between the predictive journal entries; for example, when there has been a rounding difference or a currency difference. With report FINS_PRED_FIN_REDUCTION those differences are cleaned up and a zero predictive balance for completed orders is guaranteed. In SAP S/4HANA Cloud a job for this report is scheduled automatically as soon as predictive accounting is activated. In the on-premise version of SAP S/4HANA you have to manually schedule the job and there is no selection screen for the report. You just need to schedule the execution.
Repost Predictive Journal Entries
In case you transitioned to SAP S/4HANA without activating predictive accounting and decide at a later time to activate it, you can do so. You can repost previously created sales orders into predictive accounting with report FINS_PRED_REPOST. In the next figure you can see the selection screen for the reposting of predictive account data. You should at least enter the sales organization as a selection criteria, as otherwise the system will not find any data to repost. The settings found in the figure are recommended for a test run to repost predictive accounting data for all sales organizations in the system. You can execute the report with Execute or F8.
Protocol of Reposting Predictive Journal Entries
In the next figure you can see the log of the report to repost predictive accounting documents. The system processed 13 documents—four documents were processed successfully, four documents were ignored as they already exist, and five documents could not be transferred as they’re erroneous. You can see in the report the reason why the documents could not be transferred; usually the reason is master data or configuration related. Once you analyze the results and correct all the error messages you can go back with F3 to the selection screen and execute the report again.
Migration of Predictive Accounting
As of now, the migration of predictive journal entries is not supported and no history of incoming sales orders can be displayed. It is recommended to also use the report FINS_PRED_REPOST if you happen to migrate to a new system.
Predictive accounting with SAP S/4HANA Finance is an important piece of functionality that companies can use to streamline daily processes such as accounting for incoming sales orders. In this post, we talked about predictive logic and what it brings to a system. Then we looked at how to set up, test, and push the functionality live. Will you be enabling predictive accounting in your SAP S/4HANA system? Let me know in the comments!