Page tree
Skip to end of metadata
Go to start of metadata



The function RSDRI_INFOPROV_READ is released for the customers and can be used to read data from infoproviders. Basically RSDRI_INFOPROV_READ is nothing else then the so called Data Manager which is also used by a query to read the data from the providers. Other applications like SEM and APO are using this function as well. In SE37 you can find a good documentation to this function. The ABAP Report RSDRI_INFOPROV_READ_DEMO contains an example of how the function module can be used.
There is also the function RSDRI_INFOPROV_READ_RFC which is only a wrapper for RSDRI_INFOPROV_READ enabling it to call the function via RFC ( see aslo SAP note 1325900).

Most important paramaters (see also the 'Function Module Documentation' in SE37 in order to get the entire list of parameters):
  • I_INFOPROV - technical name of infoprovider
  • I_TH_SFC - This internal table contains the list of characteristics / navigation attributes to be returned. Please note that CHAALIAS is the name of the return column (E_T_DATA) for the characteristic values ! If this does not match the program terminates (with sy-subrc=11).
  • I_TH_SFK - This internal table contains the list of key figures that are to be returned.
  • I_T_RANGE - This internal table contains the list of selection conditions that are linked with a logical AND operator. Conditions with the same CHANM are linked with OR. Please note that you need to use the internal values for selections (filter values), e.g. the value 001 instead of 1 (if the infoobject uses ALPHA conversion). 
  • I_ROLLUP_ONLY - Should only data that has been rolled up into the aggregates be considered or should the most current data be read? If "I_ROLLUP_ONLY" is set to SPACE, data from requests that are not rolled up yet (open/Yellow request) should be taken into account as well (for the data read). The default setting is I_ROLLUP_ONLY=X.
  • E_T_DATA - This internal table defines, on the one hand, the return structure for the data to be read, and on the other hand, it serves as a container for the data that has been read.
  • E_END_OF_DATA - This parameter indicates whether the data package returned to E_T_DATA is the last one.
  • I_DEBUG - This flag is used to employ a debugging mode. In debugging mode, an executable (local) ABAPReport Z_RSDRI_INFOPROV_READ_DEBUG is generated that simulates the call (see SAP note 302937 )
  • I_COMMIT_ALLOWED: if this parameter is set to false the function RSDRI_INFOPROV_READ does not carry out any commits - please see the function module documentation for further details
  • I_WITH_NLS - You can use this option to define whether data is read from a connected near-line storage source or an ADK archive.
  • E_T_MSG: this internal table contains the error messages; if the calling program does not use this import parameter you need to set a breakpoint in the function RS_EXCEPTION_TO_MESSAGE in order to find out details to errors (please see point 9).

Important Points

List of Important Points/Common Problems

  1. Its necessary to define a LOOP until e_end_of_data = 'X'! Otherwise it is not guaranteed that all data records are retrieved (e.g. you only access the F fact table and ommit the E table) and that the system deletes all temporary tables (when used). Afterwards the internal variables are cleared and its possible to call RSDRI_INFOPROV_READ (with new paramters) again.
  2. A logical read access with RSDRI_INFOPROV_READ can contain more than one physical read access to the database (BWA,HANA). This in general is necessary for MultiProviders (to get the data from the partproviders) but also for 'normal' Infocubes to read the F- and E fact table. Within a single physical read the data is transfered to the calling program in packages (parameter I_PACKAGESIZE). The data of these packages can be processed (within the loop) by the calling program. If this is done by your program, please assure that there are no commits (commit work, or e.g. implicit commit done by an RFC call) in the coding since this would close all data base cursors and lead to a terminatation when the next package is fetched. In the logs you then find error messages like 'invalid cursor specified for database selection' (SM21) or 'Database selection with invalid cursor'.
  3. RSDRI_INFOPROV_READ_RFC: the RFC function cannot read packagewise, it returns the entire result in one package. The data is automatically wrapped and needs to be unwrapped by using the function RSDRI_DATA_UNWRAP (the result of G_T_RFCDATA is written into G_T_DATA). Please note that G_T_DATA is based on the so called V2-structure (/BIC/V'CUBE'2 -> it has a column for every characteristic, navigational attribute and key figure of the related cube; in case of a SPO, the V2 structure has 2 additional zeros in the technical name: '/BIC/V'...'002) of the infocube ! In case of an ADSO or HCPR which are field based, see the following Example. Please see also the demo report RSDRI_INFOPROV_READ_DEMO for further details.
  4. RSDRI_INFOPROV_READ may execute a Commit Work (e.g. if new temporary tables need to be created). This means that all cursors are closed, even if they are opened 'with hold' (would survive a DB commit). Temporary tables are created if you have e.g. many selections for a charcteristic in the internal table l_t_range. If you need to avoid such commits please try to simplify the l_t_range by using (e.g.) intervals. With BW73 its also possible to use the parameter I_COMMIT_ALLOWED to avoid commits.
  5. its not possible to explicilty switch off the usage of the BWA; if this is necessary you can use the following workaround: define the caller (I_CALLER) as a datamart (which per default does not use the BIA; RSDRS_C_CALLER-datamart). In case you set I_USE_AGGREGATES to false, neither aggregates nor BWA indexes nor Hana Column Views(if techically possible) are used.
  6. For a BW3x system its not possible to call RSDRI_INFOPROV_READ again from RSDRI_INFOPROV_READ. With BW7x this is possible.
  7. Make sure that all initial values in selections in i_t_range passed over to RSDRI_INFOPROV_READ are correct. Initial values for NUMC Data Types are '0', not space, also for DATS and TIMS data types.
  8. the physical read accesses are processed in parallel if the package size is less than zero and the parameter I_COMMIT_ALLOWED is true. This implies that the function RSDRI_INFOPROV_READ_RFC always (if possible) uses the execution mode 'parallel' since reading in packages is not supported (I_PACKAGESIZE=-1).
  9. if you don't have used the import parameter e_t_msg you need to proceed as follows to get the details to errors (RSDRI_INFOPROV_READ terminates with sy_subrc<>0): please set a breakpoint in the function RS_EXCEPTION_TO_MESSAGE (and then just press F7) and check the paramter e_t_msg in order to get more information. E.g. in case the chaalias defined in the structure I_TH_SFC does not match with the corresponding field in E_T_DATA you get the following eror messages:
    "E |RS_EXCEPTION 000 |The parameter 'CORRESPONDING_FIELDS-CHAR01' not allowed "
    E |RS_EXCEPTION 000 |An exception with the type CX_PARAMETER_INVALID occured "
  10. In case the function RS_EXCEPTION_TO_MESSAGE returns error messages like the following (example on ORACLE data base)
    RS_EXCEPTION ORA-01455: converting column overflows integer datatype
    DBMAN 257: 1455
    then please check whether the same problems occurs in LISTCUBE (use the same restrictions and put the same infoobjects in the drilldown). If yes, please follow the instructions of SAP note 1557321 (in this case the overflow is not related to the usage of the function RSDRI_INFOPROV_READ). If no, please check the definitions of the key figures in your program in regard to the data type. Normally the data typer P (packed numbers) is used for for key figures (e.g. 0amount TYPE p DECIMALS 2).
  11. Please don't forget to exit the while loop if the function RSDRI_INFOPROV_READ returns with an error (sy-subrc<>0):
    IF sy-subrc <> 0.
    In case this coding lines are missing your program may end up in an endless loop.
  12. A logical read access with RSDRI_INFOPROV_READ can contain more than one physical read access to the database (see point 2). This is called a split. In general splits lead to a result which isn't fully aggregated even when the parameter I_USE_DB_AGGREGATION is set to 'X'. The module RSDRI_AGGREGATE_DATA is useful to aggregate a table E_T_DATA.
  13. Non-Cumulative Key Figures: Non-cumulative values can also be read using this interface. However, there is the restriction that only the non-cumulatives for the specified times (see I_T_RTIME) can be calculated; Aggregation over time (such as LAST or AVERAGE, for example) cannot be calculated using this interface. Even when the time-reference characteristic is not explicitly requested, a drilldown is inserted internally. Thus it may be that no completely aggregated results are returned.
  14. if the function returns unexpected values the following proceeding is recommended
    1. Compare the data of RSDRI_INFOPROV_READ with the output of transaction LISTCUBE when the same restrictions are used and the same infoobjects are drilled down.
    2. If there is no difference you can use LISTCUBE for the further analysis. E.G you can switch off the usage of Aggregates (or the BWA index / DB optimizer function) by using the button 'Execute&Debug'. Please see also SAP Note 1591837 Point (IV).
    3. If LISTCUBE displays the correct values please set a breakpoint in the function RSDRC_INFOPROV_READ and change the parameter I_SHOW_REPORT to 'X'. Then you get the SQL statements (BWA/HANA statements) displayed which you can compare with LISTCUBE (setting 'Display SQL Query'). Please note that LISTCUBE does not automatically restrict the infoobject 0REQUID, you get also data from requests displayed which are not availabel for reporting! Hence please always check the restriction regarding 0REQUID in the WHERE clause of the SQL statement. In case you want to switch off the usage of aggregates and the BWA index (for testing purposes) then please set the parameter I_USE_AGGREGATES to false (in the debugger).
    4. If an aggregate or the BWA index delivers wrong values please rebuild the aggregate/BWA index and search for SAP notes (valid for your support package) in these areas.
  15. If its difficult to debug the program (which calls RSDRI_INFOPROV_READ) in a dialog session then please proceed as described in SAP note 302937. The generated program Z_RSDRI_INFOPROV_READ_DEBUG can be used for checking the call of the function RSDRI_INFOPROV_READ. It offers similar debug options as LISTCUBE and stops automatically in the debugger right before RSDRI_INFOPROV_READ is called.
  16. In case data is missing from requests of the F fact table please check the parameter I_ROLLUP_ONLY and the status of the requests in RSA1 (Manage). The default setting is 'X' which means that only requests are taken into account which are released for reporting (already rolled up to aggregates/BWA)! If you want to read the data from all requests (including open/yellow requests from transactional cubes), please use I_ROLLUP_ONLY = ' '.
  17. It is possible to use a hierarchy node selection in I_T_RANGE. Please be aware that this node restriction is 'resolved' into the relevant leaves by the system. The reason is that RSDRI_INFOPROV_READ does not operate with SIDs which is necessary when dealing with hierachies! Therefore the corresponding field in E_T_DATA is also filled with the key values of the leaves and not with the (negative) SID of the node.
  18. If the paramter I_USE_DB_AGGREGATION is set to false, the function RSDRI_INFOPROV_READ does not retrieve the data from BWA indexes. The reason is the following: the data base/BWA returns in general much more data when there is no aggregation carried out. Since the BWA is not designed for transferring mass data (actually the RFC interface is the bottleneck, see SAP note 1018798) the system doesn't access the BWA but the data base.
  19. In the BW Releases before 7.4, the maximum length of a characteristic value is limited to 60 characters. As of Release 7.4 up to 250 characters are possible. In order to achieve this, the domain RSCHAVL was changed from CHAR 60 to SSTRING 1333, please see note 1823174 for further details. This change of the internal ABAP domain may lead to the runtime error PARAMETER_CONVERSION_ERROR in your program after the upgrade in the following situation: you use RSDRI_INFOPROV_READ_RFC to read data from a cube on a system which is still on a release < BW7.4. This issue can be solved by a small change of an internal ABAP type as explained in  RSDRI_INFOPROV_READ_RFC & BW7.4.
  20. Nested calls of the function modules are indicated by error message DBMAN 882. This should be avoided when the function is used in virtual cubes that are used again for example in export data sources or other virtual cubes based on the RSDRI_INFOPROV_READ. See the Workarounds for avoiding this error message.
  21. Handling of compounded characteristics. SEE EXAMPLE
  22. If RSDRI_INFOPROV_READ is used for virtual key figures review 2137702  'Query-Handler: Invalid cursor'(SQL error: INVALID_CURSOR). General information to the topic of Virtual Key Figures and Characteristics can be found here.
  23. Parameter I_CURRENCY_CONVERSION: see also note 2085929 - Virtual Providers & Currency Key Figures
  24. If you want to run RSRDI_INFOPROV_READ directly in SE37 for testing purposes you get the error: 'Error generating the test frame Message no. FL819'. This is not a bug, the interface definition is not supported in the test environment. You need to create an ABAP program when you want to test this function.
  25. The function RDSRI_INFOPROV_READ can also retrieve data from a so called QueryProvider('Query as Infoprovider', QPROV), see RSDRI_INFOPROV_READ & QueryProvider.
  26. Reading from HANA CompositeProviders (HCPR) with the function module RDSRI_INFOPROV_READ and without DB aggregation (when parameter i_use_db_aggregation is false) is only possible if part-provider access (via SQL) is possible. If this is not the case and DB aggregation is false, the error message '_HCPR_PROCESS-1A-' is thrown. A good way to determine if part-provider access is possible is to use the "Display SQL Query" option in LISTCUBE without DB aggregation. If separate SQL statements are shown, turning off DB aggregation is possible. If a TREX statement is shown and the column view of the HCPR is read it is not. Part-provider access is only possible if the HCPR does not use a join operator, there are no HANA models in the HCPR definition and all of the navigation attributes are present in all of the part-providers.
  27. In case the Infoprovider is a HCPR or ADSO, you need to check whether fields are used instead of Infoobjects. If yes, you can look up the names of the fields for CHAALIAS in the V2 structure by using transaction SE11(Data Type -> Structure). Normally, it is made up from the technical names of the ADSO and the field. Unfortunately, the corresponding transient Infoobjects have a slightly different technical name which e.g. you can find out by checking the name of the fields in transaction LISTCUBE( when using the Technical Names). See discussion below.
  28. In case a HCPR uses an Ambiguous Join, it is not guaranteed that the data is correct. This is similar to the situation we have when working with LISTCUBE and when retrieving data with a DTP from an HCPR. See note 2556591 for further details. As explained there, in such a case a QueryProvider is needed.
  29. RSDRI_INFOPROV_READ_RFC and I_RESULTTYPE: Note that the standard value of I_RESULTTYPE causes problems when there is a RFC communication between Unicode and non-Unicode systems(or between systems with different code pages). In such a case it is recommended/necessary to set the parameter i_resulttype = 'U' (and not to the default space) and to use the internal table E_RFCDATA_UC (instead of E_T_RFCDATA, see also the 'Function Module Documentation' in SE37). The result stored in E_RFCDATA_UC can be converted back to a correct format by using the command IMPORT RSDRI = <internal table> FROM DATA BUFFER e_rfcdata_uc.

SAP Consulting Notes

  • 1823174  BW 7.4 changes and customer-specific programs
  • 1828877  Interesting facts about RSDRI_INFOPROV_READ
  • 1670016  SP07: Reading a MultiProvider via RSDRI
  • 2239766  Invalid cursor in paketed call to RSDRI_INFOPROV_READ_RFC
  • 302937  Debugging APO/SEM/CRM read/write interface in BW 3.x, 7.x
  • 995951  Analysis/Required infos for wrong values in RSDRI
  • 979660  DataStore Objects with attribute-only fields
  • 898024  MULTIPROVIDER queries don't provide noncumulative key figures
  • No labels


  1. Hello,

    what about an ADSO that contains not only infoobjects but also fields? How are fields to be declared in I_TH_SFC? Taking the component name from the /BIC/V...2-view returns an exception (sy-subrc=11). So which name has to be entered for chanm resp. for chaalias?

    Thanks and regards


    1. I believe it is necessary use 4<name_provider>-<field> as in here:

             DATA(lt_sfc) = VALUE rsdri_th_sfc(
                              ( chanm = '4MMPUR_O02-ZZRSNUM' "Field ZZRSNUM
                                chaalias = 'ZZRSNUM' )
                              ( chanm = '4MMPUR_O02-ZZRSPOS'
                                chaalias = 'ZZRSPOS' )
               ls_range-chanm   = '4MMPUR_O02-ZZRSNUM'.
              ls_range-sign    = 'I'.
              ls_range-compop  = 'EQ'.
              ls_range-low     = <result_fields>-bbp_res_id.
              APPEND ls_range TO lt_range.
                  i_infoprov             = 'MMPUR_O02'
                  i_th_sfc               = lt_sfc
                  i_th_sfk               = lt_sfk
                  i_t_range              = lt_range
                  i_reference_date       = sy-datum
                  i_save_in_table        = rs_c_false
                  i_save_in_file         = rs_c_false
  2. Hi Benjamin,

    you can look up the names of the fields for CHAALIAS in the V2 structure by using transaction SE11(Data Type -> Structure). Normally, it is made up from the technical names of the ADSO and the field.
    So, e.g. when the the ADSO has the name ADSOTEST and the field FIELD1, the correct chaalias would be ADSOTESTFIELD1. Unfortunately, the corresponding
    transient Infoobjects have the name ADSOTEST-FIELD1(this you e.g. can check by checking the name of the fields in LISTCUBE when using the Technical Names).
    Hence, in this example the following should work(when V2 structure is used)
    g_s_data TYPE /BIC/VADSOTEST2.
    best regards,

  3. Hi,

    yes, sorry, I have forgotten the 4 in front of the technical name of the ADSO(so e.g. '4ADSOTESTFIELD1' and '4ADSOTEST-FIELD1'), this applies for both, HCPRs and ADSOs working with fields

    best regards,