Powered By

Free XML Skins for Blogger

Powered by Blogger

Showing posts with label Creating InfoSources. Show all posts
Showing posts with label Creating InfoSources. Show all posts

Friday, September 12, 2008

Creating InfoSources (SAP Source System) in SAP BW BI

Use

Instead of creating a new InfoSource, you can copy one from SAP Business Content.

Procedure

Choose the InfoSource tree of the Data Warehousing Workbench to create InfoSources for an SAP source system. From the context menu of the affected application component, choose Additional Functions ® Create InfoSource 3.x.

...

1. Select the type.

2. Under InfoSource, enter the technical name of the InfoSource, and then a description.

You can also use an existing InfoSource as a template.

3. Assign a source system to the InfoSource and confirm.

4. From the proposal list, select the DataSource from which transaction data is to be loaded.

Transfer structure maintenance automatically appears.

The system automatically offers you suitable transfer rules, but you can modify these.

5. Maintain the transfer structure. Assign InfoObjects to the fields of the DataSource.

6. The communications structure is adjusted automatically, but you can also include more fields. Activate your selection.

7. Maintain the transfer rules.

8. Activate the InfoSource.

Result

The InfoSource is now saved and active.

See also:

Maintaining InfoSources (Flat Files)

Maintaining InfoSources (External System)

BW Communication Structure in SAP BW BI

Definition

The communication structure is localized in the SAP Business Information Warehouse and displays the structure of the InfoSource. It contains all of the InfoObjects belonging to the InfoSource of the SAP Business Information Warehouse.

Use

Data is updated in the data targets of this structure. In this way, the system always accesses the actively saved version of the communication structure.

In the transfer rules maintenance, you determine whether the communication structure is filled with fixed values from the transfer structure fields, by means of a formula or using a local conversion routine.

Conversion routines are ABAP programs that you can create yourself. The routine always refers to just one InfoObject of the transfer structure.

Maintaining Communications Structures with Flexible Updating in SAP BW BI

Use

Assign the fields of a DataSource to the corresponding InfoObjects of the InfoSource. Although the DataSource contains source system fields that belong together, you can combine fields that logically belong together from several DataSources, from various source systems in the communication structure.

Prerequisites

You have created an InfoSource with flexible updating.

Procedure

You can get to the maintenance of the communication structure using the InfoSource tree of the Administrator Workbench.

  1. Choose Your Application Components
  2. ® Your InfoSource ® Context menu (right mouse click) ® Change.
      • You can enter the required InfoObjects directly into the left-hand column of the communication structure. You can also select InfoObjects using F4 Help, or create new characteristics and key figures by using the toolbar.
      • If you have already assigned a source system and a communication structure already exists with transfer rules and transfer structure, then you are displayed the InfoObjects from the transfer structure in the template. You can select InfoObjects and transfer or remove them from the template into the communication structure using the arrow.
  1. You can also define that the referential integrity should be checked. You can set the InfoObjects that should be checked. A check against the master data ODS object, if it exists, always makes sense. Alternatively you can check against the master data table.

Also refer to Checking for Referential Integrity.

In the InfoObject maintenance you can define the ODS object against which you want to check. See also Tabstrip: Master Data/Texts.

  1. Check your entries and save.

You can only use the InfoObjects of the communication structure in the update rules if you have activated your entries.

If a communication structure already existed in an active version, then the system always reverts back to this when maintaining the update rules. The version of the communication structure, which was created by a simple save, is not used.

InfoObjects of the communication structure, which are used in the update rules or in the transfer rules, cannot be removed from the communication structure.

If an InfoObject is used, the corresponding fields in the communication structure maintenance are highlighted.

Result

You have determined InfoObjects that can be updated in the data targets.

Maintaining Communication Structures with Direct Updating in SAP BW BI

Use

Assign the fields of a DataSource to the corresponding InfoObjects of the InfoSource. Although the DataSource contains source system fields that belong together, you can combine fields that logically belong together from several DataSources, from various source systems in the communication structure.

Prerequisites

You have created an InfoSource with direct updating. You have assigned a source system and a data source to it.

Procedure

After you have assigned the source system, you automatically reach the transfer structure maintenance.

  • Maintain the
  • transfer structure and the transfer rules in the lower half of the screen.

    In the upper half of the screen, you can view the communication structure. The system automatically generates this.

    Depending on whether you have specified a DataSource for attributes or texts, the communication structure contains the attributes or text fields next to the corresponding InfoObject.

    The upper half of the screen (the communication structure) is hidden if you have specified a DataSource for hierarchies to be transferred via IDoc. The communication structure is generated for hierarchies that are transferred using a PSA.

  • Activate your settings.
  • Checking for Referential Integrity in SAP BW BI

    Use

    The check for referential integrity occurs for transaction data and master data if they are flexibly updated. You determine the valid InfoObject values.

    Prerequisites

    The check for referential integrity functions only in conjunction with the function Error Handling on the scheduler tab page Update.

    See also Handling Data Records with Errors.

    In order to use the check for referential integrity, you have to choose the option Always Update Data... . If you choose the option Do Not Update Data..., you override the check for referential integrity. This is valid for master data (with flexible updating) as well as for transaction data.

    Difference in Treating Data Records with Errors

    Checking for Referential Integrity

    Treating data records with errors

    For all InfoProviders

    For all InfoProviders

    Check in the transfer rules

    Check according to update rules for each InfoProvider

    Only for selected InfoObjects

    For all InfoObjects

    Error Handling

    Terminates after first incorrect record

    Possible for all DataStore objects

    BW 2.0: Only for DataStore objects for which BEx Reporting is switched on

    Check against master data table or against a DataStore object possible

    Checked against master data table

    Features

    The verification occurs after filling the communication structure and before filling the update rules. What is displayed in the InfoObject metadata is checked against the master data table (meaning the SID table) or against another DataStore object.

    If you create a DataStore object for checking the characteristic values in a characteristic, in the update rules, and in the transfer rules, the valid values for the characteristic are determined from the DataStore object and not from the master data.

    Transfer Structure in Data Flow 3.x in SAP BW BI

    Definition

    The transfer structure is the structure in which the data is transported from the source system into BI.

    It is a selection of DataSource fields from a source system.

    Use

    The transfer structure provides BI with all the source system information available for a business process.

    An InfoSource 3.x in BI needs at least a DataSource 3.x for data extraction. In an SAP source system, DataSource data that logically belongs together is staged in a flat structure, the extraction structure. In the source system, you are able to filter and enhance the extraction structure in order to determine the DataSource fields.

    In the transfer structure maintenance in BI, you determine which fields of the DataSource 3.x are to be transferred to BI. When you activate the transfer rules in BI, a transfer structure identical to the one in BI is created in the source system from the DataSource fields.

    This data is transferred 1:1 from the transfer structure of the source system into the BI transfer structure, and is then transferred into the BI communication structure using the transfer rules.

    A transfer structure always refers to a DataSource from a source system and to an InfoSource in BI.

    If you choose Create Transfer Rules from the DataSource or the InfoSource in an object tree of the Data Warehousing Workbench, the transfer structure maintenance appears.

    BW Maintaining Transfer Structures in SAP BW BI

    Use

    In the transfer structure maintenance, you specify which fields for a DataSource are to be transferred into a communication structure.

    Prerequisites

    You have created an InfoSource. You have maintained a communications structure.

    A maintained communication structure is required for the procedure described in the following. It is however also possible for you to create the InfoSource first, then maintain the communication structure and finally assign the source system.

    Procedure

  • Select a source system.
  • Select a DataSource that has already been connected using F4 Help or add a new DataSource using Assign DataSource.
  • The fields for the DataSource are displayed in the right half of the tabstrip transfer structure. These are transferred to the left half in the transfer structure by default.

  • Maintain the
  • transfer rules

    BW Processing Transfer Rules in SAP BW BI

    Use

    When you have maintained the transfer structure and the communication structure, you use the transfer rules to determine how you want the transfer structure fields to be assigned to the communication structure InfoObjects. You can arrange for a 1:1 assignment. You can also fill InfoObjects using routines, formulas, or constants.

    You need not assign InfoObjects to each field of the transfer structure. If you only need a field for entering a routine or for reading from the PSA, you need not create an InfoObject.

    However, you must keep the following in mind: When you load data from non-SAP systems, the information from the InfoObject is used as the basis for converting the key figures into the SAP format. In this case you must assign an InfoObject to the field. Otherwise wrong numbers might be loaded or the numbers might be displayed incorrectly in the reports. For more information, also see Conversion Routines in BW.

    Prerequisites

    Before you are able to maintain the transfer rules for an InfoSource, you must assign a source system to the InfoSource and create a communication structure.

    Procedure

    ...

    1. You maintain the transfer rules in the InfoSource tree of the Administrator Workbench.

    For InfoSources, choose Your Application Components ® Your InfoSource ® Context menu (right mouse-click) ® Change.

    2. Select a transfer method. We recommend the PSA transfer method. In the Scheduler you also have other options for data updating. See also Tab Page: Processing.

    3. The transfer structure is displayed in the right half of the screen along with the selected DataSource fields.

    The system uses the data elements to help it suggest InfoObjects that could be assigned to the corresponding fields of the DataSource. These suggested InfoObjects are displayed in the left column of the transfer structure

    The fields for which the system cannot provide any proposals remain empty.

    Using the Context Menu (right mouse-button) ® Entry Options, or F4 Help, you select the InfoObjects that you want to assign to the DataSource fields. Alternatively, you can use the same data elements or field names to help you create an assignment.

    You do not have to assign InfoObjects to all the DataSources fields at this point. Using the transfer rules, you can also fill the InfoObjects of the communication structure with a constant or from a routine.

    4. In the left half of the screen, the communication structure InfoObjects are displayed as well as the transfer rules that the system proposes.

    By selecting one row from both the left-hand side and the right-hand side of the screen, you can use the arrows to assign fields from the transfer structure to the InfoObjects of the communication structure.

    You must remove from the transfer structure any fields that are not required. This improves performance, because otherwise data that you have not selected will be extracted.

    5. For InfoObjects with the conversion routines ALPHA, NUMC or GJAHR, you can set the Optional Conversion key figure. See also Conversion Routines in BW.

    6. You can create a start routine if you use the PSA to load the data.

    This improves the system performance, for example, when you check if a certain request is already available in an ODS object, and makes the update rules consistent.

    7. You can enhance or modify the transfer rules suggested by the system.

    To do this, select a transfer rule type by clicking on the corresponding Type symbol in the appropriate row:

    · InfoObject: The fields are transferred from the transfer structure and are not modified.

    Use the Default transfer rules function to assign fields in the transfer structure to fields in the communication structure.

    · Constants: An InfoObject is filled by a fixed value.

    You could, for example, assign the fixed value US to the InfoObject 0COUNTRY.

    · Formula: An InfoObject is filled with a value that is determined using a formula.

    · Routine: An InfoObject is filled from a local transfer routine.

    Local transfer routines are ABAP programs that you can create, modify, or transfer. The routine only affects the selected InfoObject in the relevant communication structure.

    For an explanation of the procedure see Creating Transfer Routines.

    8. Activate the transfer rules. Data can be loaded from the source system in an activated version only.

    The status of the transfer rules is shown as a green or a yellow traffic light.

    Since not all of the fields in the transfer structure have to be transferred into the communication structure, you can activate the transfer rules with just one assigned field. The status is shown as a yellow traffic light.

    A red traffic light indicates an error. The transfer rules cannot be activated if there are errors.

    Result

    You have ensured that the communication structure can be filled with data.

    BW Start Routines in Transfer Rules in SAP BW BI

    Use

    You have the option of creating a start routine in the transfer rules maintenance screen. This start routine is run for each data package after the data has been written to the PSA and before the transfer rules have been executed. The entire data package in the transfer structure format is used as parameter for the routine.

    Functions

    You can change the data package by adding or deleting records.

    If you add or delete records, this might not be detected by the error handling.

    The start routine contains a return parameter that causes processing of the entire package to be terminated with an error message for values <> 0.

    The option of creating a start routine is available only for the PSA transfer method. The routine is not displayed if you switch to the IDoc transfer method.

    For general information on routines, see Update Routines and Start Routines.

    Example

    You want to use an InfoSource with direct update to load additional texts from a flat file. You do not need the Japanese and Russian texts that are supplied with the file. These are filtered out by a start routine. The code for this start routine is shown below:

    1.

    *DATA:l_s_datapak_line type TRANSFER_STRUCTURE,

    2.

    * l_s_errorlog TYPE rssm_s_errorlog_int.

    3.

    delete datapak where LANGU='J'.

    4.

    delete datapak where LANGU='R'.

    5.

    *abort<>0 means skip whole data package!!

    BW Creating Transfer Routines in SAP BW BI

    Procedure

    ...

    1. In the transfer rule maintenance screen, choose Create Routine for the relevant InfoObject.

    2. For the transfer rule choose Routine ® Create in the dialog box.

    3. Specify a name for the local transfer routine that you want to create.

    4. You have the option of using transfer structure fields in the routine. You can choose between

    · No fields:

    The routine does not use any source structure fields. Make this selection when you determine the user name from a system variable (SY-UNAME), for example.

    · All fields:

    The routine uses all source structure fields. In contrast to explicitly selecting all fields (see below), this option also includes fields that are added to the source structure later.

    · Selected fields:

    If you make this selection, you have to explicitly select the fields used. Also in the program editor for implementing routines, only the selected fields are available to you in this case.

    You need these settings, for example when using SAP RemoteCubes, so that you can also determine the transfer structure fields for InfoObjects that are filled using transfer routines.

    Choose Next. You get to the transfer routine ABAP editor.

    5. Create a local transfer routine or change an existing routine.

    You can not delete the fields used in the routines from the transfer structure. They are displayed in the where-used list

    For SAP RemoteCubes you may have to create an inversion routine for transaction data. See also Inversion Routines.

    6. Save your entries.

    BW Inversion Routine in SAP BW BI

    Use

    If you have defined transfer routines in the transfer rules for the InfoSource of a SAP RemoteCube, for performance reasons, it makes sense to also create inversion routines for each.

    When jumping to a transaction in another SAP system using the report-report interface, you have to create an inversion routine for the transfer routine if you are using one, because otherwise the selections cannot be transferred to the source system.

    Functions

    You create an inversion routine in the routine editor for the already defined transfer routine. This routine is required, for example, during execution of queries on SAP RemoteCubes in order to transform the selection criteria for a navigation step into selection criteria for the extractor. The same goes for jumps to another SAP system with the report-report interface.

    The form routine has the following parameters:

    · I_RT_CHAVL_CS: The parameter contains the selection criteria for the characteristic in the form of a selection table.

    · I_THX_SELECTION_CS: The parameter contains the selection criteria for all characteristics in the form of a hash table for selection tables of the individual characteristics. You only need this parameter if the inversion is still dependent on selection criteria of other characteristics.

    · C_T_SELECTION: In this table parameter you have to return the transformed selection criteria. The table has the same structure as a selection table, but it also contains the field names in the FIELDNM component. If an empty table is returned for this parameter it means the table is a selection of all values for the fields used in the transfer routine. If an exact inversion is not possible, you can also return a superset of the exact selection criteria. In case of doubt, this is the selection of all values that was also provided as a suggestion during creation of a new transfer routine.

    · E_EXACT: This key figures determines whether the transformation of selection criteria was executed exactly (constant RS_C_TRUE) or not (constant RS_C_FALSE).

    Activities

    Enter your program code for the inversion of the transfer routine between *$*$ begin of inverse routine ... und *$*$ end of inverse routine ... so that the variables C_T_SELECTION and E_EXACT are provided with the appropriate values.

    With an inversion routine for a SAP RemoteCube it is sufficient if the value set is restricted in part. You do not need to make an exact selection.

    With an inversion routine for a jump via RRI, you have to make an exact inversion so that the selections can be transferred precisely.

    Example

    You can find an example of the inversion routine by clicking Routine Info in the routine editor.

    BW Error Handling in the Transfer Routine in SAP BW BI

    In a transfer routine, you have the option of transferring error messages and warnings to the monitor.

    Note the following:

    · When you use the transfer routine to transfer messages to the monitor, you need to maintain in the scheduler the settings that control how the system behaves if an error occurs. See also Handling Data Records with Errors.

    · If, in your routine, you set the RETURNCODE <> 0, the record is transferred to error handling, but it is not posted.

    · If, in your routine, you set the RETURNCODE = 0, the record is posted. If you transfer X-messages, A-messages, or E-messages to the monitor, the record is written to the error request at the same time, because the monitor table contains error messages.

    If you subsequently post this error request to the data target, records can be posted in duplicate. This does not happen if W-messages are transferred to the monitor.

    Archives