Show TOC

Creating DataSources for DB ConnectLocate this document in the navigation structure

Use

Before you are able to transfer data from a database source system, the metadata, meaning the information on the tables, views, and fields, must be available in BW in the form of a DataSource.

Prerequisites

See Requirements for Database Tables or Views

You have connected a DB Connect source system.

Procedure

You are in the Data Warehousing Workbench in the DataSource tree.

  1. Select the application components in which you want to create the DataSource and choose Create DataSource.

  2. In the next screen, enter a technical name for the DataSource, select the type of the DataSource and choose Copy. The DataSource maintenance screen appears.

  3. Go to the General tab page.

    • Enter descriptions for the DataSource (short, medium, long).

    • As required, specify whether the DataSource builds an initial non-cumulative, and can return duplicate data records within a request.

  4. Go to the Extraction tab page.

    • Define the delta process for the DataSource.

    • Specify whether you want the DataSource to support direct access to data.

    • The system displays Database Table as the adapter for the DataSource.

    • Choose Properties if you want to display the general adapter properties.

    • Select the source from which you want to transfer data.

      • Application data is assigned to a database user in the Database Management System (DBMS). You can specify a database user here.

        In this way you can select a table or view that is in the schema of this database user. To perform an extraction, the database user used for the connection to BW (also called BW user) needs read permission in the schema of the database user.

      • If you do not specify the database user, the tables and views of the BW user are offered for selection.

      • Call the value help for field Table/View.

      • In the next screen, select whether tables and/or views should be displayed for selection and enter the necessary data for the selection under Table/View.

        Choose Execute.

      • The database connection is established and the database tables are read. The Choose DB Object Names screen appears. The tables and views belonging to the specified database user that correspond to your selections are displayed on this screen. The technical name, type and database schema for a table or view are displayed.

        Note

        Only use tables and views in the extraction whose technical names consist solely of upper case letters, numbers, and underscores (_). Problems may arise if you use other characters.

        Extraction and preview are only possible if the database user used in the connection (BW user) has read permission for the selected table or view.

        Some of the tables and views belonging to a database user might not lie in the schema of the user. If the responsible database user for the selected table or view does not match the schema, you cannot extract any data or call up a preview. In this case, make sure that the extraction is possible by using a suitable view. For more information, see Database Users and Database Schemas.

  5. Go to the Proposal tab page.

    The fields of the table or view are displayed here. The overview of the database fields tells you which fields are key fields, the length of the field in the database compared with the length of the field in the ABAP data dictionary, and the field type in the database and the field type in the ABAP dictionary. It also gives you additional information to help you check the consistency of your data.

    A proposal for creating the DataSource field list is also created. Based on the field properties in the database, a field name and properties are proposed for the DataSource. Conversions such as from lowercase to uppercase or from " " (space) to "_" (underscore) are carried out. You can also change names and other properties of the DataSource field. Type changes are necessary, for example, if a suitable data type is not proposed. Changes to the name could be necessary if the first 16 places of field names on the database are identical. The field name in the DataSource is truncated after 16 places, so that a field name could occur more than once in proposals for the DataSource.

    Note

    When you use data types, be aware of database-specific features. For more information, see Requirements for Database Tables and Views.

  6. Choose Copy to Field List to select the fields that you want to transfer to the field list for the DataSource. All fields are selected by default.

  7. Go to the Fields tab page.

    Here you edit the fields that you transferred from the Proposal tab page to the field list of the DataSource.

    If the system detects changes between the proposal and the field list when switching from the Proposal tab to the Fields tab, a dialog box is displayed where you can specify whether you want to copy changes from the proposal to the field list.

    • Under Transfer, specify the decision-relevant DataSource fields that you want to be available for extraction and transferred to BW.

    • If required, change the values for the key fields of the source.

    • These fields are generated as a secondary index in the PSA. This is important in ensuring good performance for data transfer process selections, in particular with semantic grouping.

    • Specify whether the source provides the data in the internal or external format.

    • If you choose the external format, ensure that the output length of the field (external length) is correct. Change the entries, as required.

    • If required, specify a conversion routine that converts data from an external format into an internal format.

    • Select the fields for which you want to be able to set selection criteria when you schedule a data request using an InfoPackage. Data for this type of field is transferred in accordance with the selection criteria specified in the InfoPackage.

    • Choose the selection options (such as EQ, BT) that you want to be available for selection in the InfoPackage.

    • If required, define if the data to be selected is language-dependent or time-dependent in the field type.

  8. Check the DataSource.

    The field names are checked for upper and lower case letters, special characters, and field length. The system also checks whether an assignment to an ABAP data type is available for the fields.

  9. Save and activate the DataSource.

  10. Go to the Preview tab page.

    If you select Read Preview Data, the specified number of data records is displayed in a preview.

    This function allows you to check whether the data formats and data are correct. If you can see in the preview that the data is incorrect, try to localize the error.

    See also: Localizing Errors

Result

The DataSource is created and is visible in the Data Warehousing Workbench in the DataSource overview for the database source system under the application component. When you activate the DataSource, the system generates a PSA table and a transfer program.

You can now create an InfoPackage. You define the selections for the data request in the InfoPackage. The data can be loaded into the entry layer of the BW system, the PSA. Alternatively you can access the data directly if the DataSource supports direct access and you have a VirtualProvider in the definition of the data flow.