Working with Joule in SAP Business Application Studio

Objective

After completing this lesson, you will be able to learn how to leverage Joule in SAP Business Application Studio

Joule, the SAP AI Agent Embedded in SAP Business Application Studio

What is SAP Joule?

SAP Joule is the AI-powered copilot integrated across SAP tools, including SAP Business Application Studio. It helps developers accelerate development by generating code, explaining concepts, and assisting with SAP-specific tasks.

Within a native SAP HANA Database development space, SAP Joule is particularly useful for working with database artifacts, SQL, CDS models, and application logic.

How to Invoke Joule in SAP Business Application Studio?

In SAP Business Application Studio, you can access Joule in the following ways:

  • As a side panel assistant (chat-based interface)

    Click the Joule icon in the Activity Bar.

  • From the command palette shortcuts
  • Through inline suggestions in the editor

Joule offers the following features:

  • A chat window where you can interact using natural language prompts
  • Context awareness: Joule can adapt the scope of your prompt to the content of open files or selected code
  • Command-based interaction: when invoking Joule, you trigger specific capabilities using prefixes such as /hana-ai, /hana-gen) before your natural language prompt.

List of Command-Based Interactions

In SAP Business Application Studio, within a workspace of type SAP HANA Native Application, a prompt must be assigned to one of the following categories:

  • /code-search

    Search the repository for code snippets.

  • /hana-ai

    An extension of the existing HANA Machine Learning Python client library, mainly focusing on GenAI and related use cases. It includes many leading-edge GenAI related open source libraries and provides seamless integration with HANA ML, HANA vector engine, and other SAP GenAI Hub SDK.

  • /hana-gen

    It is a specialized SQL AI assistant, helping you create SAP HANA Cloud Database Database project.

  • /hana-modeling-help

    The SAP HANA Modeling Assistant is dedicated to enhancing your experience in designing calculation views.

  • /hana-sql-gen

    This assistant can help you create SQL statements for SAP HANA Cloud Database.

  • /hdi-gen

    This is a specialized HDI artifact definition generator. It helps create artifact definitions such as tables, views, roles, etc. from natural language requests, following SAP HANA Cloud best practices.

  • /sap-help

    This command is dedicated to searching the SAP Help Portal

Note

Additional commands might be available depending on additional extensions activated in the development space.

Example 1: Creating a Sample Project

In SAP Business Application Studio, using Joule, you can create a brand new project where you describe your needs with natural language, describing the required tables, columns, and so on. You can also use some of the proposed projects based on common models at SAP, such as:

  • Flight
  • Inventory Management
  • Bookshop

How to Invoke Joule to Create a Sample Project

  • Activate the Joule panel from the Activity Bar
  • Enter /hana-gen
  • Choose one of the proposed models/projects or start describing your requirement in natural language.

    You see the table design and content evolve when you add specific requirements. You can add these either with additional prompt entries, or you can edit a previous input.

  • If needed, propose a specific name for your project.
  • Click Accept to have Joule generate the new artifacts in the Explorer pane.

Screenshots from SAP Business Application Studio showing how to access the Joule prompt and instruct Joule to create a sample CAR RETAILER model. It includes visualizing the proposed artifacts, how to accept the proposal, and the artifacts generated inside a new project.

Example 2: Getting Help around SAP HANA Cloud Modeling

  1. Activate the Joule panel from the Activity Bar.
  2. Enter /hana-modeling-help
  3. Ask your question in natural language.

    For example, "How to create a rank column", or "How to implement a parent-child hierarchy"

  4. As a result, the excerpt from the SAP HANA documentation is shown. In some cases, this result can be customized based on some artifacts you have mentioned in your query.