Skip to Content
author's profile photo
Former Member

reading data from infocube

Hi all,

We have an infocube which contains some figures like number of days, number of hours etc. We should calculate some indicators on them, something like:

Ind = Hours1 * 100 / Hours1 + Hours2

where Hours1 and Hours2 are figures which come from two different records, with codes 1 and 2.

We are not using BEx, but some other reporting tool which takes quite a long time over it. So we were asked to write an ABAP program which should read the data out of the InfoCube and calculate these indicators on basis of such fomulas. Writing a Transfer Rule with the InfoCube as DataSource proved not to be such a good idea because data is split in packages for the upload, so a subroutine within the transfer rule might not be able to find the records with codes 1 and 2 within the same package and that gives errors.

The question is: does anyone know of programs/functions/classes which could do the job? so read data from the infocube and eventually update it back into the infocube after the calculations?

Thanks in advance,

Ioana

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • author's profile photo
    Former Member
    Jul 13, 2004 at 04:34 PM

    Ioana,

    why not write a start routine and populate a new column during the load ? this way you wont have to read the cube.

    Cheers

    Tushar

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Tushar,

      The problem is - during the load data is split in several packages if you have more than 50000 records (and usually, we do). So it can happen that one of the records we need comes in package A, and the other in package B. The start routine sees only one package at a time (we have tested this in the debugger) and can't find both records and as a result it can't calculate anything...

      Cheers,

      Ioana

  • Jul 17, 2004 at 01:18 AM

    How about loading the data only in the PSA and using the start routine in the update rule.

    Poonam

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jul 17, 2004 at 09:47 PM

    Hi Ioana,

    maybe Analysis Process Designer (APD) can solve your problem. In an APD process you can read the data from any InfoProvider, calculate your key figures in an ABAP routine and write the result to an ODS. This ODS has to be transactional and can't be directly reported, but you can report the ODS data by defining an InfoSet on it; you can also write the ODS data to any cube via the data mart interface. The data package split shouldn't be a problem in the APD process because you can define a partitioning characteristic in the APD routine.

    The APD is available in BW 3.x via transaction RSANWB.

    Martin

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      If you do want to read the data in the infocube, try using the function module RSDRC_CUBE_DATA_GET. understand that SAP does not support this module anymore...

  • author's profile photo
    Former Member
    Jul 21, 2004 at 05:55 PM

    Ioana,

    If you stage your data in an ODS object before loading the cube, in the start routine you can lookup the ODS active data table to perform the calculation.

    Thanks,

    Gopal

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jul 31, 2004 at 05:23 AM

    Hi Ioana,

    If you have solved this problem then could you share your experience .

    Thanks,

    Gupta

    Add comment
    10|10000 characters needed characters exceeded