---
title: "Creating and Executing Scripts"
source_url: https://support.lucanet.cloud/en/documentation/consolidation-financial-planning/imports-journals/create-scripts
language: en
last_updated: 2023-08-16
---
# Creating and Executing Scripts

## Overview

In the **Scripts** workspace as well as in [directory structures](https://support.lucanet.cloud/en/documentation/consolidation-financial-planning/konfiguration-der-arbeitsbereiche/create-configure-directory-structures.md), scripts can be created, edited, and executed.

Scripts can be used to read out, change, augment, and import data from different systems. Each script contains all instructions required to execute a specific task (e. g. import data into Lucanet.Financial Warehouse).

The **Application** function is also available in the **Scripts** workspace. This function can be used to load **Lucanet.Script Execution Application** (SEA for short) into the workspace.

{% warning-box %}
The scripts used to import data into Lucanet.Financial Warehouse are usually created by Lucanet.Consulting. If necessary, get in touch with your Lucanet contact.
{% /warning-box %}

## Creating a Script

To create a script:

{% stepper %}
{% stepper-step %}
In the overview, click the **Import and Journals** workspace.
{% /stepper-step %}
{% stepper-step %}
In the tree view of the workspace, right-click **Scripts** or a folder and select the following from the context menu: **Create | Script**:

Create a new script

{% /stepper-step %}
{% stepper-step %}
Choose one of the following options to load the script into the **Scripts** workspace in the subsequent dialog:

 - **Drag and drop** the desired script into the dialog.
 - Click **browse** and navigate to the desired script.
{% /stepper-step %}
{% stepper-step %}
The script is created.
{% /stepper-step %}
{% stepper-step %}
In the detail view of the script, click **Edit** to configure the script (see following section).

{% /stepper-step %}
{% /stepper %}
## Options for Scripts

The following options are available for scripts:

#### Execute

Execute the script (see following chapter)

{% info-box %}
If necessary, values required for execution of the script must be specified on the **Configuration** tab.
{% /info-box %}

#### Edit

Open edit mode for the script:

- **Name**: name of the script
- **Configuration**: values required to execute the script

{% info-box %}
There is usually a separate documentation for scripts, which describes the configuration of the script.
{% /info-box %}

{% info-box %}
The **Uses** tab shows which Lucanet objects (e.g. data sources) access this script.
{% /info-box %}

## SEA used to import data into Lucanet.Financial Warehouse

{% info-box %}
**Lucanet Script Execution Application** ( **SEA** for short) is a Lucanet application that you need if you operate ERP/financial source systems on-premises and want to import data from these systems into the LucaNet CFO Solution Platform using an ETL script.
{% /info-box %}

If you want to import data from ERP source systems and these source systems are operated on premises, you must perform the following steps {% u %}before importing via script{% /u %}:

{% stepper %}
{% stepper-step %}
Create SEA certificate (see [Generating and Downloading SEA Certificates](https://support.lucanet.cloud/en/documentation/administration/platform-management/certificates.md)).
{% /stepper-step %}
{% stepper-step %}
Install SEA (see [Installing and Using](https://support.lucanet.cloud/en/documentation/consolidation-financial-planning/basic-configuration-cfp/install-and-use-opsea.md) [Lucanet.Script Execution Application](https://support.lucanet.cloud/en/documentation/consolidation-financial-planning/basic-configuration-cfp/install-and-use-opsea.md)).
{% /stepper-step %}
{% stepper-step %}
Create SEA in the **Scripts** workspace as an application (see [Installing and Using Lucanet.Script Execution Application](https://support.lucanet.cloud/en/documentation/consolidation-financial-planning/basic-configuration-cfp/install-and-use-opsea.md)).
{% /stepper-step %}
{% stepper-step %}
Assign SEA as an application in the **data source** (see [Defining a Data Source](https://support.lucanet.cloud/en/documentation/consolidation-financial-planning/imports-journals/importing-data-into-lnfwh/defining-data-source-lnfwh.md))

{% /stepper-step %}
{% /stepper %}
## Executing Scripts

You can manually execute either individual scripts or all scripts in a folder at the same time.

### Executing Individual Scripts

{% stepper %}
{% stepper-step %}
In the **Scripts** workspace, select the script you would like to execute. The detail view is displayed as follows, for example:

Executing a script
{% /stepper-step %}
{% stepper-step %}
If applicable, choose the **Execution location** of the script. To do so, open the edit mode and choose if you want to execute the script **on the server** or on any configured **Script Execution Application (SEA)**.

(For more information on SEA, see the previous chapter and [Installing and Updating Lucanet Script Execution Application](https://support.lucanet.cloud/en/documentation/consolidation-financial-planning/basic-configuration-cfp/install-and-use-opsea.md).)
{% /stepper-step %}
{% stepper-step %}
Click **Execute**.
{% /stepper-step %}
{% stepper-step %}
If applicable, specify the configuration values in the **Execute - _script name_** dialog.
{% /stepper-step %}
{% stepper-step %}
Click **Start** to start the execution.
{% /stepper-step %}
{% /stepper %}

### Executing All Scripts in a Folder Together

{% stepper %}
{% stepper-step %}
Select the root folder or folder of the scripts you would like to execute together. The detail view is displayed as follows, for example:

Executing all scripts of a folder
{% /stepper-step %}
{% stepper-step %}
If necessary, change the sequence of the scripts using the context menu command **Change order**.
{% /stepper-step %}
{% stepper-step %}
Define whether to continue executing scripts in the event of an error:

- Retain the preconfigured **Execute** option if scripts must always be executed, even if an error occurs during execution.
- Select the option **Do not execute** if subsequent scripts are not to be executed when one or more errors arise during execution of a script.

**Note**: To define the behavior in the event of errors when executing folders with subordinate scripts in **directory structures**, choose either the **Continue execution** or **Cancel execution** option.
{% /stepper-step %}
{% stepper-step %}
Click **Execute**.
{% /stepper-step %}
{% stepper-step %}
If applicable, specify the configuration values in the **Execute - _script name_** dialog.
{% /stepper-step %}
{% stepper-step %}
Click **Start** to start the execution.
{% /stepper-step %}
{% /stepper %}

## 'Uses' Tab

By which elements the script is used is displayed on the **Uses** tab.

You can open the respective element by clicking the link in the **Name** column:
