Use Case: All goods and invoice receipts are collected on GR/IR accounts. If amounts and prices match, they are automatically cleared by the system. However, not all items can be cleared automatically, for various reasons:
The GR/IR account reconciliation process is an exception-handling process for all purchase order items with differences between goods receipts and invoice receipts. This is a highly manual process that delays the period-end closing.
Service Type: This is a Machine Learning service which means machine is expecting training data. It does not mean that you need to create data, since the S/4HANA system is expected to have historical records of reconciled GR/IR accounts, and specifically manual assignments of purchase order items.
What is the outcome? The proposal service with machine learning automatically proposes next steps for items that could not be matched, based on the status and situation of a purchase order item. For intelligent GR/IR accounts reconciliation, proposals are made for Priority, Status, Root Cause, Processor, and Processing Department.
Configuration Steps:
Environment: S/4HANA 2023 FPS01 and BTP
Frontend : Fiori App Reconcile GR/IR Accounts.
Prerequisite: It is expected you have a sub-account in SAP BTP and have entitlements and quotas for subaccounts (refer to help doc if you need more info)
Provided you have the above the following steps are specific for the AI configuration:
In BTP-->Under Services-->Open Service Marketplace --> Choose Data Attribute Recommendation tile
Create a new service instance by choosing Create
Select the plan Intelligent Accounting, fill in the desired instance name and choose Create (since this is an internal system – I have “free” plan, please don’t expect the same at your end)
Select Next to create Service Key
Sample Code
{
"url":"",
"uaa": {
"clientid":"",
"clientsecret": "",
"url": ""
}
}
Review and click create
A json file will be created, please note the below for the next steps:
Host Name | url |
OAuth 2.0 Endpoint | uaa.url |
OAuth 2.0 Token Endpoint | uaa.url + “oauth/token” |
Username | uaa.clientid |
Password | uaa.clientsecret |
2. Create RFC Destination
In SAP S/4HANA system run transaction SM59 and create a connection of type G (HTTP Connection to External Server).
For example:
Ensure you do a connection test post saving the RFC, this will tell you if the host URL you entered is correct or not. I used the uaa URL
Run transaction OA2C_CONFIG and create the oauth client for the profile FIS_GRIR_ML, which consists of the client ID, client secret and URL specified in the step1 (JSON file)
In the Access Settings section of the client, select the following values:
Setting | Value |
Client Authentication | Basic |
Resource Access Authentication | Header Field |
Selected Grant Type | Client Credentials |
Run transaction S4ML_GRIR_SETUP, and specify the RFC destination DESTINATION_PROPOSALS that you created before (the program throws an error since it expect Health RFC as well, specify same RFC for both)
Activate the Save checkbox to save the configurations for use
3. Setup jobs
This is the last step, there are 3 jobs to be scheduled:
Training job
Call up transaction SM36 or choose System Services Jobs Define Job.
When choosing the job wizard for scheduling the training job, you enter a job name and choose Continue.
Choose ABAP program step and enter FIS_GRIR_ML_DAR_TRAIN as ABAP program name and choose Continue.
To set the running schedule according to your requirement, choose one of the start conditions for the job definition.
See Job log- if there is no data for training, the log will show 0 data selected. In order for machine to learn, there need to be some data set in the system
Inference Job
Call up transaction SM36 or choose System Services Jobs Define Job.
When choosing the job wizard for scheduling the training job, you enter a job name and choose Continue.
Choose ABAP program step and enter FIS_GRIR_ML_DAR_INFERE as ABAP program name and choose Continue.
To set the running schedule according to your requirement, choose one of the start conditions for the job definition.
Monitor Job
all up transaction SM36 or choose System Services Jobs Define Job.
When choosing the job wizard for scheduling the training job, you enter a job name and choose Continue.
Choose ABAP program step and enter FINS_ML_DAR_MONI as ABAP program name and choose Continue. (The guide has misspelled the job as FIS_ML_DAR_MONI -> please take note)
To set the running schedule according to your requirement, choose one of the start conditions for the job definition.
You might want to set the frequency for running this job to every 10 minutes
Output:
Once the model is trained, in the FIORI app you should be able to see proposals made for Priority, Status, Root Cause, Processor, and Processing Department. If there is no data these fields will remain empty on the app.
Let us know how you go at your end by adding your views under comments.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
17 | |
13 | |
12 | |
7 | |
7 | |
7 | |
7 | |
7 | |
6 | |
6 |