SAP

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Use Variables to Personalize Your Tutorials

Let readers type a per-person value once — a workshop group number, a seat, a project suffix — and have it substituted live into every prose line, inline-code snippet, and copy-pasteable code block.

Overview

🎓 intermediate ⏱ 15 min. IntermediateSAP Business Technology Platform

You will learn

  • ✔Why tutorial variables exist and when to reach for them
  • ✔How to declare a variables: block in your source frontmatter
  • ✔How to reference a variable with a {{var:<name>}} token in prose, inline code, and fenced code blocks
  • ✔How to pre-fill a variable from the reader’s identity with a default regex
  • ✔How values persist per-reader and carry across the tutorials in a mission
Thomas Jung T Thomas Jung October 17, 2026
Created on October 17, 2026
Contributors

More from Thomas jung

See all 232 tutorials by Thomas jung →

Prerequisites

  • Familiarity with the basic tutorial markdown structure (see writing-tutorials.md)
  • A tutorial source repo under the sap-tutorials org

Steps

This tutorial is self-demonstrating. It declares one variable, groupNumber, and uses it throughout. Type a value into the Your workshop group number field at the top of the page and watch every occurrence below — including inside the code blocks — update live as you read.

Step 1 Understand the problem variables solve
—

Workshop and hands-on tutorials often contain a value that is different for every reader — most commonly a group or seat number handed out at the start of a session. The old approach was a manual placeholder like XXX that the reader was told to find-and-replace everywhere:

Create a space named dev-XXX, then a user da164-XXX@education.cloud.sap, then a project product-advisor-XXX.

The reader has to remember to swap XXX in every copy-pasted command. Miss one and the exercise breaks — and the mistake usually surfaces several steps later, where it is hardest to debug.

Tutorial variables fix this. The author declares the value once, the reader types it once into a field at the top of the page, and every marked occurrence — prose, inline code, and fenced code blocks alike — updates live. The reader copy-pastes commands with their own value already baked in, with nothing to remember.

When not to use a variable: values that are the same for every reader (a fixed service URL, a product name) are just prose — don’t wrap them. Variables are specifically for the per-reader value.

Step 2 Declare a variable in frontmatter
+
Step 3 Reference the variable in your content
+
Step 4 Pre-fill a value from the reader's identity (optional)
+
Step 5 Know how values persist and carry over
+
Step 6 Verify your tutorial before you publish
+
Step 7 Test yourself
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 7
1. Understand the problem variables solve 2. Declare a variable in frontmatter 3. Reference the variable in your content 4. Pre-fill a value from the reader's identity (optional) 5. Know how values persist and carry over 6. Verify your tutorial before you publish 7. Test yourself
Next