cancel
Showing results for 
Search instead for 
Did you mean: 

RSDRC_INFOPROV_READ - how to pass selection criterion

0 Kudos

Hi All,

RSDRC_INFOPROV_READ , in an ABAP report, is used to pull data from cubes and use the same. Now we have to reduce the number of records pulled by narrowing down the selection. I could not find any documentation available for this FM.

Could you please help me understand, how I can pass selection criterion to this function module. Any help is highly appreciable.

Thanks and regards,

Shashidhar.

Accepted Solutions (1)

Accepted Solutions (1)

alexander_kutz
Participant
0 Kudos

Dear Shashidhar,

try the following code to read from cube. It works also with yellow planning requests:

   DATA: ls_chasel TYPE upc_ys_chasel,
         ls_charange TYPE UPC_YS_CHARNG,
         ls_kyf TYPE UPC_YS_KYF,
         ls_rcpcrules TYPE /BIC/AGCEBPSD100,
         lv_orderby LIKE sy-tabix.


*     Resolve Ratios ( Referecnce Data)

   DATA: g_s_sfc       TYPE rsdri_s_sfc,        "structure table characteristics
         g_th_sfc      TYPE rsdri_th_sfc,     
         g_s_sfk       TYPE rsdri_s_sfk,       "structure table figures
         g_th_sfk      TYPE rsdri_th_sfk,    
         g_s_data      TYPE /BIC/VBST01H.      "structure table of cube

   DATA: g_first_call   TYPE rs_bool.       

   CLEAR g_th_sfc.
   CLEAR g_th_sfk.

   lv_orderby = 0.

*  Add for Ratio also LOB
   CLEAR g_s_sfc.
   g_s_sfc-chanm    = 'GLOB'.
   g_s_sfc-chaalias = 'GLOB'.
   lv_orderby = lv_orderby + 1.
   g_s_sfc-orderby  = lv_orderby.
   INSERT g_s_sfc INTO TABLE g_th_sfc.

*  Add for Ratio also Planyear
   CLEAR g_s_sfc.
   g_s_sfc-chanm    = '0CALYEAR'.
   g_s_sfc-chaalias = '0CALYEAR'.
   lv_orderby = lv_orderby + 1.
   g_s_sfc-orderby  = lv_orderby.
   INSERT g_s_sfc INTO TABLE g_th_sfc.


 CLEAR g_s_sfk.
 g_s_sfk-kyfnm    = '0AMOUNT'.
 g_s_sfk-kyfalias = '0AMOUNT'.
 g_s_sfk-aggr     = 'SUM'.
 INSERT g_s_sfk INTO TABLE g_th_sfk.

   DATA: g_s_range TYPE RSDRI_S_RANGE,
         g_t_range TYPE TABLE OF RSDRI_S_RANGE.

* selektion :

   CLEAR g_s_range.
   g_s_range-chanm = 'PITEM'.
   g_s_range-sign = 'I'.
   g_s_range-compop = 'EQ'.

   g_s_range-low = '320'.
   APPEND g_s_range TO g_t_range.
   g_s_range-low = '321'.
   APPEND g_s_range TO g_t_range.


   g_first_call  = 'X'.

   CALL FUNCTION 'RSSEM_INFOPROV_READ'
     EXPORTING
       i_infoprov                          = 'BST01' " Cube
       i_t_sfc                             = g_th_sfc
       i_t_sfk                             = g_th_sfk
       I_T_RANGE                           = g_t_range
*       I_ROLLUP_ONLY                       = ' '
       I_PACKAGESIZE                       = -1
     importing
      e_t_data                          = g_t_icr_ref_data
      e_t_message                       = lt_mess
     CHANGING
       c_first_call                        = g_first_call.
   IF sy-subrc <> 0.
*     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
   ENDIF.

Answers (0)