Sap Hana Xsjs Interview Questions & Answers

  1. Question 1. What Is Sap Hana Xs Engine?

    Answer :

    XS Engine is a JavaScript application server based on the Mozilla Spider Monkey engine. The main idea of SAP HANA XS is to embed a full featured application server, web server, and development environment within the SAP HANA appliance itself.

    Important points about SAP HANA XS:

    • XS is a Small footprint application server / web server.
    • It is the basis for an application development platform inside SAP HANA.
    • It simplifies architecture and lowers the TCO (total cost of operation).
    • It provides easy access to SAP HANA database via HTTP-based consumption.
  2. Question 2. What Is The Purpose Of Xsaccess File In Hana Xs Project?

    Answer :

    The application-access (.xsaccess) file enables you to specify who or what is authorized to access the content exposed by the application package and what content they are allowed to see.

    The application-access file does not have a name before the dot (.); it only has the file extension .xsaccess. The contents of the .xsaccess file must be formatted according to JavaScript Object Notation (JSON) rules.

    Example of .xsaccess file:


    “exposed” : true,

    “authentication” : { “method” : “Form”}


  3. SAP BI Interview Questions

  4. Question 3. How Can We Create A Job And Schedule It In Hana?

    Answer :

    With the help of XSJs file, we can run a service (for example, an XS JavaScript or a SQLScript) at a scheduled interval.

    We first need to define the service either in XSJS or in SQLScript procedure. Then we can create XSJob file and mention the service details along with time interval. Finally from HANA Admin tool we can activate the job.

  5. Question 4. How Can We Create An Xsodata Service Which Only Allows To Read Data But Prevents Any Insert/update/delete Operation?

    Answer :

    This can be done with the “forbidden” command. For example:

    service {

    “mySchema”.”myTable” as “MyTable”

    create forbidden

    update forbidden

    delete forbidden;


  6. SAP BI Tutorial

  7. Question 5. What Is Benefit Of Xodata Compared To Xsjs?

    Answer :

    In HANA XSOData, there is a OData framework which provide many functionalities and we only need to provide details like data source, association etc. This is very helpful for developers as coding effort is almost zero. OData framework also takes care of security aspects like SQL injection, XSRF etc.

    While in XSJS, we need to code everything our own. This results into more coding effort. We also need to take care of security aspects, performance etc.

  8. SAP BO Interview Questions

  9. Question 6. Is It Possible To Call An External Service From Internet In Xs Application? If Yes, Then How?

    Answer :

    Yes, we can call an external service from Internet. This can be achieved with HTTP Destination (xshttpdest).

    We first need to create an HTTP Destination file and provide the details of external service along with other security and proxy details. Then we can call this destination from XSJS using $.net.http.readDestination API.

  10. Question 7. What Are The Different Web-based Tools Available In Hana Xs? How Do We Access Them?

    Answer :

    There are mainly 4 XS Web-based tools:

    • Editor: Inspect, create, change, delete and activate SAP HANA repository objects.
    • Catalog: Create, edit, execute and manage SQL catalog artifacts in the SAP HANA database.
    • Security: Manage users and roles.
    • Trace: View and download SAP HANA trace files and set trace levels (for example, info, error, debug).

    The URL to access these tools is: http://:80/sap/hana/xs/ide.

  11. SAP BO Tutorial
    SAP BW Interview Questions

  12. Question 8. What Is Hana Cds? What Are The Artifacts We Can Create Using Cds?

    Answer :

    Core Data Services (CDS) artifacts are design-time definitions. When CDS file is activated, it generate runtime objects.

    CDS can be used to create following database artifacts:

    • Create a table (entity)
    • Create an SQL views
    • Create an association between entities or views
    • Create a user-defined structured type
  13. Question 9. What Is The File Extension Of Xsjs Library?

    Answer :

    File extension of XSJS library is .xsjslib

  14. SAP HANA Interview Questions

  15. Question 10. Can We Call An Http Destination From An Xsjs If Http Destination Is In A Different Package?

    Answer :

    No. We must keep the HTTP destination configuration in the same package as the application that uses it. An application cannot reference an HTTP destination configuration that is located in another application package.

  16. SAP BW Tutorial

  17. Question 11. Can We Call An Xsjslib From Another Xs Project?

    Answer :

    Yes. XSJS library (xsjslib) can be called from another XS project or another package.

  18. SAP BODS Interview Questions

  19. Question 12. Suppose We Want To Create An Xs Application And Want To Make It Public. User Should Not Need Any Hana Database User To Access This Application. Is It Possible? If Yes, How?

    Answer :

    In .xsaccess file, we can set the authentication to null. After this anyone can open the application without user id and password.

  20. SAP BI Interview Questions