jump to navigation

BLOGS September 2, 2008

Posted by Ajay in Uncategorized.
trackback

1. SAP BW and Business Content Datasources: in pursuit of the origins

CLICK HERE

2. Reading InfoCube Data in Update/Transfer Rules

REPORT zms_infoprov_read  NO STANDARD PAGE HEADING.

 

 

* Make sure this matches what you’re pulling from the cube.

TYPES: BEGIN OF st_data,

         0tctifcube TYPE /bi0/oitctifcube,

         0time      TYPE /bi0/oitime,

         0tctstauik  TYPE /bi0/oitctstauik,

       END OF st_data.

 

DATA: gt_characteristics TYPE rsdri_th_sfc,

      gs_characteristic  LIKE LINE OF gt_characteristics,

      gt_keyfigures      TYPE rsdri_th_sfk,

      gs_keyfigure       LIKE LINE OF gt_keyfigures,

      gt_data            TYPE st_data OCCURS 0,

      gs_data            LIKE LINE OF gt_data,

      gv_flg_firstcall   TYPE rs_bool value ‘X’.    ” on

 

INITIALIZATION.

* fill table of characteristics to be returned vvv* *0TCTIFCUBE

  MOVE: ‘0TCTIFCUBE’ TO gs_characteristic-chanm,

        ‘0TCTIFCUBE’ TO gs_characteristic-chaalias,

        0            TO gs_characteristic-orderby.

 

  INSERT gs_characteristic INTO TABLE gt_characteristics.

  CLEAR gs_characteristic.

 

* *0TIME

  MOVE: ‘0TIME’ TO gs_characteristic-chanm,

        ‘0TIME’ TO gs_characteristic-chaalias,

         0       TO gs_characteristic-orderby.

  INSERT gs_characteristic INTO TABLE gt_characteristics.

  CLEAR gs_characteristic.

* fill table of characteristics to be returned ^^^* fill table of key figures to be returned vvv* *0TCTIFCUBE

* Make sure these are really key figures.

 

  MOVE: ‘0TCTSTAUIK’ TO gs_keyfigure-kyfnm,

        ‘0TCTSTAUIK’ TO gs_keyfigure-kyfalias,

        ‘SUM’        TO gs_keyfigure-aggr.

  INSERT gs_keyfigure INTO TABLE gt_keyfigures.

  CLEAR gs_keyfigure.

* set flag GV_FLG_FIRSTCALL ^^^START-OF-SELECTION.

  CALL FUNCTION ‘RSDRI_INFOPROV_READ’

    EXPORTING

      i_infoprov             = ‘0BWTC_C02’

      i_th_sfc               = gt_characteristics

      i_th_sfk               = gt_keyfigures

    IMPORTING

      e_t_data               = gt_data

    CHANGING

      c_first_call           = gv_flg_firstcall

    EXCEPTIONS

      illegal_input          = 01

      illegal_input_sfc      = 02

      illegal_input_sfk      = 03

      illegal_input_range    = 04

      illegal_input_tablesel = 05

      no_authorization       = 06

      ncum_not_supported     = 07

      illegal_download       = 08

      illegal_tablename      = 09

      trans_no_write_mode    = 10

      inherited_error        = 11

      x_message              = 12

      OTHERS                 = 99.

  BREAK-POINT.

Advertisements

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: