Skip to main content

SAP BW/4HANA (Deprecated)

Setting up a connection with SAP Business Warehouse (BW)

Updated over 6 months ago

Available Metadata

Via this connector, all SAP BW queries available in a SAP BW client can be automatically cataloged, including information on which InfoProvider these are built.

The following metadata is retrieved per BW query. Fields indicated in bold means these fields are made visible in dScribe. Some of the fields are not used but are made available as per standard output by SAP.

For each BW query, the full structure of rows, columns, etc. is retrieved with additional metadata.

  • MAPNAME: the technical name of the BW query

  • NODE_KEY: L1 hierarchy

  • RELATKEY: the hierarchical structure used to link objects which eachother

  • OBJECT: Type of SAP BW object (Query, CompositeProvider, DatastoreObject, Filter,Characteristic restriction, Selection, Variable,..)

  • TEXT: the description of the query

  • VALUE: the technical value of the individual BW object (per line

  • OBJVERS: brings along whether or not the object is ‘A(ctive)’ and thus usable.

  • COMPID: technical field containing the query name (only on the query available)

  • VERSION: technical field containing the version of the object (not used further in dScribe)

  • COMPDIM: technical field containing the dimension of the object (not used further in dScribe)

  • OBJSTAT: description of the ‘OBJVERS’ object (ACT being Active)

  • CONTREL: not used

  • CONTTIMESTMP: not used

  • OWNER: the person who originally created the BW query

  • BWAPPL: not used

  • ACTIVFL: ‘X’ indicates the object is active

  • TIMESTMP: Timestamp of last change of the BW query

  • TSTPNM: Name of the person that has last changed the object

  • TSTPDAT: Date of the last change

  • TSTPTIM: Time of the last change

  • LASTUSED: Timestamp of the last time the object was used

  • CREATED: Timestamp of creation of the BW query

  • CHANGED_WITH: not used

  • INFOAREA: SAP BW Infoarea under which the BW query is saved.

This connector works with both SAP BWonHANA and SAP BW/4HANA systems.

To obtain the required information, an extraction program can be installed to consolidate all relevant metadata into a CSV file. This metadata file can then be loaded into dScribe.

Installing the BW extraction program

To obtain the extraction BW program, please contact us: [email protected]

The zip file contains 2 files that need to be imported on the corresponding BW repositories:

  • K907593.B4D -> needs to be transferred to folder: /usr/sap/trans/cofiles

  • R907593.B4D -> needs to be transferred to folder: /usr/sap/trans/data

The import can be performed via an FTP tool used or via a custom program. In case you prefer to write a custom program, see for example the code below:

zbw_imp_transp_file

REPORT zbw_imp_transp_file MESSAGE-ID zbw_exp_query_info.

INCLUDE zbw_imp_transp_filesrc. " UI

START-OF-SELECTION.

START-OF-SELECTION.

CALL FUNCTION 'ARCHIVFILE_CLIENT_TO_SERVER'

EXPORTING

path = lfile

targetpath = file

EXCEPTIONS

error_file = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE i001.

ELSE.

CALL FUNCTION 'ARCHIVFILE_CLIENT_TO_SERVER'

EXPORTING

path = co_lfile

targetpath = co_file

EXCEPTIONS error_file = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE i001.

ELSE.

MESSAGE s002.

ENDIF.

ENDIF.

Via STMS the transport request for K907593.B4D can be added:

The transport request will be added to the queue, now you can select and import it to your system.

Running the BW extraction program

The following program should now be available: ZBW_EXP_QUERY_INFO_V3

This can be run via transaction SE38 (the extraction will run in the background)

The program output will be displayed like this:

Additionally, the metadata file will be created. You can access it via TA AL11 in the directory as defined when running the program.

Good to know:

  1. The metadata file will always be named ‘queries[date].csv'

  2. To schedule the program to run frequently, we recommend foreseeing the program in a process chain and thus integrating this in an already existing batch job.

Downloading the metadata file

Once generated, you can download the metadata file from BW into a server or as a local file. To do this, you can run the following program via transaction SE38: ZBW_EXP_QUERY_FILE

Uploading the extracted file into dScribe

The metadata file can now be uploaded into dScribe via Admin Portal > Sources > your BW source:

If you haven't created a Source with connector type 'SAP BW' already, do so first.

Once the BW source is selected, the extraction file can be uploaded by clicking on "Add file". The job will automatically start.

Remark: the duration of the upload will depend on the actual size of the file.

Once executed, the load can be followed up via the below logging.

Reached the end? Congratulations! You’re a star!

Did this answer your question?