Functionality The function module RSDRI_INFOPROV_READ reads data from theInfoProvider whose technical name is specified in I_INFOPROV.Supported InfoProviders are currently InfoCubes, ODS Objects andMultiProviders. Using the parameters listed below,
- restrictions can be defined for the data to be read,
- return types can be determined, and
- general conditions (authorization check, avoidance of
program generation, and so on) can be specified.Notes A logical read access with RSDRI_INFOPROV_READ can contain more than onephysical read access to the database. This is designated asa split>. Splits may occur especially withMultiProviders, but multiple accesses through aggregate optimization oraccess to F- and E fact tables can take place with normal InfoCubes.Furthermore, results that are not completely aggregates can result invirtual InfoCubes. Therefore, setting the parameterI_USE_DB_AGGREGATION = 'X' does not guarantee completeaggregation of the result. Module RSDRI_AGGREGATE_DATA is useful toaggregate a table E_T_DATA. Non-cumulative values:Non-cumulative values can also be read using this interface. However, there is the restriction that only thenon-cumulatives for the specified times (see I_T_RTIME) can becalcualted;Aggregation over time (such as LAST or AVERAGE, for example) cannotbe calculated using this interface. Even when the time-referencecharacteristic is not explicitly requested, a drilldown is insertedinternally according to this time characteristic. Thus it may be thatno completely aggregated result table is returned.Further information ABAP Report RSDRI_INFOPROV_READ_DEMO contains an example of how thefunction module can be used. Description This parameter must be set to 'X' the first time it is called so thatinitializations can be performed. This also starts a new query. If thisis completed, it reset to ' '.All subsequent read accesses for this query should be done with ' '. Description This parameter indicates wheether the data package returned to E_T_DATA E_T_DATA is the last one. Value range This field can accept 2 values:
- 'X' : This means that the result of the read access is not completely
aggregated. This happened because there were several DB read accesses,for example by a MultiProvider or by access to E and F fact tables inInfoCubes.
- ' ' : This means that the result is completely aggregated.
Important:> If the result of the read access is picked up withseveral calls of RSDRI_INFOPROV_READ then it is possible that 'X' isonly returned in one of these accesses, namely in the access thatcontains a split. This means that once there is one 'X' in the pickupsequence, it indicates that the total result is completely aggregated.Description This internal table defines, on the one hand, the return structure forthe data to be read, and on the other hand, it serves as a container forthe data that has been read. Description This table contains all errors that have occurred in BW. The messagefields of the SY structure also contain the last error to occur. Description Should it check whether the user is authorized to see therequested data ("read"), to see it (in order to change it later; "write" ) or should authorization not be checked at all ("none")? Description If data pertaining to a read request with RSDRI_INFOPROV_READ is notread in full, the reference to the read object can be reset withi_clear. A read request is complete if either an error or end_of_data isreturned. If i_clear is set, only the reference to the read object is reset and nofurther action takes place. Description Do currency key figures need to be converted? Currency key figures arealways stored in the database with 2 decimal places. For the output,these amounts have to be converted into the proper format in accordancewith the decimal places definition in TCURX. Because the converted currency is written to an amount field that onlyhas two decimal places, currency conversion for currencies with morethan two decimal places here causes rounding errors. Description This flag is used to employ a debugging mode. In debugging mode, anexecutable (local) ABAPReport Z_RSDRI_INFOPROV_READ_DEBUG is generatedthat simulates the call.This is a simple way to reproduce error situations. Description see I_SAVE_IN_FILE. Description Name of an InfoProvider, for example of an InfoCubes or anODS Object. Description I_MAXROWS contains the maximum number of records that the result maycontain. Value range
- I_MAXROWS <= 0 : all records in the result are read
- I_MAXROWS > 0: only the first I_MAXROWS records of the results are read
Description If neither I_SAVE_IN_FILE nor I_SAVE_IN_TABLE are set, the return takesthe form of packages (that is, an internal table) of the sizeI_PACKAGESIZE. The following dependencies arise from the package size: - If the package size is negative, the return takes place in one package - If the package size is 0, the query is executed in parallel ifpossible and the result is returned in packages of the default packagesize - If the package size is positive, InfoProvider processing is sequential The package size always specifies the maximum size of a package. Inparticular for MultiProviders, a package might be smaller than specifiedalthough further data follows. This is the case if the last package of aPartProvider was read and further packages follow. Description This parameter is only releva in connection with an ODS object. Itcontrols whether the active records of an ODS object should be read orthose of the associated change log. Value range
- I_READ_ODS_DELTA = ' ' : read active records
- I_READ_ODS_DELTA = ' X' : read change log records
Description Specifies the key date for which time-dependent values are to beassessed. Value range like SY-DATUM Default today Description Should only data that has been rolled up into the aggregates beconsidered, or should the most current data be read, which is possiblyonly located in the fact table of the InfoCube? If a table of requests was specified (i_t_requid), if i_rollup_only =true, it is truncated at the number of requests already rolled up intothe aggregates. Description The result is stored in a file I_FILENAME in the current directory ofSAPGUI on the presentation server if I_SAVE_IN_FILE = 'P'is set. The result is stored in a file I_FILENAME in the DIR_TEMP directory (see transaction AL11) on the application servier ifI_SAVE_IN_FILE = 'X' is set. Description The result is stored in a new database table called I_TABLENAME ifI_SAVE_IN_TABLE = 'X' is set. If there is already a table calledI_TABLENAME, then I_SAVE_IN_TABLE = 'I' ("insert") can be set. Howevernote here that table I_TABLENAME has columns that were specified inI_TH_CHA and I_TH_KYF under CHAALIAS or KYFALIAS. Otherwise there willbe a termination on the SQL level. Description see I_SAVE_IN_TABLE. Description I_TH_SFC: This internal table contains the list of characteristics /navigation attributes to be returned. Each characteristic can only bespecified once. CHANM is the technical name of the characteristic/ navigation attribute; CHAALIAS is the name of the return column for the characteristic values; ORDERBY is the position of the ORDER-BY clause for the generated SQLrequest (no entry is made for ORDERBY=0 ). Description This internal table contains the list of key figures that are to bereturned. KYFNM is the technical name of the key figure; KYFALIAS is the name of the return column for the key figure values; AGGR is the associated aggregation function. Only the valuesinitial, SUM, MIN, MAX, AVG, CNT are permitted for this function.In general, calculating AVG for InfoCubes on the database can beproblematic, because this results in a logical record (wherethe key is comprised of a combination of characteristic values) that ispossibly made up of several physical records.Such a situation can occur, for example, when the InfoCube containsso-called cancellation records. Description This internal table contains a list of selection conditions that areavailable in the form of database tables: for CHANM, the exact valuesthat are located in the database table TABLNM in the FIELDNM columnshould be selected. Description This internal table contains the list of selection conditions that arelinked with a logical AND operator. Conditions with the same CHANM arelinked with OR. SIGN specifies whether it is an inclusive ('I') or exclusive ('E')condition. COMPOP defines the relational operator (values 'EQ', 'LT', 'LE', 'GT','GE', 'BT', 'NE', 'NB', and 'HI'). These operators are defined in theRSDRC_C_COMPOP constants. LOW and HIGH are the value fields belonging to the associated relationaloperator. Only values are allowed there, not characteristic names orsimilar.
- Only the LOW field is relevant for the relational operators 'EQ', 'LT',
'LE', 'GT', 'GE', and 'NE'.
- Both LOW and HIGH are relevant for the relational operators 'BT' and
'NB'.
- The following convention is valid for the relational operator 'HI'
(hierarchy node selection): LOW contains the SID of the hierarchy to be used HIGH contains the SID of the hierarchy node whose leaves depict therestriction. Only one hierarchy node selection is permitted per CHANM.Description With this parameter, a user can define a restriction using the requestfor an InfoCube. The following scenario is not permitted and results in an error: Querying requests of individual InfoCubes that are part of aMultiProvider in i_t_requid for a MultiProvider access. Description Should aggregates be used? This also means that an additional selectioncondition is inserted automatically that is restricted to rolled up datarequests. Description Should the key figures in the database be aggregated, that is with thehelp of a GROUP BY and the associated aggregate function in the SELECTclause?
|