Use AI-Assisted Story Code Generation

As a story developer in SAP Analytics Cloud, when writing scripts in the script editor, you can use AI-assisted story code generation to generate scripts based on your query.

How to Generate Story Scripts with AI

You can generate story scripts with AI.

Procedure

  1. Open the script editor of the object you'd like to assign script to.
  2. In the script editor, select Inline Chat.
  3. In the banner, enter your query to generate the script.
  4. Select (Send) to send your query.

    The script generation process starts. When it completes, the generated script appears highlighted in the script editor. The AI notice text Created with AI. appears, along with Accept and Reject buttons.

  5. Verify the generated script, and select either Accept or Reject.
    Once you select Accept, the generated script becomes part of the whole scripts and won't be highlighted anymore.
  6. You can continue to ask AI to generate script in the script editor. To exit AI-assisted story code generation, select (Close) in the banner.

Learn More...

Consider the following additional information and restrictions when generating story scripts with AI.

Permissions

To use AI-assisted story code generation make sure you have the appropriate permissions:

  • Application Creator role or have the Create permission for the object type Applications to edit scripts in the script editor.

Restrictions

When generating story scripts with AI, consider the following restrictions:

  • Script generation is not supported for ODataService.

  • Generated code uses placeholder values for dimension and member identifiers. Replace these with the actual technical IDs from your data model before running the script.

  • Script generation does not support creating new objects. For example, asking to create a script variable will be rejected.

  • Script generation does not have access to event handler parameters. Generating code that references parameters such as status in onExecutionStatusUpdate will not work correctly.

SAP Business AI Requirements

This feature is included with Base AI and does not require you to spend SAP AI Units. To use it, your SAP Analytics Cloud tenant must be on a data center that's supported and it must be activated.

For supported data centers and instructions on how to activate this feature, see: Enable AI-Assisted Features for SAP Analytics Cloud