datasource enhancement in sap bi

Upload: deveshbabu

Post on 09-Oct-2015

79 views

Category:

Documents


4 download

DESCRIPTION

data-source

TRANSCRIPT

  • DataSource Enhancement in SAP BI 23/02/2010

    Datasource Enhancement

    NGM-INDIA/SAP BI Vineeth Subramanian. B [email protected]

  • DataSource Enhancement

    DataSource Enhancement In many of the business scenarios standard datasource provided by SAP wont be enough to meet the business requirement. So there arise many situations in which datasource need to be enhanced so as to meet the customer requirements. This document covers step by step process for making datasource enhancement. Datasource 0PM_MEASUREMENT is used as an example in this document. The datasource 0PM_MEASUREMENT is enhanced so as to include an additional field ZZNOOFDAYS which calculate the number of days in a month. There is an existing field in the datasource which is a DATE field, from which month value will be separated and then function module NUMBER_OF_DAYS_PER_MONTH_GET will be used to calculate days in the month. First go to transaction RSA6 and select the datasource 0PM_MEASUREMENT and click on Enhance Extraction Structure button as shown in Figure 1.

    Click here after selecting the datasource

    Figure 1

    Internal Use 2

  • DataSource Enhancement

    Select a name for the enhanced datasource as shown in Figure 2.

    Figure 2 After giving a name for the new structure click OK which will display a screen as shown in Figure 3.

    Figure 3 Add the new field to the existing datasource by specifying a component and component type as shown in Figure 4.

    Figure 4

    Internal Use 3

  • DataSource Enhancement

    If necessary a new component type can be created as shown in Figure 5 or use a pre existing component type.

    Figure 5 Now go to transaction RSA6 and double click on the datasource to see the list of fields. We can see that the new field has been added. After going back to transaction RSA6 select the datasource and click on the edit button .Then go to the list of fields and then for the new field, uncheck the HIDE Check Box (shown in Figure 6) and save.

    Internal Use 4

  • DataSource Enhancement

    Figure 6 Now again go to RSA6 and double click on the datasource, to see the list of fields including the field ZZNOOFDAYS (shown in Figure 7).

    Figure 7

    Internal Use 5

  • DataSource Enhancement

    Now go back to transaction RSA6 and click Function Enhancement as shown in Figure 8.

    Figure 8 Select the custom project for SAP BI enhancement as shown in Figure 9.

    Figure 9

    Internal Use 6

  • DataSource Enhancement

    For the project select the sub object as Enhancement Assignment (shown in Figure 10) and click on display button.

    Figure 10 Then click on components tab as shown in Figure 11.

    Figure 11 Click the function exit EXIT_SAPLRSAP_001 as shown in Figure 12. Since the datasource 0PM_MEASUREMENT is a transactional datasource, we select the first exit which is for transactional datasources.

    Figure 12

    Internal Use 7

  • DataSource Enhancement

    Then double click on the include as shown in Figure 13.

    Figure 13

    Then click on edit button to edit the code as shown in Figure 14.

    Figure 14 Within that for the datasource, initially declare the work areas.

    Internal Use 8

  • DataSource Enhancement

    Figure 15 Then make a case for the datasource as below and write down the logic

    Figure 16 In this example the number of days in a month is derived by passing the month and year. Now check in transaction RSA3, whether the datasource is working fine or not.

    Internal Use 9

  • DataSource Enhancement

    Internal Use 10

    New field ZZNOOFDAYS is populated with values

    Figure 17 Once the datasource is modified, replicate this datasource in BI. Also change the structure of ODS and Infocube. Then transfer and update rules by adding new info object.