File Adapter (Type "Import")

The File Adapter function of type “Import” provides automated access to files so that file content can be imported as input for calculations.

Key Features

Header

In the header, you define the principal behavior of the File Adapter function. The following fields are available:

  • File IO Type: Choose “Import” to import data from a server file.

  • File Format: Refers to the definition of a file format, which is maintained centrally for the environment.

  • File Name: Specifies the name of the file on the server that is used. Use the following format: “<File name>.ext”.
  • Header Row: Defines the row number in which the header columns are available. The value 0 means that there is no header row.

  • Number of Threads: Multiple threads can reduce the import time. The maximum permitted value is 255.

  • Batch Size: Specifies the number of records to be inserted in each commit.

  • Table Lock: If this is set, the data for column store tables is loaded faster.

  • No Type Check: Specifies that the records are inserted without checking each field type.

  • Fail on Invalid Data: Specifies that the import fails unless all the entries are imported without errors.
    • If you mark this checkbox in the header of the function, the system will display any exceptions that may occur during run time on the UI.

    • If this checkbox is not marked and no exceptions occur during run time, the system will display a message to inform you that a log file has been created. This is only the case if the displayed data or behavior is not as expected.

Server Files

This is a helper tab that has no influence on the runtime of the function.

The Refresh Directory List button shows a list of files that are currently available on the server. The content of these files can also be viewed here. Use the Select File button to register it in the header as the file name to be used.

Small files can also be uploaded and downloaded but we recommend that you use server-side IT-driven mechanisms to manage files in the server directory.

Preview

This is a helper tab that has no influence on the runtime of the function.

Once the file name is set in the header, the Preview button allows you to preview the file.

Stage

This is a helper tab that has no influence on the runtime of the function.

Once the file name is set in the header, the Stage tab allows you to stage the file in a temporary table separating the data into columns. This makes it easier to analyze data, including filtering, sorting, and checking.

Mapping

The file columns can be mapped to existing fields in the environment. The Field Mapping Proposal button helps you to match columns to field names.

If the used file has a header row (a row containing the column names), the file columns mapped on the Mapping tab must have the same name as the columns from the file.

Optionally, formulas can be defined to convert data.

Procedure

Function Access

Follow the steps below to access the File Adapter function of type “Import”:

  1. In the client where SAP Profitability and Performance Management is installed, choose Start of the navigation pathSAP Menu Next navigation step Profitability and Performance Management Next navigation step Modeling Next navigation step Start My EnvironmentsEnd of the navigation path.

  2. The Environment screen appears in a separate browser window. Choose an existing environment and continue. Within the environment, you can set up the newly added function.

Function Configuration

Follow the steps below to configure the File Adapter function of type “Import”:

  1. In edit mode, configure the following required fields in the header. For more information about the header, see the Key Features section above.

    • File IO Type = “Import”
    • File Format: Choose the file format configured in Start of the navigation pathEnvironment Next navigation step File FormatsEnd of the navigation path
    • File Name
    • Header Row
    • Number of Threads
    • Batch Size
    • Table Lock
    • No Type Check
    • Fail on Invalid Date
  2. Define the fields to be used on the Signature tab.

  3. Choose Field Mapping Proposal on the Mapping tab to generate the mapping of columns to field names with field attributes.

  4. Define the checks to be used on the Checks tab, if needed.

  5. Choose Save and then choose Activate.

Related Information