Product Information
SAP S/4HANA Cloud for advanced financial closing: How can tasks of type Job be automatically scheduled as Test Run?
Background:
AFC is a financial close solution that brings a high level of automation into the process. One of the key features of AFC is the ability to automatically trigger, execute, and report back on the execution of ABAP programs and jobs. Did you know that AFC is the only solution that can automate complex chains of jobs in SAP S/4HANA Cloud Essentials? When customers set up their closing structures, they often build chains and networks of automatic job executions. One well-known example is the area of fixed asset accounting. Here, customers sometimes want to first start the asset depreciation posting run in test mode and check the results before they execute the program in update mode.
AFC supports the described scenario in different ways. While closing tasks of task type Job can be manually executed as test run by using the relevant button, I want to outline in this blog how automatic scheduling by means of the Starts Immediately option can be achieved in test mode.
Manual Test Run
First, most SAP-delivered task models of task type Job have the attribute “Test Run Possible = Yes”.
Testrun-Possible-flag of Closing Tasks of type Job
Technically, the “Test Run Possible = Yes”-attribute is controlled by the SAP-managed parameter type TESTR (“Test Run”), which is assigned to most of the standard closing programs in SAP delivered program registration variants.
These closing tasks support the action “Execute Test Run” in AFC.
Action button Execute Test Run in AFC
Note: If the “Starts Immediately”-option is also flagged for this closing task and the task is scheduled automatically, the Closing Task is always scheduled in update mode once predecessor tasks have been complete and the planned start time has passed.
Automatic Test Run
If you want closing tasks to be scheduled automatically in test mode, the relevant program parameters must not be controlled by the SAP-managed Parameter Type TESTR (“Test Run”). Instead, the Test Run parameter must be flagged active in the program registration and you need to create a separate task model for this purpose. You can achieve this result by taking the following steps:
- Register an additional Program Variant with the parameter “Test Run” always active as follows:
- Go to Customizing for Advanced Financial Closing – Local Settings (transaction SPRO, press F5, choose Cross-Application Components -> Advanced Financial Closing – Local Settings) and run the Customizing activity Register Programs for Parameter Mapping.
- Select the relevant Program with any assigned Variant ID and click the “Copy-As…” button
or choose F6.
- Enter a new, customer specific Variant-ID (e.g. “ZZTESTVARIANT”) and enter a meaningful Short Description in which the Program Variant is designated as for test mode only, e.g. “Depreciation Posting Run (Test Mode)”.
- Select the combination of program and variant ID, and then access the Parameter Maintenance subdialog. Pay attention to the Test Run parameter: it will typically be already assigned to the parameter type TESTR. Remove this Parameter Type assignment and select the parameter:
Then access the Parameter Value Maintenance subdialog. Choose New Entries (or F5). Enter “Include” in column Sign for Ranges, “Equals” in the Range Option column and “X” as the value in the Parameter Low Value column.
-
- Save the registration of the new program.
- Define a new Closing Business Transaction Type.
- Choose the activity Define Closing Business Transaction Types.
- Click New Entries (or F5) and enter a suitable ID in the Closing Business Transaction Type column, e.g. ZZFADEPRUN for the fixed asset depreciation run, and provide a meaningful description, e.g. “Depreciation Posting Run (Test Mode)”. Choose Task Type Job and enter the program name of the program registered in step 1.
- Save your entries.
- Define a Task List Model as follows:
- Run the Customizing activity Define Task List Model.
- Click New Entries (or F5).
- Enter a Task Model ID, e.g. “ZZFADEPRUN”, the appropriate closing business transaction type (e.g. “ZZFADEPRUN”), the variant, in which the program has been registered in Step 1, and a meaningful description, e.g. “Depreciation Posting Run (Test Mode)”. Mark the closing types Month-End, Quarter-End, Year-End as desired. Enter the appropriate application component and select the context Entity Close .
- Save your entries.
Upon synchronization of the respective communication system with your Advanced Financial Closing application, the newly created task model can be referenced, and a corresponding closing task can be created in your task list template (Create Task from Model). This Closing Task of task type Job will be executed in test mode, when scheduled.
Good to know:
You can familiarize yourself with how to use the Define Closing Tasks app and how to process Closing tasks using the following videos:
For more information on SAP S/4HANA Cloud, check out the following links:
- SAP Community Page for Advanced Financial Closing: here
- SAP Help Portal for AFC: here
- AFC in the SAP Roadmap Explorer: here
- SAP.com page about AFC: here
Follow us via @SAP and #AdvancedFinancialClosing, or myself via Michel Loehden