SAP® Documentation

Single view

/SCA/SDPR_PROG_TEST_IMPORT - Program /SCA/SDPR_PROG_TEST_IMPORT

BAL_S_LOG - Application Log: Log header data   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

Purpose

Import semikolon separated CSV file to call a static class method.

Integration

Prerequisites

Features

Use the F4-help on class name, method name and structure name.

Selection

Standard Variants

Output

Activities

1. Set up a CSV file with one header line containing the field names of the structure

2. Use the F4-help in the selection screen to enter the class, method, parameter and structure name.

3. Enter the file name or select a file with the file dialog which opens when the file name is left blank.

Example

Database table ABC is filled via the static method SAVE_TO_DB of class CL_ABC. The input parameter of the static method CL_ABC=>SAVE_TO_DB is IT_ABC type ABCDB_TAB which is of structure ABCDB_STR.

The fields of the database table (the structure) are PROD_ID, QTY and QTY_UNIT.

To import data to the method CL_ABC=>SAVE_TO_DB you have to do the following:

1. Create a CSV file similar to this:
,,Line 1: "PROD_ID;QTY;QTY_UNIT"
,,Line 2: "Schraube;100;ST"
,,Line 3: "Mutter;200;ST"

2. Call this program with the following parameters:

,,File name:
,,Class name: "CL_ABC"
,,Method name: "SAVE_TO_DB"
,,Parameter name: "IT_ABC"
,,Structure name: "ABCDB_STR"

3. Wait.






ABAP Short Reference   General Material Data  
This documentation is copyright by SAP AG.

Length: 1641 Date: 20191014 Time: 204434     sap01-206 ( 6 ms )

Our Service

Looking for Support? Questions?

The

Consolut

Callback-Service

Leave us your contact details and we will call you back. Panels marked with * are mandatory.