Scheduling SAP HANA XS JOB – Part 1

Welcome to the next tutorial on your road to become an SAP HANA Expert. I hope I’ve been able to keep the concepts and their explanations at a level that’s easily understandable to everyone. A completely free and up-to-date online knowledge portal for SAP HANA has been my prime objective from the beginning. Our previous tutorial explained how to create an XS job. Now it’s time we learnt the process of scheduling SAP HANA XS JOB in . We will use the same job we created in the previous tutorial Creating XS JOB . It had an input parameter for material number and called a stored procedure to populate the sales log table for this material number.

Once jobs are created, they need to be activated in the XS JOB Scheduler. Only creating the job in HANA is doesn’t start the job by itself.

Note: XS Job Scheduling is usually done by SAP HANA admins and is not a developer’s job. A developer’s job should end ideally at the XS JOB creation and in most cases may not even have the privileges to do this activity as per the roles granted to his/her user. So, if you are a developer and and you see that the below activities are blocked for you, contact your SAP HANA administrators and request them to run the XS JOB you created. All they would need if the XS Job name and the package name under which you created it.

Scheduling SAP HANA XS Job via Design time object

Scheduling an XS Job isn’t done in SAP HANA Studio. It is done in internet browsers. I am using google chrome in this example but you can use any browser here.

The below URL will open up our XS JOB Scheduler.

http://<WebServerHost>:80<SAPHANAinstance>/sap/hana/xs/admin/jobs

Replace the <WebServerHost> with your SAP HANA hostname and also replace <SAPHANAinstance> with your 2-digit SAP HANA instance number.

This would open up the below page asking for a username and password log on. As explained earlier, most developer IDs would not have the required roles to perform this activity. 

Scheduling SAP HANA XS JOB Tutorial

1

If you open this for the first time, the Scheduler might not be active. Make sure that the “Scheduler Enabled” switch on the top right corner of the page is marked to “Yes”. If not move the slider to “Yes”. If there are lot of already existing jobs, like in this case shown below, there would be other jobs crowding the page. Scroll down the page and find your job name.

Scheduling SAP HANA XS JOB Tutorial

After a bit of scrolling and some amateur detective work, we finally find our job. It is circled (or rather rectangled) in red below. As seen below, the job is marked INACTIVE which means that the job exists but is not active and running yet. Double click anywhere on this area to open up further settings for this job.

Scheduling SAP HANA XS JOB Tutorial

This opens up the below page where you would end up by default in the first tab – “Job Details”. Here you would find the job you created in SAP HANA under a unique but system generated JOB ID – 302 in this case. The Description would be as given in your XS JOB code in HANA. Origin of this job is marked as DESIGN TIME because this schedule was created in SAP HANA and here in the XS JOB Dashboard. Yes – New jobs can also be created here and more schedules can be added. Those jobs would be called RUN TIME jobs. We’ll come to those later.

For now, let’s focus on our DESIGN TIME job shown below. In our XS JOB, we had an input Parameter P_MATERIAL. Click on the parameter to view values for this input parameter that will be passed when the XS JOB executes.

Scheduling SAP HANA XS JOB Tutorial

The values row shows that P_MATERIAL input parameter would take the value CM_WHEAT. This is because we coded it as such in our XS JOB code. This step was just to demonstrate this value of the input parameter. No action need to be done here. Click the close button to close this window.

Scheduling SAP HANA XS JOB Tutorial

 Continue reading this tutorial on scheduling SAP HANA XS Job on the next page.

<<Previous Tutorial                                                                                                              Next Tutorial>>

73 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *