S/4 HANA Schedule and monitor application related jobs
As most of the companies are moving to the S/4 HANA On-Premise.When you get a requirement to create a report which will perform month end posting especially in the S/4 Finance area.
How to you design an Application for such requirement.
Is it possible to Create a Ui5 App to perform both front end and month end background jobs moniter ? Yes but is it a good design as you have to do lot of reworks to make it work as a background job.
When i was going through certain Fiori Apps I found an interesting S/4 HANA standard Application Application Jobs from Fiori APP library : https://fioriappslibrary.hana.ondemand.com/sap/fix/externalViewer/#/detail/Apps(‘F1240’)/S14OP
Let explore the options in the above Appplication jobs
- How to create job template
Open the transaction SAPJ and then Create Job Catalog Entry Name .
There are three options which SAP Provided in the transaction SAPJ in the tab HEADER :
Report : SAP GUI Report Name
Class : In case you wanted to re-use the class for a Fiori App you can also provide class here
Chain : In case you wanted to take this run the chain of Jobs then go with this option
Check Class : ABAP class that is used to check the parameter values the user enters.To be able to use all methods that are pre-delivered and up-to-date make sure that the check class inherits from the abstract class CL_APJ_JT_CHECK_BASE.
Value help : In case of value help inherit the interface IF_APJ_RT_VALUE_HELP_EXIT will inherited for the F4 helps.
Delete Exit : In case if you want to delete the jobs after sometime Inherit the interface IF_APJ_RT_DELETE_JOB_EXIT
Text Exit : In case if you want to display the text IF_APJ_DT_JCE_TEXT_EXIT
Scoping Relevant :If a job catalog entry is defined as Scoping relevant, the application job component makes it available only in clients with a corresponding tuple (<client id>, <job catalog entry id>). These are maintained in the APJ_C_SCOPE table. If the flag is not set, the job catalog entry is available in all clients.
To divide the screen into different section use the tab Sections
To divide the selection screen into different Selection Screen Blocks using the Groups Tab
How to get the selection scree fields in the Jobs Dynamically ?
Click on the synchronise parameters the selection screen parameters from the Se38 Report are transferred here with out additional coding .
As you see the selection screen fields are transferred automatically and the grouping can be Done.
Other options can be referred from the below Link :
Now Save and the Job catalog is successfully created.
Job template :
In the same transaction SAPJ Do the Job catalog and Job Template Mapping :
You can also define the define values and the default Job Period granularity.
How to Access the job catalog from the Application Job APP :
Open the App Application Jobs and then click on the create button as shown in the below screen shot
Then by default there will be the first Job template also the Parameters will be displayed.
But when you select the Job template created by you then the parameters will be changed dynamically.
How do you scheduling your recurring Jobs :
In the Tab scheduling options :
The below options are possible
Single Run or Define Recurrence Patterns :
Daily or Weekly or Monthly ( end of the month or starting of the month/ working Day or Holiday)
You can also select the different Calender also the day light saving :
Once you schedule the job you can also check the job results logs and spools as shown below :
How Can i create a separate App for your own functionality ?
Create a Own Tile and target mapping and in the target mapping provide the below details :
Pass the job Category in the input parameter :
Any inputs are highly appreciated .
Great Blog.Thanks for sharing this!
Nice blog. Highly appreciated. May i know if the same applicable for s4 hana cloud version?. Any changes do we need to perform.
veera p : yes its the same the app is also available in cloud :
Nice blog. Do you know how to create a job with dynamic date calculation for selection field "Date"?
Hallo Pawel Polanski ,
You can use the below value help class to do that .
I have created the Custom Job Catalog and Job Template in SAP GUI.
When I am trying to create the Job template in Application Jobs App in Fiori , the Job Template value from GUI is not shown in Job Template in F4 help in Fiori.
Please suggest what we are missing in this.
I checked the table, the custom job template which I created is present in the table.
But this template is not shown in Step Name of Application Job Template App in Fiori.
When I check the standard Job Catalog is appeared on Fiori.
Do we need to activate any service to move the Custom Job templates in Fiori.
No if you create job template correctly on SAPJ then it should work .
Hi Vijay ,
We moved away from conventional SE38 report and build Fiori based report ( USing ABAP RAP OnPrem)
Is it possible to schedule Fiori Report as Batch Job.
I am not sure if you really understood the purpose of the application jobs application.It is a work around from SAP for SM36 and SM37 in SAP. If you already have your report in Fiori Launch Pad and can schedule from there directly using custom background job . When do you need an additional application ?
this is intended mostly for the SE38 reports .
i edited my previous job catalog entry and job template. i changed the report and sync as per my requirement. and in dev system it is working fine. but in cc2 cloud system it is giving an error job template does not exist. i checked it is available in scoping table also.
do i need to make any other configuration also?
Yes, i can see the job template in SAPJ transaction
Can we run a CDS view with this APP?
Not directly but if we use this CDS view in SE38 Report then yes.
Thanks and Regards,
Good blog . keep it up.
You cannot create your own catalog entries in transaction SAPJ any longer, this is reserved for reports delivered by SAP only. See note 2829891 for more information.
Is there any risk for new created a new job by customer in SAPJ? OP customer would benefit from this app for their custom report. It will provide an unified UX. If SAPJ is not possible, is there any plan to have another app to define new custom jobs in fiori app Application job?
@Olaf Wolter : I have updated the information already in the blog