Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Hi

My goal was to have an startroutine in update rule (not for DTP) which is the same for all cubes which are the same type but splitted into yearly cubes.

So changes could be done in one function and is then available for all startroutines update rules. The problem was how to solve the issue with the selection of data which is booked into corresponding cube. Because this selection is for each UR different.

The solution was then with a table - so in the startroutine is a lookup for this table. But because of some startroutine does the selection via CALWEEK, others via e.g. CALMONTH etc. - the lookup must be individual for each Datasource / InfoProvider.

So the following include takes the information which datasource and which cube is involved in the dataload the include is executed. With this information a lookup in the table ZRSDCUBE_UPD is made. Because you can maintain several fields per datasource/cube which are responsible for selecting data which should be written into cube, there is a loop on this table.
Also you can maintain in the table all the selection options like BT, NB, etc. - and for sure the value which should be selected as single value, range, etc.

If an updaterule is not available in this table, you get an information in the monitor.

&----


*&  Include           ZUPD_START_CHECKVALUE

&----


*--Define field names and field-symbols to get cube name/datasource

  DATA: lv_field(10) VALUE 'I_INFOCUBE',

        ls_struc(10) VALUE 'G_S_MINFO',

        lv_oltps(10) VALUE 'OLTPSOURCE',

        lv_cond_syntax TYPE string,

        lt_DATA_PACKAGE TYPE TABLE OF DATA_PACKAGE_STRUCTURE.

  DATA: ls_ZRSDCUBE_UPD TYPE ZRSDCUBE_UPD,

        lt_ZRSDCUBE_UPD TYPE TABLE OF ZRSDCUBE_UPD.

  FIELD-SYMBOLS:  0.

      ABORT = 4.

      MONITOR-MSGID = 'RSM'.

      MONITOR-MSGTY = 'E'.

      MONITOR-MSGNO = '799'.

      MONITOR-MSGV1 = 'No active update rule selected from table ZRSDCUBE_UPD'.

      MONITOR-MSGV2 = 'in start routine.'.

      APPEND MONITOR.

    ELSE.

      LOOP AT lt_ZRSDCUBE_UPD into ls_ZRSDCUBE_UPD.

          CLEAR lt_DATA_PACKAGE. REFRESH lt_DATA_PACKAGE.

  •    Prüfen aufgrund des Operators wie verglichen werden soll

  •    Die Logik prüft immer auf WAHR und fügt die Daten zum Datenpackage hinzu

          CASE ls_ZRSDCUBE_UPD-OPERATOR.

            WHEN 'BT'. "Between: Intervall

              LOOP at DATA_PACKAGE assigning

3 Comments