Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Error In Function module

Hi,

Experts

I'm new to BW. My Requirement to extract the data from the 'IFIBIVFC' infocube the fields are 0WBS_ELEMENT & IFIBEUR.

For that i used FM 'RSDRI_INFOPROV_READ'.In this FM I'm getting error.Please give some valuable suggestions.

Please re

This is my code

  TYPE-POOLS:rs,rsdrc.

    DATA: lt_th_sfc TYPE rsdri_th_sfc,

          ls_s_sfc TYPE  rsdri_s_sfc.

    DATA: lt_th_sfk TYPE rsdri_th_sfk,

          ls_s_sfk TYPE  rsdri_s_sfk.

    TYPES : BEGIN OF gt_s_data,

            0wbs_elemt TYPE /bi0/oiwbs_elemt,

            /bic/ifibeur  TYPE  /bic/oiifibeur,

            END OF gt_s_data.

    TYPES : BEGIN OF gt_ifibeur,

          " 0wbs_elemt TYPE /bi0/oiwbs_elemt,

          /bic/ifibeur    TYPE  /bic/oiifibeur,

        END OF gt_ifibeur.

    DATA: lt_t_data TYPE STANDARD TABLE OF gt_s_data WITH DEFAULT KEY INITIAL SIZE 10,

          lt_t_data2 TYPE STANDARD TABLE OF gt_ifibeur WITH DEFAULT KEY INITIAL SIZE 10,

          ls_s_data TYPE gt_s_data,

          ls_s_data2 TYPE gt_ifibeur,

          lt_t_data3 TYPE STANDARD TABLE OF gt_ifibeur WITH DEFAULT KEY INITIAL SIZE 10,

          ls_s_data3 TYPE gt_ifibeur.

    DATA:lt_end_of_data TYPE rs_bool.

    DATA: lt_first_call TYPE rs_bool.

    CLEAR ls_s_sfc.



    ls_s_sfc-chanm    = '0WBS_ELEMT'.

    ls_s_sfc-chaalias '0WBS_ELEMT'.

    INSERT ls_s_sfc INTO TABLE lt_th_sfc.

    CLEAR ls_s_sfk.

    ls_s_sfk-kyfnm    = 'IFIBEUR'.

    ls_s_sfk-kyfalias  = 'IFIBEUR'.

    ls_s_sfk-aggr      = 'SUM'.

    INSERT ls_s_sfk INTO TABLE lt_th_sfk.

    lt_end_of_data = rs_c_false.

    lt_first_call  = rs_c_true.

    WHILE lt_end_of_data = rs_c_false.



*      IF  sy-subrc = 0.



      CALL FUNCTION 'RSDRI_INFOPROV_READ'

        EXPORTING

          i_infoprov            = 'IFIBIVFC'

          i_th_sfc              = lt_th_sfc

          i_th_sfk              = lt_th_sfk

*        I_T_RANGE              =

*        I_TH_TABLESEL          =

*        I_T_RTIME              =

          i_reference_date      = sy-datum

*        I_ROLLUP_ONLY          = RS_C_TRUE

*        I_T_REQUID            =

*        I_SAVE_IN_TABLE        = ' '

*        I_TABLENAME            =

*        I_SAVE_IN_FILE        = ' '

*        I_FILENAME            =

*        I_SAVE_IN_INDEX        = ' '

*        I_INDEX_ID            =

          i_packagesize          = 1000

*        I_MAXROWS              = 0

*        I_AUTHORITY_CHECK      = RSDRC_C_AUTHCHK-READ

*        I_CURRENCY_CONVERSION  = 'X'

*        I_USE_DB_AGGREGATION  = RS_C_TRUE

*        I_USE_AGGREGATES      = RS_C_TRUE

*        I_READ_ODS_DELTA      = RS_C_FALSE

*        I_CALLER              = RSDRS_C_CALLER-RSDRI

*        I_DEBUG                = RS_C_FALSE

*        I_CLEAR                = RS_C_FALSE

*        I_COMMIT_ALLOWED      = RS_C_TRUE

*        I_WITH_NLS            = RS_C_FALSE

*        I_CHECK_RESULTS        = RS_C_FALSE

*        I_PROCESS_MPRO_IN_TREX =

        IMPORTING

          e_t_data              = lt_t_data[]

          e_end_of_data          = lt_end_of_data

*        E_AGGREGATE            =

*        E_SPLIT_OCCURRED      =

*        E_T_MSG                =

*        E_STEPUID              =

        CHANGING

          c_first_call          = lt_first_call

        EXCEPTIONS

          illegal_input          = 1

          illegal_input_sfc      = 2

          illegal_input_sfk      = 3

          illegal_input_range    = 4

          illegal_input_tablesel = 5

          no_authorization      = 6

          illegal_download      = 7

          illegal_tablename      = 8

          trans_no_write_mode    = 9

          inherited_error        = 10

          x_message              = 11

          no_commit_free_read    = 12

          OTHERS                = 13.

      IF sy-subrc <> 0.

* Implement suitable error handling here

*        EXIT.

      ENDIF.

lt_end_of_data = rs_c_true.

    ENDWHILE.

    DATA: w_hardware_amt TYPE /bic/oiifibeur,

          w_software_cost TYPE /bic/oiifibeur.


    LOOP AT  lt_t_data INTO  ls_s_data.

      IF      ls_s_data-0wbs_elemt+0(1) = 'A' AND  ls_s_data-0wbs_elemt+14(1) = 'F'.
    w_hardware_amt = w_hardware_amt + ls_s_data-/bic/ifibeur. "$ Hardware Amount

      ELSE.
        w_software_cost = w_software_cost + ls_s_data-/bic/ifibeur. "$ Software cost
      ENDIF.

Thanks in Advance

Best Regards,

Amirineni Sravan.

Former Member
Not what you were looking for? View more on this topic or Ask a question