6.2    SAP BW/4HANA DataSources

DataSources are SAP BW/4HANA objects that contain a collection of rules, parameters, and fields that allow you to access or extract data from source systems and make them available in SAP BW/4HANA. This set of fields can be organized either in a flat structure or in multiple flat structures, for example, the extraction of hierarchies.

DataSources are defined according the type of data they process. These DataSources types are as follows:

These DataSources are grouped in application component hierarchies under each source system the DataSource is linked to. New application component nodes can be created locally in SAP BW/4HANA via the source system’s context menu or via any application component context menu by selecting New…Application Component.

Note

File-type DataSources still use the SAP GUI DataSource editor embedded in an Eclipse session. Other source system connection types, such as ODP, big data, and SAP HANA, use the native Eclipse wizard for creating DataSources.

The following subsections describe the creation of DataSources using the Eclipse-based native wizard and discuss the special case of file-based DataSources, which use Transaction RSDS.

6.2.1    Creating a DataSource with the Native Eclipse-Based Wizard

You can create a DataSource in different ways:

After accessing the DataSource creation menu option, the New DataSource screen is displayed where you can enter the main properties for the DataSource.

The first part of the main properties, as shown in Figure 6.16, includes the following items:

SAP HANA Database DataSource: General Parameters 1

Figure 6.16    SAP HANA Database DataSource: General Parameters 1

The second part of the main properties, as shown in Figure 6.17, includes the following items:

The last part of the DataSource main parameters, as shown in Figure 6.18, creates the association of the DataSource with the source system object used as the data provider. The available options depend on the selected source system type.

SAP HANA Database DataSource: General Parameters 3

Figure 6.18    SAP HANA Database DataSource: General Parameters 3

After completing the first part of the wizard, the DataSource configuration is shown as in Figure 6.19. It has three main sections, each with its own tab: Overview, Extraction, and Fields.

SAP HANA Database DataSource Overview Tab

Figure 6.19    SAP HANA Database DataSource Overview Tab

The Overview tab includes the following main properties:

The Extraction tab, shown in Figure 6.20, provides a set of properties to define how data will be extracted or accessed from the source system:

SAP HANA Database DataSource Extraction Tab

Figure 6.20    SAP HANA Database DataSource Extraction Tab

The Fields tab, shown in Figure 6.21, provides the available fields for the source in the left panel; and you can set the group of fields to be used to transfer data from the source to SAP BW/4HANA by selecting the Transfer checkbox for each field you want to use.

DataSource Fields Tab

Figure 6.21    DataSource Fields Tab

Each field has a set of properties displayed in the right panel. You can further customize the properties of each field as follows:

You can use the DataSource in the system after clicking Activate (inline image). As shown in Figure 6.22, this makes this DataSource available for use, and you can find it in under the Project Explorer panel.

DataSources in Project Explorer Panel

Figure 6.22    DataSources in Project Explorer Panel

6.2.2    Creating a DataSource for File-Type Source Systems

File-type DataSources have been widely used in SAP BW since the very first version of the product; they’re also available in SAP BW/4HANA.

You can create a file-type DataSource via the same menu paths as described in Section 6.2.1, which are:

The first two options will open the Eclipse wizard, because the source system type isn’t yet selected. Once a file-type source system is selected and you proceed, the Eclipse wizard will open Transaction RSDS to complete the creation of the file type DataSource in an embedded session in Eclipse. The last option opens Transaction RSDS directly, because the source system is already preselected.

Figure 6.23 shows the first screen of a file-type DataSource creation. Here, you specify which source system will be used to establish a connection to your file system, the name of the DataSource, and the type of data being transferred. You can also create the DataSource using another object as a template. For example, we can use a target Advanced DSO as the basis for the field structure of this DataSource.

File-Type DataSource Creation: Initial Screen

Figure 6.23    File-Type DataSource Creation: Initial Screen

The General Info tab shown in Figure 6.24 allows you to enter a Description to identify the DataSource, enter the Application Component, identify if the DataSource has unique records or if duplicates are allowed, and set if it’s an Opening Balance DataSource.

File-Type DataSource: General Info Tab

Figure 6.24    File-Type DataSource: General Info Tab

The Extraction tab shown in Figure 6.25 allows you to define the source of the data being transferred to SAP BW/4HANA and the extraction method.

File-Type DataSource: Extraction Tab

Figure 6.25    File-Type DataSource: Extraction Tab

The source of the data is identified by the Adapter and Data Format as follows:

Note

Local machine adapters and MS Excel can’t have data processed in the background, including load via process chains. For background data loads, use the flat file adapter type with files stored on a file-system directory accessible by SAP BW/4HANA and the files visible in Transaction AL11.

The Proposal tab shown in Figure 6.26 allows you to automatically receive a proposal for the DataSource field names, data types, and field lengths based on a sample of the existing records in the source file. The number of records to be used for this sampling process is defined in the No. of Data Records field.

File-Type DataSource: Proposal Tab

Figure 6.26    File-Type DataSource: Proposal Tab

The Fields tab shown in Figure 6.27 allows you to define the field structure of the DataSource. You can manually define the data types, length, case-sensitivity, primary key, conversion routines and the data format present in the source in case of using the conversion routines, which data selection operators are allowed, and time or language links for each field present in the DataSource structure.

You can also associate an InfoObject to the DataSource field as a template to retrieve the definitions of the InfoObject to the DataSource field. You can adjust those definitions according to the source of the data you’re loading into SAP BW/4HANA.

File-Type DataSource: Fields Tab

Figure 6.27    File-Type DataSource: Fields Tab

The Preview tab allows you to preview the data with all conversions and field characteristics in the DataSource structure to help perform the DataSource’s unit test.

Once the DataSource is created, you must activate it by clicking Activate (inline image). The DataSource will be in the Project Explorer panel under the source system and application component associated with it and will be ready to be used in SAP BW/4HANA data flows.

6.2.3    ODP DataSources

ODP DataSources are usually created in SAP source systems and their metadata replicated to SAP BW/4HANA. Besides metadata replication, you can create manually ODP DataSources in SAP BW/4HANA and during their creation establish the link between the available ODP provider in the SAP source system.

For DataSources replication, navigate to the desired source system node in the Data Sources tree of the Project Explorer panel; for faster selection of available DataSources, you can navigate to the Application Component node to which the desired DataSources are linked.

Once you select the node for which you want DataSources to be replicated, right-click it and choose Replicate; a list of available DataSources for replication will appear, as shown in Figure 6.28.

List of Available ODP DataSources to Replicate

Figure 6.28    List of Available ODP DataSources to Replicate

From the list of available DataSources for replication under the selected application component, you can select either all DataSources or just specific ones to replicate the metadata from the source system to SAP BW/4HANA. This way, you can avoid replicating unchanged DataSources currently in use, which may also be time consuming.

Proceeding to the next step, as shown in Figure 6.29, you can confirm the number of DataSources being replicated and can activate them after the replication by setting the Activate New DataSources flag.

Confirmation of ODP DataSources Replication

Figure 6.29    Confirmation of ODP DataSources Replication

The replication of the DataSources will start in the background, and SAP BW/4HANA will open Transaction SM37 (Job Monitor) to help you monitor the progress of the replication. Once the job is finished, the selected DataSources are replicated and activated if the corresponding option was selected.

Once you refresh the respective Data Sources tree, you can see the DataSources active and ready for use in SAP HANA flows.