Importing a File

Using this function, you import data from a file. You can transfer transaction data, plan data, comments and master data hierarchies. In order to import larger datasets periodically, you can schedule program RKCFILE0 in the background.

Prerequisites

You must have maintained the sender structure, the transfer rules, and where necessary, the sender structure package (see Types of Data Transfer ).

Examples

You can use the following examples to help set the sender structure, the transfer rules, and the parameters for various tasks:

Importing a File: Transaction Data

Importing a File: Master Data

Importing a File: Master Data Hierarchy

Procedure

To import data from a file, proceed as follows:

  1. Depending on whether you wish to import transaction data, plan data, master data, comments or a master data hierarchy, choose Import file under either Transaction data, Plan data, or Master data .

  2. Enter a sender structure and a file name, or the name of a logical file.

  3. Choose File system to define whether the file is on the presentation server or the application server. Make sure that the process which is to read the data has the correct access authorization for the file. You must enter the path correctly. If you are reading data from the application server, ensure that you enter the path from the point of view of the user who started the application server. Enter the path as an absolute path.

    Note Note

    Note that only files from the application server can be imported in background processing.

    End of the note.
  4. Under Editing you can choose to:

    • Execute a data transfer,

    • Display the file,

    • Display the assignment of sender record fields to field contents,

    • Save the records temporarily.

      If you select Sender set - display field assignments , the system displays a list that makes clear which value is contained in which sender record field. Using this list, you can see if you have described the sender structure incorrectly.

  5. At File type you determine if you are dealing with a text file. With this type of file, newline appears at the end of each line.

    For a binary file, the SAP binary format is expected. Note that binary files cannot be imported from the presentation server.

    With TXT format, the fields in the lines should be separated with tabs.

    With CSV format, the fields should be separated with semicolons.

    With MC format, the file to be imported is split into two parts: firstly, lines at the beginning with characteristic values which are valid for the rest of the records, and secondly, individual records. The fields in these individual records are split by a field separator (either a comma or a semicolon). For more information, see Importing a File: File in MC Format .

    Note that with TXT, CSV, and MC formats, fields of type C which are not text fields are automatically converted into capital letters.

  6. If you wish to import numbers in packed numbers, use Number format to define whether these packed numbers are in the file in double length as characters 0123456789 +-, or if they already exist in SAP format P. Internally, the system usually works with packed numbers during a data transfer. If the numbers are stored in single length in the file, the system assumes that the numbers do not need to be packed into SAP-internal format. If the numbers are stored in double length in the file, the system converts the numbers into packed format. The minus sign can be before or after the figures. Apart from binary and text files, it is assumed that the packed numbers are always stored in double length in the file and therefore need to be converted.

    Specify if the numbers do not have any editing characters or if they have a decimal point or comma.

    This option is irrelevant when importing master data or comments on master data, and is not available in these cases.

    Integers and floating point numbers must be between 12 and 16 bytes in length in the file.

  7. Choose Date format to determine whether the date reads YYYYMMDD or DD.MM.YYYY. This option only applies to TXT, CSV, and MC formats. For all other formats, the date reads YYYYMMDD.

  8. Other settings :

    With Data format you can specify whether the data is in ASCII or EBCDIC format. In EBCDIC format, all fields apart from packed fields (type P ) and hexadecimal fields (type X ) are converted from EBCDIC to ASCII. Fields of type P and X do not need to be converted.

    If your file contains comments rows that are not to be imported, you can indicate them as such here. Enter the character with which the comment rows begin. The system will then ignore these rows when importing.

  9. Settings for repeat fields :

    In many information systems, the period is locked for transaction data. The period is not then, in the key of the transaction data record. In such cases, the key figures are stored n times in the data portion of the record, where n is the number of possible periods. Records of this structure cannot be transformed using data transfer rules into n transaction data records, in which the period is stored in the key, and the key figure exists only once in the data portion. A transformation during the data transfer is necessary for this. For the data transfer, the period must be contained in the sender structure.

    To transform such a record, proceed as follows:

    • In Index field, enter the characteristic that only exists in the receiver structure, for example PERDE (period).

    • In Repetition factor, enter the number of records to be generated in the receiver structure, for example 12 (periods).

    • In Start value for index field , enter the start index, for example (period) 1. The Increment for index field defines how the index is to develop, for example start value + 1 (increment).

    • The Repeat fields are the fields of the sender structure in which the fields of the original structure are to be summarized.

      For more information, see Importing a File: Transformation of a Record .

Result

If you have selected Display file, the system displays a list of the transferred records. If you have selected Sender-set-display field assignments, the system displays additional information about how the individual fields of the sender record were filled. If you have transferred the data, a confirmation message will appear. You will find more detailed information on the update and summarization in the log (see Displaying the Transfer Log and Processing Errors ).