Figure 4–11 SAP Config Tool: Configuring the ume.logoff.redirect.url Parameter Previous: To Modify the Ticket Template to Use the New Login Module for SAP Enterprise Portal 7.0 Next: To Enable Cookie Reset for SAP Enterprise Portal 7.0.
In this blog, we will build the NodesJS and SAPUI5 app in SAP HANA XSA that controls the Jenkins build process.
- 2009-01-08 20:04 UTC sriram dot natarajan at sun dot com Description: - currently, php cgi sapi code checks for redirect url and envpathtranslated to determine if the request is coming from apache web server and accordingly modifies the CGI environment variables so that server can continue processing.
- This check is executed only if the transaction was started using a shortcut (SAP GUI for Windows), using a start transaction (SAP GUI for Java), or using a URL (SAP GUI for HTML). This SAPGUI Shortcut passes the same parameters as the above STRING called in the OKFieldCode.
- Public Sub Redirect (url As String, endResponse As Boolean) Parameters. The location of the target. EndResponse Boolean. Indicates whether execution of the current page should terminate. Url contains a newline character. A redirection is attempted.
- You have logged off.
What’s Jenkins ?
Jenkins (jenkins.io) offers a simple way to set up a continuous integration or continuous delivery environment for almost any combination of languages and source code repositories using pipelines, as well as automating other routine development tasks.
Prerequisites
- SAP HANA XSA
- Jenkins (jenkins.io) Installed on local machine
- NodeJS Client for Jenkins (https://www.npmjs.com/package/jenkins)
- A simple Python program.
High Level Steps
Google Redirect Url
- Configure the Jenkins job to execute the Windows batch command to run the Python program. For simplicity, Windows batch file and Python app reside in the same Jenkins server (this is may not practical in the Production mode).
- Install and configure NodeJS Client for Jenkins in SAP HANA XSA and build the NodeJS app to call the REST API to build, get and stop the Jenkins job.
- Lastly, we will build the SAPUI5 Front End in SAP HANA XSA to trigger job, check job status and cancel job.
Configure Jenkins
- Go to Jenkins main dashboard and click on New Item.
- Enter item name trigger and select Freestyle project. Click OK to continue.
- Under Build, add build step Execute Windows batch command.
- Specify the command. Here, I would like to execute run.bat in folder C:MyPython.
- Click Save to finish.
- Go back to main dashboard and you will see the item “trigger” the that we just created.
SAP HANA XSA
Create Project in SAP Web IDE
- Logon to SAP Web IDE for SAP HANA XSA. Create a new project in SAP Web IDE for HANA XSA and select SAP Cloud Platform Business Application. Click Next to continue.
- Give the project name, for example zjenkinauto. Click Next to continue.
- On this page, just click Next to continue.
- We need the NodeJS module but we will add it later on and we don’t need the database module. Select Not Included for both Service and Database. Click Next to continue.
- Click Finish to complete the setup.
Adding NodeJS Module
- Now on the project that we just created, do a right-click and select New > Node.js Module.
- Give a module name srv. Click Next to continue.
- On this page, just click Next to continue.
- Click Finish to complete.
- We need to update the code in server.js in srv folder.
Update with the following code: - Also open package.json in srv folder.
And update with the following code:We added the NodeJS client for Jenkins from https://www.npmjs.com/package/jenkins in dependencies section: “jenkins”: “^0.27.0”.
- Create a folder in srv folder called router.
- Create index.js in folder router.
Insert the following code: - Create another folder routes inside router folder.
- We will create the NodeJS app to trigger build, get job information and stop build.
- Create myNode.js inside routes folder.
Insert the following code: - Update the variable jenkinsurl in the above code with your Jenkins server. For example:
Create Web User (SAPUI5) Interface
- Do a right click on the project root folder zjenkinauto and select New > Basic HTML5 Module.
- Give a module name web. Click Next to continue.
- Click Finish to complete.
- You will see the web folder. Open xs-app.json in web folder.
And update with the following code: - Populate the SAP UI5 files in resources folder. Copy from my Git: https://github.com/ferrygun/zjenkinauto
- In Page.controller.js, we just call the NodeJS service using Ajax query to start, get status and cancel the job.
Url Redirect Record
Adding xs-security.json and update mta.yaml
- The last step we need to do is to add the xs-security.json file in the root folder.
- And also to modify the mta.yaml with this code:
Execution
We have completed the necessary setup and now it’s time for the testing and execution.

Sap Redirect Url Is Null Error
- Click on Trigger Job to submit job.
- If there is no error, you will see the job queue number.
- Now go to Jenkins console and you will see the job is being executed.
- Click Check Job to get the job status.
- If the job is complete or not running, you will see this message.
- Click Cancel Job to cancel the job that has been submitted.
- Check the job status in Jenkins console.