> For the complete documentation index, see [llms.txt](https://docs.sealights.io/knowledgebase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/guides/setup-and-installation.md).

# Setup and installation

Set up ABAP Agent 2.1 through initial build map and search\_testrepo — for any supported test repository.

This guide is **Part 1** of the ABAP Agent 2.1 onboarding path. It takes you from install through a finished **initial build map** and a successful **`search_testrepo`** check.

It applies to **all supported test repositories** (Azure DevOps, Tosca Commander, Tosca Cloud, Excel, Xray, qTest, Certify, [SAP Solution Manager (SSM)](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/test-tool-integrations/ssm.md), OpenText ALM, [OpenText Octane](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/test-tool-integrations/octane.md), [SAP Cloud ALM](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/test-tool-integrations/calm.md)). Adapter-specific connection details are under [Test Tool Integrations](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/test-tool-integrations.md).

**Next:** [Show the value with Test Cycles](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/guides/show-the-value-with-test-cycles.md) (Part 2). For Tosca Cloud runner + TIA beyond day-zero recommendations, see [Tosca Cloud runner and TIA](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/guides/tosca-cloud-runner-and-tia.md) (Part 3).

After you start the ABAP Agent server later in this guide, the **SeaLights ABAP Server** Windows service must remain running for ongoing operation.

## What you will have at the end

* ABAP Agent 2.1 installed and configured (SeaLights token, RFC Destinations, pipeline, at least one test repository)
* SAP authorizations and `setup status` healthy
* **SeaLights ABAP Server** Windows service running (`slabapcli server status` or `GET /ready` returns healthy)
* Initial build map completed for the pipeline
* At least one successful `search_testrepo` smoke check

{% hint style="warning" %}
**What you will** ***not*** **see in the SeaLights UI during this part**

* The initial build map is **not** shown as a progress UI beyond the fact that a **build** exists for the application.
* **Overall / full-application coverage** is not presented for this flow.
* After build modifications (Part 2), SeaLights focuses on **change coverage** and test impact — not a full-system coverage percentage from the initial map.
  {% endhint %}

## Prerequisites

Before you begin, make sure the following are in place:

* Windows host for ABAP Agent 2.0 binaries (`slabapcli.exe`, `watcher.exe`, `SLABAPServer.exe`) — [Install WATCHER, SLABAPCLI and Server](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/install-the-abap-agent/install-watcher-and-slabapcli.md).
* ABAP Agent **2.0** SAP add-on installed on your SAP systems — [Install the ABAP addon](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/install-the-abap-agent/install-the-abap-addon.md).
* SCMON data collection configured on QAS — [Configure your QAS systems to collect SCMON data](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/abap-agent/install-the-abap-agent/configure-your-qas-systems-to-collect-scmon-data.md).
* A SeaLights agent token.
* SAP connection details for QAS and PRD (hostname, system number, client, RFC user credentials).
* Access to at least one supported test repository (Azure DevOps, Tosca Commander, Tosca Cloud, Excel, Xray, qTest, Certify, [SAP Solution Manager (SSM)](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/test-tool-integrations/ssm.md), or OpenText ALM). Adapter setup is under [Test Tool Integrations](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/test-tool-integrations.md).

{% hint style="danger" %}
**ABAP Agent is not compatible with ABAP Agent 1.3.0.70 and earlier.** You cannot continue using your existing 1.3 installation, SAP add-on, local agent data, or SeaLights application history with the current release. See [Upgrading ABAP Agent version](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/upgrading-abap-agent-version.md#compatibility-with-earlier-abap-agent-versions) for the full requirements and required actions. Documentation for the legacy product line (1.3 and earlier) is under [ABAP Agent 1.x](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/abap-agent.md) in this section.
{% endhint %}

{% stepper %}
{% step %}

### Install the SAP add-on and Windows agent

Follow the install tree end-to-end:

1. [Install the ABAP Agent](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/install-the-abap-agent.md) (prerequisites, add-on, accounts, SCMON, Windows binaries)
2. [Create SAP accounts](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/install-the-abap-agent/create-sap-accounts.md)

{% hint style="info" %}
The last step on that page assigns the **`/TRICE/SL_AUTHS`** role to the account. If you haven't generated that role yet, complete the **Authorizations** step below first, then return to finish account creation.
{% endhint %}
{% endstep %}

{% step %}

### Authorizations

Authorizations are part of the happy path — do not skip them until troubleshooting.

1. Generate / assign the SeaLights authorization role — [Generate Authorization Profiles](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/install-the-abap-agent/generate-authorization-profiles.md) (includes the authorization objects table)
2. Assign **`/TRICE/SL_AUTHS`** (and related objects) to the RFC service user used by the agent on the QAS system
3. For the Production system, grant the PRD RFC user the authorizations for your Production configuration (with or without the add-on) — see [Production system authorizations](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/install-the-abap-agent/generate-authorization-profiles.md#production-system-authorizations)
4. If later checks fail, use [Troubleshooting — SAP authorization role issues](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/troubleshooting-the-abap-agent.md#diagnosing-sap-authorization-role-issues)
   {% endstep %}

{% step %}

### Set up the agent

Initialize the ABAP agent on the Windows host. Run it from the agent's `bin` directory in a terminal opened as an Administrator. It generates the encryption key and the default configuration file, and registers the **SeaLights ABAP Server** Windows service. It does **not** start the server: after you set the SeaLights token in the next step, start it with `slabapcli server start` (see [Start the ABAP Agent server](#start-the-abap-agent-server)).

Initializes the ABAP agent by creating a default configuration file, generating a machine-locked symmetric key, and registering the SeaLights ABAP Server Windows service.

Run this command from an elevated (Administrator) terminal, in the agent's `bin` folder. The current folder is recorded in the configuration as the agent's install location.

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Syntax" overflow="wrap" %}

```batch
slabapcli.exe setup install
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Syntax" overflow="wrap" %}

```powershell
.\slabapcli.exe setup install
```

{% endcode %}
{% endtab %}
{% endtabs %}

This command takes no parameters.

## Example

{% code title="Expected output (PowerShell)" overflow="wrap" lineNumbers="true" %}

```log
.\slabapcli.exe setup install
[2025-06-17 08:15:56.388+01:00] [info] Detected Windows version: Windows 11
[2025-06-17 08:15:56.389+01:00] [info] Config pathname: C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
[2025-06-17 08:15:56.389+01:00] [info] Install default config
[2025-06-17 08:15:56.392+01:00] [info] Default config installed in location C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
[2025-06-17 08:15:56.398+01:00] [info] Installed symmetric key and secured configured secrets
[2025-06-17 08:15:56.401+01:00] [info] Install Windows Error Reporting
[2025-06-17 08:15:56.401+01:00] [info] Installed Windows Error Reporting
Registered Windows service 'SLABAPServer' -> C:\Program Files\Tricentis\SeaLights\ABAP Agent\bin\SLABAPServer.exe
SLABAPServer Windows service is registered.
Finish configuring config.toml (RFCs, pipelines, port, etc.), then start it with:
  slabapcli server start
```

{% endcode %}

This command does the following:

* It creates a default configuration file named `config.toml` in `%ProgramData%\Tricentis\SeaLights\ABAP Agent\config`.
* It generates a machine-locked symmetric key used to protect secrets, including RFC Destination usernames and passwords, and the SeaLights agent token.
* It configures Windows Error Reporting to keep full crash dumps of the agent's watcher process.
* It registers the **SeaLights ABAP Server** Windows service (`SLABAPServer`), set to start automatically with Windows. It does **not** start the server: after you set the SeaLights token (`slabapcli sealights set`), start it with `slabapcli server start`, run from the same `bin` folder.

If `config.toml` already exists, the command does not overwrite it.

{% hint style="warning" %}
**Note**: You cannot use the generated key on any other computer. Be sure to back up the `config\config.toml` file.
{% endhint %}

Full reference: [Set up the agent](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/set-up-the-agent.md). Use schema migrate only if you are already on 2.0+.
{% endstep %}

{% step %}

### Connect to SeaLights

Store your SeaLights agent token in the encrypted configuration.

Connects the ABAP agent to your SeaLights environment by storing your agent token in the encrypted configuration.

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Syntax" overflow="wrap" %}

```batch
slabapcli.exe sealights set
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Syntax" overflow="wrap" %}

```powershell
.\slabapcli.exe sealights set
```

{% endcode %}
{% endtab %}
{% endtabs %}

This command takes no parameters.

## Example

{% code title="Expected output (PowerShell)" overflow="wrap" lineNumbers="true" %}

```log
.\slabapcli.exe sealights set
[2026-04-21 08:51:38.301+01:00] [info] Detected Windows version: Windows 11
[2026-04-21 08:51:38.306+01:00] [info] Config pathname: C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
Enter token: ********************
Confirm token: ********************
Token accepted (sha1 a3f9c1d2).
Running 'sealights test' to verify the new token...
[2026-04-21 08:51:47.710+01:00] [info] Test SeaLights: customer.sealights.co
Agent token is valid.
Sealights connectivity check succeeded.
```

{% endcode %}

{% hint style="info" %}
The token and confirmation are not shown in the terminal window; each character you type or paste is echoed as `*`. Use **Ctrl+V** to paste your token, then press **Enter**. The value in parentheses after `sha1` is a short fingerprint of the token you entered.

The command saves the token first and then automatically runs `sealights test` to verify it. If the test fails, the token stays saved: fix the problem and run `sealights test` again, or run `sealights set` with a different token.
{% endhint %}

{% hint style="warning" %}
If the agent server is already running, restart it after you change the token (`slabapcli server stop`, then `slabapcli server start`) so that it uses the new token.
{% endhint %}

Validates the agent token against the SeaLights API. Returns a confirmation if the token is valid, or an error with troubleshooting guidance if it is not.

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Syntax" overflow="wrap" %}

```batch
slabapcli.exe sealights test
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Syntax" overflow="wrap" %}

```powershell
.\slabapcli.exe sealights test
```

{% endcode %}
{% endtab %}
{% endtabs %}

This command takes no parameters.

## Example

{% code title="Expected output (PowerShell)" overflow="wrap" lineNumbers="true" %}

```log
.\slabapcli.exe sealights test
[2026-04-21 09:11:54.001+01:00] [info] Detected Windows version: Windows 11
[2026-04-21 09:11:54.006+01:00] [info] Config pathname: C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
[2026-04-21 09:11:54.013+01:00] [info] Test SeaLights: customer.sealights.co
Agent token is valid.
Sealights connectivity check succeeded.
```

{% endcode %}

{% hint style="info" %}
This command is also run automatically after `sealights set` to verify the token immediately.
{% endhint %}

The token is **cold** — the server reads it when the service starts, so set it before the first server start (if it is missing, the server starts but reports `not_ready`) and restart the service after you change it. Run `sealights test` to confirm connectivity; it is recommended but not a hard gate before `slabapcli server start`.
{% endstep %}

{% step %}

### Start the ABAP Agent server

Start the **SeaLights ABAP Server** Windows service immediately after setting the SeaLights token.

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Command" overflow="wrap" %}

```batch
slabapcli.exe server start
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Command" overflow="wrap" %}

```powershell
.\slabapcli.exe server start
```

{% endcode %}
{% endtab %}
{% endtabs %}

Confirm readiness:

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Command" overflow="wrap" %}

```batch
slabapcli.exe server status
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Command" overflow="wrap" %}

```powershell
.\slabapcli.exe server status
```

{% endcode %}
{% endtab %}
{% endtabs %}

Full reference: [Start the ABAP Agent Server](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/start-the-agent-server.md). If the service fails to start, check `{userdata}\public\Logs\server-YYYYMMDD.log` (`{userdata}` defaults to `%ProgramData%\Tricentis\SeaLights\ABAP Agent`) and [Troubleshooting — Server Issues](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/troubleshooting-the-abap-agent.md#server-issues).
{% endstep %}

{% step %}

### Create RFC Destinations

Create an RFC Destination for each SAP system (QAS and PRD) that the agent needs to connect to.

{% hint style="warning" %}
**Prerequisite:** Run `slabapcli sealights set` before running `rfc set`. The automatic verification step requires a valid SeaLights token.
{% endhint %}

Creates or updates an RFC Destination for an SAP system. The username and password are entered interactively and stored encrypted.

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Syntax" overflow="wrap" %}

```batch
slabapcli.exe rfc set --name <rfc> --hostname <hostname> --sysnr <sysnr> --client <client> --lang <language>
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Syntax" overflow="wrap" %}

```powershell
.\slabapcli.exe rfc set --name <rfc> --hostname <hostname> --sysnr <sysnr> --client <client> --lang <language>
```

{% endcode %}
{% endtab %}
{% endtabs %}

| Parameter    | Required | Description                          |
| ------------ | -------- | ------------------------------------ |
| `--name`     | Yes      | RFC Destination name (e.g. `S21`).   |
| `--hostname` | Yes      | SAP system hostname.                 |
| `--sysnr`    | Yes      | SAP system number (instance number). |
| `--client`   | Yes      | SAP client number.                   |
| `--lang`     | Yes      | SAP login language (e.g. `EN`).      |

{% hint style="info" %}
If an RFC Destination with the same name already exists, `rfc set` updates it: the connection details and the credentials are replaced, while optional settings such as the router string, the retry settings, and the cached usage data are kept.
{% endhint %}

## Example

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Command" overflow="wrap" %}

```batch
slabapcli.exe rfc set --name "S21" --hostname "sapqas01.customer.com" --sysnr "00" --client "100" --lang "EN"
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Command" overflow="wrap" %}

```powershell
.\slabapcli.exe rfc set --name 'S21' --hostname 'sapqas01.customer.com' --sysnr '00' --client '100' --lang 'EN'
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% code title="Expected output (PowerShell, abbreviated)" overflow="wrap" lineNumbers="true" %}

```log
.\slabapcli.exe rfc set --name 'S21' --hostname 'sapqas01.customer.com' --sysnr '00' --client '100' --lang 'EN'
[2026-05-07 11:37:08.571+01:00] [info] Detected Windows version: Windows 11
[2026-05-07 11:37:08.572+01:00] [info] Config pathname: C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
Enter username: hunterh
Enter password: **********
Confirm password: **********
Password accepted (sha1 a3f9c2d1).
Running 'rfc test --name S21' to verify the new RFC destination...
[2026-05-07 11:37:15.910+01:00] [info] Testing rfc: S21
  Connected
  System info:
    RFCDBHOST: sapqas01
    RFCSYSID: S21
    RFCIPADDR: 10.0.1.50
    RFCKERNRL: 753
    RFCSAPRL: 750
  SeaLights ABAP add-on:
    Installed
  SeaLights ABAP add-on version:
    Installed version: RELEASE=2025_01 EXTRELEASE=0012 (minimum supported ...)
  Time synchronization:
    ...
  Authorizations:
    All required authorizations present
  Required tables in DDIC:
    All required tables present in DDIC
  SCMON Configuration:
    ...
    SCMON is running and configured to stay active until 2027-12-31
  SCMON_COLLECT callability:
    SCMON_COLLECT call succeeded
```

{% endcode %}

{% hint style="info" %}
The password and confirmation are not displayed in the terminal window for security. The command automatically runs `rfc test` after saving the RFC Destination.
{% endhint %}

{% hint style="info" %}
Repeat this command for every SAP system the pipeline will use (for example, once for QAS and once for PRD). Full reference: [Create, Test & List RFC Destinations](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/create-test-and-list-rfc-destinations.md).
{% endhint %}
{% endstep %}

{% step %}

### Create a pipeline

Link your QAS and Production systems to a SeaLights application by creating a pipeline.

Creates a pipeline that links a QAS (or DEV) and Production system in your SAP landscape to a SeaLights application.

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Syntax" overflow="wrap" %}

```batch
slabapcli.exe pipeline set --appname <app> --qas <rfc> --prd <rfc> [--name <name>] [--labid <labid>] [--use-addon true|false]
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Syntax" overflow="wrap" %}

```powershell
.\slabapcli.exe pipeline set --appname <app> --qas <rfc> --prd <rfc> [--name <name>] [--labid <labid>] [--use-addon true|false]
```

{% endcode %}
{% endtab %}
{% endtabs %}

| Parameter     | Required                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--appname`   | Yes                       | The SeaLights application name to associate with this pipeline.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `--qas`       | One of `--qas` or `--dev` | The QAS RFC Destination name.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `--dev`       | One of `--qas` or `--dev` | The DEV RFC Destination name. Use this instead of `--qas` when your source system is a DEV system. The key is stored as `dev` in the config file and is not normalized to `qas`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `--prd`       | Yes                       | The PRD RFC Destination name.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `--name`      | No                        | A custom name for the pipeline. If omitted, the name is auto-generated as `<appname>-<qas>` (for example, `myapp-S21`). Allowed characters: `A-Za-z0-9._-`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `--labid`     | No                        | The lab ID for this pipeline. If omitted, it is auto-generated as `<QAS SID> <QAS RFC hostname>` (for example, `S21 sapqas01.customer.com`).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `--use-addon` | No                        | `true` or `false`. Selects how the agent reads Production usage data (ST03) for this pipeline: `false` uses a standard SAP function module and needs no SeaLights add-on on the Production system; `true` uses the SeaLights add-on, which must be installed on Production. The Production RFC user needs the authorizations for the chosen setting ([without](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/install-the-abap-agent/generate-authorization-profiles.md#prd-without-add-on) or [with](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/install-the-abap-agent/generate-authorization-profiles.md#prd-with-add-on) the add-on). If omitted, a new pipeline uses `false` and an existing pipeline keeps its saved value. Pipelines that share the same `--prd` must use the same value, otherwise the command fails. |

{% hint style="info" %}
Multiple pipelines can share the same `--appname`. Each pipeline's name must be unique — the auto-generated name (`appname-qas`) ensures this when pipelines use different QAS systems.
{% endhint %}

## Example: Create a pipeline using a QAS system

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Command" overflow="wrap" %}

```batch
slabapcli.exe pipeline set --appname "ALM_Demo" --qas "S21" --prd "S23"
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Command" overflow="wrap" %}

```powershell
.\slabapcli.exe pipeline set --appname 'ALM_Demo' --qas 'S21' --prd 'S23'
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% code title="Expected output (PowerShell)" overflow="wrap" lineNumbers="true" %}

```log
.\slabapcli.exe pipeline set --appname 'ALM_Demo' --qas 'S21' --prd 'S23'
[2026-03-08 10:33:36.956+02:00] [info] Detected Windows version: Windows 11
[2026-03-08 10:33:36.957+02:00] [info] Config pathname: C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
Pipeline 'ALM_Demo-S21' has been created in 'C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml'. Use this name with the buildmap, footprints, and buildmods commands.
```

{% endcode %}

{% hint style="info" %}
If a pipeline with the same name already exists, the command updates it and prints `has been updated` instead of `has been created`. When you update a pipeline without `--labid`, the lab ID is derived again, which replaces a custom lab ID. Pass `--labid` again to keep it.
{% endhint %}

This writes the following entry to `config.toml`:

{% code title="config.toml" %}

```toml
[[pipeline]]
  name = "ALM_Demo-S21"
  appname = "ALM_Demo"
  qas = "S21"
  prd = "S23"
  labid = "S21 sapqas01.customer.com"
  useaddon = false
  disablesetref = false
```

{% endcode %}

## Example: Create a pipeline using a DEV system

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Command" overflow="wrap" %}

```batch
slabapcli.exe pipeline set --appname "ALM_Demo" --dev "S21" --prd "S23"
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Command" overflow="wrap" %}

```powershell
.\slabapcli.exe pipeline set --appname 'ALM_Demo' --dev 'S21' --prd 'S23'
```

{% endcode %}
{% endtab %}
{% endtabs %}

This writes the following entry to `config.toml`. Note that the key is stored as `dev`, not `qas`:

{% code title="config.toml" %}

```toml
[[pipeline]]
  name = "ALM_Demo-S21"
  appname = "ALM_Demo"
  dev = "S21"
  prd = "S23"
  labid = "S21 sapqas01.customer.com"
  useaddon = false
  disablesetref = false
```

{% endcode %}

{% hint style="warning" %}
**Leave `--labid` unset** when you create a pipeline. The agent derives the lab ID automatically so it matches the QAS **branch name**: `"<SID> <ashost>"` (for example, `S21 sapqas01.customer.com`).

Overriding `--labid` casually breaks **Test Cycles** in SeaLights.
{% endhint %}

The auto-derived lab ID is what SeaLights uses for Test Cycles and Footprints. Only override `--labid` when you deliberately need a different lab ID and understand the Test Cycle impact.

Full reference: [Create & List Pipelines](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/create-and-list-pipelines.md).
{% endstep %}

{% step %}

### Configure a test repository

Configure at least one test repository for **your** adapter type. Each adapter page under [Test Tool Integrations](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/test-tool-integrations.md) has a type-specific `testrepo set` example. Full CLI options are in [Configure Test Repositories](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/configure-test-repositories.md). After you save, `testrepo set` can run its automatic connection test.

When the test repository is saved and the connection test succeeds, stay in this Part 1 guide. Continue with the next steps in order:

1. Validate with `setup status`
2. Run the initial build map
3. Smoke-test `search_testrepo`

Do not schedule ongoing repository search or Footprints capture here — Part 1 covers the day-zero smoke check after the initial build map. For adapter-specific connect guidance and the full post-connect ops flow, use the matching page under [Test Tool Integrations](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/test-tool-integrations.md).
{% endstep %}

{% step %}

### Validate with `setup status`

Before build-map or search work, run the comprehensive validation gate:

```batch
slabapcli.exe setup status
```

This checks SeaLights connectivity, RFC connections, SAP authorizations, SCMON state, and agent-side prerequisites. Exit code `0` means you can continue.

Full reference: [Validate Your Setup](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/validate-your-setup.md).
{% endstep %}

{% step %}

### Run the initial build map

Create an Initial Build Map for the pipeline. This scans QAS for ABAP components in use in Production and sends them to SeaLights.

Creates an Initial Build Map for a pipeline. The build map is a snapshot of the standard and custom ABAP code components in the pipeline's QAS system (and their related objects), based on usage data from the pipeline's Production system.

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Syntax" overflow="wrap" %}

```batch
slabapcli.exe buildmap run --pipeline <pipeline-name>
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Syntax" overflow="wrap" %}

```powershell
.\slabapcli.exe buildmap run --pipeline <pipeline-name>
```

{% endcode %}
{% endtab %}
{% endtabs %}

| Parameter    | Required | Description                                      |
| ------------ | -------- | ------------------------------------------------ |
| `--pipeline` | Yes      | The pipeline name (as shown in `pipeline list`). |

## Example

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Command" overflow="wrap" %}

```batch
slabapcli.exe buildmap run --pipeline "ALM_Demo-S21"
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Command" overflow="wrap" %}

```powershell
.\slabapcli.exe buildmap run --pipeline 'ALM_Demo-S21'
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% code title="Expected output (PowerShell)" overflow="wrap" lineNumbers="true" %}

```log
.\slabapcli.exe buildmap run --pipeline 'ALM_Demo-S21'
[2025-06-17 15:28:19.806+01:00] [info] Detected Windows version: Windows 11
[2025-06-17 15:28:19.807+01:00] [info] Config pathname: C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
```

{% endcode %}

The agent creates a scheduled INIT\_BUILD\_MAP task that runs once only (approximately one minute from now) to create the Initial Build Map.

{% hint style="info" %}
You can also create an Initial Build Map directly by running `watcher.exe INIT_BUILD_MAP --pipeline <pipeline-name>` from the command line.
{% endhint %}

{% hint style="warning" %}
**Duration:** An initial build map can take **up to about 10 hours** end-to-end, depending on landscape size and system load. For IBM stages, see [Create an Initial Build Map for your Pipeline](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/create-an-initial-build-map-for-your-pipeline.md).

**Build modifications** are usually much shorter, but duration scales with the number and size of transports imported.
{% endhint %}

When it completes, confirm in SeaLights that the application has a **build**. Do not expect a dedicated "initial build map progress" UI or overall coverage dashboard from this step.

{% hint style="warning" %}
**Before Build Modifications (Part 2):** Wait until the Initial Build Map has finished successfully for this pipeline before starting Build Mods (`buildmods run` or watcher `BUILD_MODS`). Do not start Build Mods while `INIT_BUILD_MAP` is still running.
{% endhint %}

Full reference: [Create an Initial Build Map for your Pipeline](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/create-an-initial-build-map-for-your-pipeline.md).
{% endstep %}

{% step %}

### Smoke-test `search_testrepo`

Schedule repository search and confirm the agent can discover matching tests for known search terms or changed contexts.

For day-zero validation, schedule `search_testrepo` against your configured repository, then confirm the agent can discover matching tests for known search terms or changed contexts.

`search_testrepo run` registers a Windows Scheduled Task (`watcher.exe SEARCH_TESTREPO`). The first run happens according to the cron you set (or the default). Use a near-term cron if you need the smoke check sooner than the weekly default.

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Schedule a search (smoke)" overflow="wrap" %}

```batch
slabapcli.exe search_testrepo run --pipeline <pipeline> --testrepo <name> [--cron "<cron>"]
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Schedule a search (smoke)" overflow="wrap" %}

```powershell
.\slabapcli.exe search_testrepo run --pipeline <pipeline> --testrepo <name> [--cron '<cron>']
```

{% endcode %}
{% endtab %}
{% endtabs %}

| Parameter    | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--pipeline` | Yes      | Pipeline name (`[[pipeline]].name`).                                                                                                                                                                                                                                                                                                                                                                                           |
| `--testrepo` | Yes      | Test repository name (`[[testrepo]].name`) linked to that pipeline.                                                                                                                                                                                                                                                                                                                                                            |
| `--cron`     | No       | 5-field cron in the machine's local time. Default: `0 2 * * 0` (Sunday at 02:00). Example for a sooner smoke: `*/15 * * * *` (every 15 minutes) — then tighten the schedule for production. Supported forms: `M * * * *`, `*/N * * * *`, `M/N * * * *`, `M H * * *`, and `M H * * D` (`D` is one day, `0`-`7` or `SUN`-`SAT`). Ranges and lists (for example `1-5`) are not supported, and day-of-month and month must be `*`. |

{% hint style="info" %}
**Pass criteria for this smoke check:** the scheduled task is registered, and search returns matches for terms you expect (or FLPCA-expanded Fiori titles when FLPCA is imported). Ongoing ops detail and stop/list commands: [Search Test Repositories](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/search-test-repositories.md). Adapter pages also embed the shared TTI search include for recurring schedule guidance.
{% endhint %}

If search fails, check server and adapter logs — [Configuration settings — Log locations](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/configuration-settings.md#log-locations) and [Troubleshooting](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/troubleshooting-the-abap-agent.md).
{% endstep %}
{% endstepper %}

## Troubleshooting

| Problem                                                         | What to check                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| No application / build in SeaLights after the initial build map | Check server and watcher logs. Verify RFC connectivity with `slabapcli rfc test --name <rfc>`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `setup status` fails                                            | Fix SeaLights token, RFC destinations, SAP authorizations, and SCMON before starting the server. See [Validate Your Setup](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/validate-your-setup.md).                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `search_testrepo` finds nothing                                 | Confirm every `testrepo set` for the pipeline is done. If you just changed config, verify it reloaded (if `testrepo test` reports a stale server configuration, restart the server with `slabapcli server stop` and `slabapcli server start`) — see [Configuration Settings](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/configuration-settings.md). Check adapter logs under [Log locations](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/configuration-settings.md#log-locations). For Fiori, confirm FLPCA was imported for the pipeline's **PRD** RFC (`upload_flpca status --rfc <prd-rfc>`). |
| No coverage / Test Gaps do not move after a test                | Confirm Footprints is running (`footprints run`). For Tosca, set **SeaLightsLabId** to the auto-derived pipeline lab ID — leave `--labid` unset on `pipeline set`. Wait for SeaLights to process Footprints.                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Test Cycles look wrong or empty                                 | Overriding `--labid` casually breaks Test Cycles. Leave it unset so the lab ID matches the QAS branch name (`"<SID> <ashost>"`). Use `pipeline list` to confirm.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| TIA does not skip / optimize tests (Tosca Cloud)                | Confirm a Build Modification exists for the transport, Footprints are collecting, and SeaLights optimization is enabled on the playlist. See [Run a test in Tosca Cloud](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/test-tool-integrations/tosca-cloud/run-a-test-in-tosca-cloud.md).                                                                                                                                                                                                                                                                                                                                                   |

For deeper diagnosis, see [Troubleshooting the ABAP Agent](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/troubleshooting-the-abap-agent.md).

## Schedule the purger

The agent keeps writing logs and per-run artifacts (test-repository search results, impacted graphs, discovered transports) under the userdata directory (default: `%ProgramData%\Tricentis\SeaLights\ABAP Agent`). Schedule the purger so these files do not accumulate. Run the command from the agent's `bin` directory in a terminal opened as an Administrator, because it registers a Windows scheduled task:

```batch
slabapcli.exe purger run
```

{% code title="Expected output (PowerShell)" overflow="wrap" lineNumbers="true" %}

```log
.\slabapcli.exe purger run
[2025-06-18 15:07:58.336+01:00] [info] Detected Windows version: Windows 11
[2025-06-18 15:07:58.337+01:00] [info] Config pathname: C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
[2025-06-18 15:07:58.370+01:00] [info] Scheduled purger run with retention period specified in the config file, interval: 01:00:00, duration: 1 day(s) and 00:00:00
```

{% endcode %}

This creates the `PURGER` scheduled task, which runs `purger.exe` every hour and deletes:

* Log files (`*.log`) under `public\Logs` in the userdata directory and under `public\Logs` in the system (ProgramData) directory — the purger cleans both locations
* Private artifacts (`*.json`, `*.db`, `*.xml`) under the `SearchTestRepo`, `TestTestRepo`, `Graph`, `BuildModifications`, and `DiscoveredTransports` folders in `private`

Only files older than the retention period are deleted. The retention period is `[logging].retentionperiod` in `config.toml` (default: `14` days). The purger writes its own log to `public\Logs\purger_YYYY-MM-DD.log`.

To stop scheduled purging (also from an elevated terminal):

```batch
slabapcli.exe purger stop
```

{% hint style="info" %}
If you upgrade from an agent version that used the `PURGE_LOGS` task, the installer migrates it to `PURGER` and keeps its settings.
{% endhint %}

## Done with Part 1

Continue to [Show the value with Test Cycles](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/guides/show-the-value-with-test-cycles.md) to import transports, open a Test Cycle, and demonstrate recommendations, gaps, and change coverage.

## Related reading

* [SAP objects support](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/concepts/sap-objects-support.md)
* [Test Tool Integrations](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/test-tool-integrations.md)
* [Fiori support](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/guides/fiori-support.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/guides/setup-and-installation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
