SAP ABAP IMG Activity OKCM_UPLOAD (Define flexible upload)
Hierarchy
BBPCRM (Software Component) BBPCRM
   CRM (Application Component) Customer Relationship Management
     CRM_APPLICATION (Package) All CRM Components Without Special Structure Packages
       KC (Package) Cost Accounting Controlling EIS
IMG Activity
ID OKCM_UPLOAD Define flexible upload  
Transaction Code S_ALR_87000272   IMG Activity: OKCM_UPLOAD 
Created on 19981222    
Customizing Attributes OKCM_UPLOAD   Define flexible upload 
Customizing Activity OKCM_UPLOAD   Define flexible upload 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name OKCM_UPLOAD    

In this step, you define how data from text files in ASCII format is assigned to one or more sender structures so that it can be imported to the SAP System.

The data in such files usually originates from a Microsoft Excel sheet and has been exported as a text file. The fields in these text files can be separated as follows:

  • by a tabulator character (ASCII Code 9) (TXT format)
  • by a comma or semicolon (CSV format; comma-separated values)

Upload from a text file enables you to select any data, assign it to the fields of a sender structure, and then to transfer it to one or more EC-EIS aspects. See also Define sender structure of transaction data.

Note: You can only import data from Excel tables if you have previously created a text file with the appropriate properties in the context of Microsoft Excel. The XLS files, generated by Excel cannot be imported directly into the SAP System.

Example

Requirements

  • You have decided which cells of your Microsoft Excel sheet you wish to transfer into which aspect.
  • You have saved the sheet in CSV or TXT format.
  • If a relevant sender structure sender structure did not exist, you have created one.

Standard settings

Recommendation

Activities

  1. Enter the path of the file to be transferred or the file that is to serve as a reference for other files, e.g. c:\excel\sales.txt.
    Note: The file name extension must be either '.CSV' or '.TXT'. Modify the file name if necessary before you start the upload. Otherwise, you will get an error message.
  2. Enter any name to describe the data to be loaded. The file description that you create in the following steps is stored under this name in the system.
  3. If you load a CSV file, you must specify whether the fields are separated by a comma or semicolon. Choose 'Program -> Execute'. The system opens the specified file and reads the data contained in it.
    On the next screen you will see a compressed version of your Microsoft Excel sheet. This is a copy of the row and column structure of the original file. The character 'X' indicates those cells for which the file contains no values.

To create the file description, you must determine the type of the data read from the file. You do this by splitting the entire volume of read data into various cell ranges, and then combining these with one another. The following area types exist:

  • Key areas: A key area contains cells which hold characteristic values (e.g. the period).
  • Header areas: A header area contains cells which hold characteristic values that are valid for several key areas and value areas (e.g. the fiscal year to which the periods listed in the key areas belong).
  • Value areas: A value area contains cells which hold key figure values (e.g. sales, number of employees).

The following rules apply when defining the different areas :

  • There must always be a value area; in addition, there must be either a header area or a key area.
  • You can create as many areas of each type as you wish.
  • A header area is always restricted to a single cell. If you select more than one cell, you cannot define the area as a header area.
  • Key areas and value areas always consist of corresponding rows or columns of the same dimensions; this means that key areas and value areas, laid on top of each other, would correspond exactly. If the areas are defined in column form, for example, then key areas and value areas that refer to each other must begin in the same row and they must extend over the same number of rows.
  • Key areas cannot extend to more than one column and row at once.
  • For each header area or key area, you must specify which value area(s) it refers to.
  • When creating a value area, the system automatically allocates a sequential number for the area. The area is identified by this number if you define dependencies between areas of different types (see below).

To split the data that has been read into areas, proceed as follows:

Defining value areas:

  1. First define a value area that contains data by double clicking to select the top left cell and the bottom right one of the area. The area is highlighted in color.
  2. Select 'Edit -> Value area'. A dialog box appears containing the number of the value area that has been automatically generated. Note this number, as you will need it when you define the key areas. The coordinates of the area you have just selected are also displayed. You can change these coordinates later.
  3. Specify whether the data to be imported is master data or transaction data.
  4. Enter the name of the sender structure that you wish to use. Then, from the sender structure fields, choose that field that is to receive the imported data from the selected value area. Note that only key figures are appropriate for a value area.
    You select a sender structure for each value area separately. With one upload you can distribute the data imported from a file to various aspects in the system.
    Note: If the technical name of the field is itself in a cell in the Microsoft Excel sheet, you need not specify a sender structure field. Instead, you can define a key area for the Excel cell that contains the field name and then link this to the value area. This is also possible for many joined cells that you can define together as a key area.
  5. Determine if initial values are to be supressed. If you set this indicator, fields that do not receive data are not updated. You should use this setting if the delivered data is incomplete.
  6. The other dialog fields are meant for special purposes: You can choose whether you wish to save the name of the imported file also, and if the numbers of the original columns and rows are to be retained in the sender structure. This may be of use later to check exactly where the imported data originated; in some cases the file name itself contains relevant information (for example, on time period to which the data refers to). However, this does result in redundant information being generated since the file name is saved in a specific field every time a data record is delivered during import.
  7. Proceed similarly for all value areas that you wish to define.

Defining key areas:

  1. Select a column or row area that contains the values of a characteristic. This can be a single cell, an entire row or column, or part of a row or column. However, it is important that you observe the rule mentioned above, whereby key and value areas must be congruent.
  2. Choose 'Edit -> Key area'. A dialog box appears. Using the automatically assigned area number, enter the value area(s) that the key area refers to. If the key area is to refer to all value areas, you can enter an asterisk ("*") instead of the area number.
  3. Enter the name of the sender structure field that is to receive the values. Note that, for a key area, only characteristics are appropriate.
  4. Proceed similarly for all key areas that you wish to define.

Defining header areas:

  1. Select a single cell containing a characteristic value that is valid for several or all value areas.
  2. Choose 'Edit -> Header area'. A dialog box appears. Using the automatically assigned area number, enter the value area(s) that the header area refers to. If the key area is to refer to all value areas, you can enter an asterisk ("*") instead of the area number.
  3. Proceed similarly for all header areas that you wish to define.

After you have defined all the areas, you assign a generic file name to the file description. This enables the system to link a file to be imported with the file description.

Note: Depending on which generic file name you create, some problems regarding data import may arise which are difficult to trace. Therefore, you should read the explanatory notes on generic file names.

When you have made all the required settings, save them. Then you can import files into the system using the flexible upload function.

Further notes

Importing large files and importing data from files with changing numbers of data records

If the files you are importing using a file description, do not have a uniform length (that is, differing numbers of data records are being delivered), you can allow for this when defining the value and key areas: In the dialog field for defining the value areas, enter the maximum va

Business Attributes
ASAP Roadmap ID 252   Prepare Data Transfer Fields 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Assigned Application Components
Documentation Object Class Documentation Object Name Current line number Application Component Application Component Name
SIMG OKCM_UPLOAD 0 HLA0009491 Data Collection 
Maintenance Objects
Maintenance object type C   Customizing Object 
Assigned objects
Customizing Object Object Type Transaction Code Sub-object Do not Summarize Skip Subset Dialog Box Description for multiple selections
IMGDUMMY D - Dummy object KCED KCED Define flexible upload 
History
Last changed by/on SAP  19981222 
SAP Release Created in