> 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/command-line-interface/upload-usage-data-to-an-rfc-destination.md).

# Upload usage data to an RFC Destination

The ABAP Agent normally obtains usage data directly from a Production system. However, you can provide your own usage data from files exported from the SAP ST03N transaction. When you export your ST03N data, save the files to a new directory in unconverted format using the `.txt` extension, and keep only the exported files in that directory.

You'll need to provide the names of your QAS (or DEV) and Production systems, and the directory where you saved the usage data. In this example, S21 is the QAS system and S23 is the Production system.

{% hint style="info" %}
**Note:** If your directory path contains spaces, enclose it in single quotes (PowerShell) or double quotes (Command Prompt).
{% endhint %}

{% hint style="info" %}
**Note:** The command connects to the non-production system (to identify the type of each object in your usage data), so its RFC Destination must already exist (see [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)) and the system must be reachable. If the RFC Destination does not exist, the command fails with `Could not find rfc: <name>`.
{% endhint %}

{% hint style="info" %}
**Note:** If you upload usage data for an RFC Destination in your Pipeline, the agent uses this instead of usage data obtained from your Pipeline's Production system. The command marks the non-production RFC Destination (`--rfc`) as using imported usage data (`cachedusage = true`) and records the Production system name you passed with `--prd` (`cachedprdrfc`). From then on, every Pipeline that uses that RFC Destination as its QAS (or DEV) system uses the imported data. You can check the setting with `slabapcli rfc list`.
{% endhint %}

## `slabapcli rfc phd`

Imports performance history data (PHD) from files exported from the SAP ST03N transaction and stores it in the agent's private database for the specified Production RFC Destination.

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

```batch
slabapcli.exe rfc phd --rfc <rfc> --prd <rfc> --dir <usage data folder>
```

{% endcode %}
{% endtab %}

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

```powershell
.\slabapcli.exe rfc phd --rfc <rfc> --prd <rfc> --dir <usage data folder>
```

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

| Parameter | Required | Description                                                                                                                                                                                                                                                                                                                        |
| --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--rfc`   | Yes      | The non-production (QAS or DEV) RFC Destination name. `--qas` and `--dev` are accepted as aliases.                                                                                                                                                                                                                                 |
| `--prd`   | Yes      | The PRD system name. This is the plain RFC Destination name; the PRD system does not need to be onboarded as a separate RFC Destination.                                                                                                                                                                                           |
| `--dir`   | Yes      | The directory containing your exported ST03N usage data files (`.txt` format). The directory must exist before running the command. The command reads every file in the directory, whatever its extension (subdirectories are not scanned). A file that is not a valid export is skipped, and a message is written to the console. |

### Example

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

```batch
slabapcli.exe rfc phd --rfc "S21" --prd "S23" --dir "c:\temp\phd"
```

{% endcode %}
{% endtab %}

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

```powershell
.\slabapcli.exe rfc phd --rfc 'S21' --prd 'S23' --dir 'c:\temp\phd'
```

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

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

```log
.\slabapcli.exe rfc phd --rfc 'S21' --prd 'S23' --dir 'c:\temp\phd'
[2026-05-05 10:45:08.331+01:00] [info] Detected Windows version: Windows 11
[2026-05-05 10:45:08.332+01:00] [info] Config pathname: C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
qas: S21
prd: S23
dir: c:\temp\phd
...
[2026-05-05 10:45:08.340+01:00] [info] Import phd from 'c:\temp\phd' using qas=S21, prd=S23
[2026-05-05 10:45:08.341+01:00] [info] Import phd from 'c:\temp\phd' using qas=S21, prd=S23
[2026-05-05 10:45:08.341+01:00] [info] Importing file: c:\temp\phd\st03n_export.txt
...
[2026-05-05 10:45:08.397+01:00] [info] Found 1250 records in file 'c:\temp\phd\st03n_export.txt'
[2026-05-05 10:45:08.398+01:00] [info] Aggregated to 1180 records
[2026-05-05 10:45:08.451+01:00] [info] Finding types using RFC connection: 'S21'
...
[2026-05-05 10:45:12.874+01:00] [info] Filtered 310 records without type. Remaining: 870
...
[2026-05-05 10:45:12.876+01:00] [info] Type: TCOD = 210
...
```

{% endcode %}

{% hint style="info" %}
The command prints `qas:` for the non-production RFC value regardless of whether you used `--rfc`, `--qas`, or `--dev`. The lines after `dir:` report the import progress for each file. The record counts depend on your data.
{% endhint %}


---

# 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/command-line-interface/upload-usage-data-to-an-rfc-destination.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.
