Skip to Content
avatar image
Former Member

extract data from CUBE using ABAP

Hi,

Currently we are using function 'RSDRC_CUBE_DATA_GET'

to extract the data using ABAP,But SAP doesn't recommends it as it is not released to customer's.

Also tried Infospoke but not flexible as we have complex selection criteria and there is no exclude option and Dynamic selection.

Any other alternative way is there?

Currently we are in version 3.1 sp 9

Thanks in advance,

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Mar 11, 2004 at 06:43 AM

    As of now there is no way other than info spoke to extract data from the cube. TO handle the Dynamic and Complex selection issue what you can do is in the BADI while looping at the extracted structure use the where option to filter data.

    Loop at i_t_data_in where < dynamic selection criteria>.

    Endloop.

    Disadvantage is that it extracts all the data from the Cube and the filtering is done in BADI as shown above. But u will have to live with it. INfact the BDC to change the selection criteria will also not work. So dont try it.

    Regards

    Nakul Agrawal

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 11, 2004 at 08:21 AM

    Hi,

    have a look if this is usefull for you:

    data: r_request type ref to cl_rsr_request.

    data: r_dataset type ref to cl_rsr_data_set.

    data: zcx_message type ref to cx_rsr_x_message.

    data: zcx_root type ref to cx_root.

    data: wa_var type RRX1_s_VAR.

    data: i_var TYPE RRX1_T_VAR.

    create object r_request

    exporting i_genuniid = '0S50SHFPJAOR2F9MZC9FGMUFE'

    • Get your genuniid from table rsrrepdir

    *Now set your variables if nessecary:

    *wa_var-vnam = 'MYVARIABLE'.

    *wa_var-sign = 'I'.

    *wa_var-OPT = 'EQ'.

    *wa_var-LOW = 'ABC'.

    *append wa_var to i_var.

    try.

    r_request->VARIABLES_SET( i_t_var = i_var ).

    *r_request->variables_submit( ).

    r_request->read_data( ).

    r_dataset = cl_rsr_data_set=>get( i_r_request = r_request ).

    r_dataset->refresh( i_version = 1 ).

    catch cx_rsr_x_message into zcx_message.

    catch cx_root into zcx_root.

    endtry.

    *You'll find the data in the r_dataset attributes

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 13, 2004 at 03:57 AM

    This is the step that I use for dynamic selection for InfoSpoke.

    1. Create event using SM62

    2. Create ABAP program to do your selection.

    Put SELECT-OPTION command.

    Save or update the selection from SELECT-OPTION to

    table RSBSPOKESELSET & RSBSOKEVSELSET.

    Include SAP BW function to kick-off Event in the end

    of your program.

    3. Create Process Chain and use the event that you create

    as the trigger to kick off the InfoSpoke

    In simple word, use ABAP code to save the selection in table RSBSPOKESELSET & RSBSOKEVSELSET. The InfoSpoke stuff is optional, I use this so that I don't need to go to RSBO to execute the InfoSpoke. I use event and Process Chain, to kick off the InfoSpoke automatically after I run the ABAP code.

    In the ABAP selection, you can do include, exclude, include range, exclude range, use wildcard etc as normally you do SELECT-OPTION.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 15, 2004 at 02:07 AM

    Thanks to all for your answers,

    I think samuel's idea of updateing the selection set table sounds like what I have to do.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 17, 2004 at 12:19 PM

    > Hi,

    >

    > Also tried Infospoke but not flexible as we have

    > complex selection criteria and there is no exclude

    > option and Dynamic selection.

    > Any other alternative way is there?

    I think with the use of BADIs in InfoSpokes we can exclude the Records and put the dynamic selection as well(using ABAP.)

    Regards,

    Amol

    Add comment
    10|10000 characters needed characters exceeded