RSDRI_INFOPROV_READ
Hello,
we r trying to read data from infocufe using FM 'RSDRI_INFOPROV_READ'.
Infocube Name : DPCC04DFD
Structure :
Country DPCNTY CHAR 02 DPCNTY
CPG/Retail Indicator DPCPG CHAR 01 DPCPG
Customer Group DPCUSGP CHAR 20 DPCUSGP
Brand DPBRAND CHAR 10 DPBRAND
Category DPCAT CHAR 10 DPCAT
Parent FPC DPPRNT CHAR 18 DPMAT
Material DPMAT CHAR 18 DPMAT
We pass the Characteristics name , the key figure name and the range table.
The function module is not returning any data....even though records exist in Infocube.
On checking the function module in debug maode the following exception was observed..
E RS_EXCEPTION The parameter 'CORRESPONDING_FIELDS-DPCNTY' is not allowed
E RS_EXCEPTION An exception with the type CX_PARAMETER_INVALID occurred, but was neither handled locally, nor declared in a RAISING clause.
As this error was not handled, the FM did not raise any error., it simply rerturned blank entries.
Kindly guide, as to y this exception is raised eventhough the Info object DPCNTY is exising in the infocube.
Thank you in advamce.
Regards,
Pranali
Hi,
please check the demo program RSDRI_INFOPROV_READ_DEMO for some help. Additionally make sure all characteristics and keyfigures are spelled correctly and of course make sure that the structure of the table passed to e_t_data is exactly the same as the fields provided in i_th_sfc and i_th_sfk.
regards
Siggi
Similar Messages
-
Database selection with Invalid Cursor error in RSDRI_INFOPROV_READ
Hi Everyone.
I am using RSDRI_INFOPROV_READ Function module for reading data from a multiprovider.
Logic of the code is as following
while <more data>
CALL RSDRI_INFOPROV_READ reading data in E_T_DATA
Append lines of E_T_DATA to EO_T_DATA.
If total lines of data in EO_T_DATA > 200000
<save EO_T_DATA in a file using GUI_DOWNLOAD>
<clear EO_T_DATA>
EndIF
EndWhile.
As soon as number of record exceed 200000 first file is saved, but after that next data call results in error.
Error says "Database selection with invalid cursor".
I suspect that this because of call to FM GUI_DOWNLOAD. While calling this FM after RSDRI_INFOPROV_READ causes system to commit and again the cursor is tried to open in next call casuing it to fail.
But it is imperative for me to save data in file at regular intervals as data volume is huge.
Any pointers in this direction will be helpful.Hi Everyone.
I am using RSDRI_INFOPROV_READ Function module for reading data from a multiprovider.
Logic of the code is as following
while <more data>
CALL RSDRI_INFOPROV_READ reading data in E_T_DATA
Append lines of E_T_DATA to EO_T_DATA.
If total lines of data in EO_T_DATA > 200000
<save EO_T_DATA in a file using GUI_DOWNLOAD>
<clear EO_T_DATA>
EndIF
EndWhile.
As soon as number of record exceed 200000 first file is saved, but after that next data call results in error.
Error says "Database selection with invalid cursor".
I suspect that this because of call to FM GUI_DOWNLOAD. While calling this FM after RSDRI_INFOPROV_READ causes system to commit and again the cursor is tried to open in next call casuing it to fail.
But it is imperative for me to save data in file at regular intervals as data volume is huge.
Any pointers in this direction will be helpful. -
Error messages when calling RSDRI_INFOPROV_READ for more than one time
Hello all,
I need to write a cube, however, before I do this I need to check whether there are already data in the target cube for a certain accounting period. This I do by reading the cube via FM RSDRI_INFOPROV_READ. The following coding is called from a running program after pushing a button on the screen.
<i>* clear internal tables.
CLEAR gt_range.
CLEAR gt_sfc.
*fill internal tables
CLEAR ls_sfc.
ls_sfc-chanm = '0FISCPER'.
ls_sfc-chaalias = '0FISCPER'.
ls_sfc-orderby = 0.
INSERT ls_sfc INTO TABLE gt_sfc.
CLEAR ls_range.
ls_range-chanm = '0FISCPER'.
ls_range-sign = rs_c_range_sign-including.
ls_range-compop = rs_c_range_opt-equal.
ls_range-low = '2007001'.
APPEND ls_range TO gt_range.
here I do not know what exactly to do with this flag
lf_first_call = abap_true.
CALL FUNCTION 'RSDRI_INFOPROV_READ'
EXPORTING
i_infoprov = 'T01'
i_th_sfc = gt_sfc
i_th_sfk = gt_sfk
i_t_range = gt_range
i_packagesize = 1
IMPORTING
e_t_data = lt_rd_cube
e_end_of_data = lf_eod
CHANGING
c_first_call = lf_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
OTHERS = 12.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
lf_eod = abap_false.
IF NOT lt_rd_cube IS INITIAL.
RAISE target_data_found.
EXIT.
ENDIF.</i>
When testing with a period for which data already exists, it runs through quite perfectly. The return table is filled and I know that data exists and I EXIT.
However, if I press the button again (program is still running) I get an error message 'Nested call of RSDRI_INFOPROV_READ'. And this for each time I press the button.
So I thought I should clear the flag lf_first_call. After having done so I get an error message 'SQL Error'. Funny is that I get this error only every second time the Function Module is processed. Every other time it works perfectly.
How can I get rid of those error messages?
PLEASE - can anybody help me?
Many thanks in advance,
ThomasHi,
you have something like:
end_of_data = ' '.
first_call = 'X'.
WHILE end_of_data = ' '.
CALL FUNCTION 'RSDRI_INFOPROV_READ'
EXPORTING i_infoprov = ....
i_th_sfc = ...
i_th_sfk = ...
i_t_range = ...
i_reference_date = ...
i_save_in_table = ....
i_save_in_file = ....
I_USE_DB_AGGREGATION = ...
i_packagesize = 100000
i_authority_check = ...
IMPORTING e_t_data = .....
e_end_of_data = end_of_data
CHANGING c_first_call = 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
ncum_not_supported = 7
illegal_download = 8
illegal_tablename = 9
OTHERS = 11.
ENDWHILE.
hope this helps...
Olivier. -
What's wrong with my code?(about RSDRI_INFOPROV_READ)
The result is print out this line in the screen:
'11 305 DBMAN ZUTI_USA'
My code is:
*& Report ZREADDSO
REPORT ZREADDSO.
TYPE-POOLS: rs, rsdrc.
types:
begin of TResult,
i_zgultima type /BIC/OIZGULTIMA,
i_zusageid type /BIC/OIZUSAGEID,
i_ztd type /BIC/OIZTRANDATE,
osm_count type /BI0/OISM_COUNT,
end of TResult.
data:
TheDSO type RSINFOPROV,
TH_SFC TYPE RSDRI_TH_SFC,
TH_SFK TYPE RSDRI_TH_SFK,
T_MSG type RS_T_MSG,
First_time_Call type RS_BOOL,
WA_SFC type RSDRI_S_SFC,
WA_SFK type RSDRI_S_SFK,
wa_T_data type TResult,
T_DATA type standard TABLE of TResult,
errorinfo type ref to cx_root,
g_s_end type rs_bool,
text type string.
The dso name
TheDSO = 'ZUTI_USA'.
The Char.s
clear wa_sfc.
wa_SFC-CHANM = 'ZGULTIMA'.
wa_SFC-chaalias = 'i_zgultima'.
wa_sfc-orderby = 0.
clear wa_sfc.
wa_SFC-CHANM = 'ZUSAGEID'.
wa_SFC-chaalias = 'i_zusageid'.
wa_sfc-orderby = 0.
clear wa_sfc.
wa_SFC-CHANM = 'ZTRANDATE'.
wa_SFC-chaalias = 'i_ztd'.
wa_sfc-orderby = 0.
insert wa_sfc into table th_sfc.
The key figures
clear wa_sfk.
wa_SFK-KYFNM = '0SM_COUNT'.
wa_sfk-kyfalias = 'osm_count'.
wa_sfk-aggr = 'SUM'.
insert wa_sfk into table th_sfk.
g_s_end = rs_c_false.
first_time_call = rs_c_true.
try.
while g_s_end = rs_c_false.
call function 'RSDRI_INFOPROV_READ'
exporting
I_INFOPROV = TheDSO
I_TH_SFC = TH_SFC
I_TH_SFK = TH_SFK
i_save_in_table = rs_c_false
i_save_in_file = rs_c_false
I_MAXROWS = 1000
I_Packagesize = 100
i_authority_check = rsdrc_c_authchk-read
i_reference_date = sy-datum
I_ROLLUP_ONLY = RS_C_FALSE
importing
E_T_Data = T_Data
e_end_of_data = g_s_end
changing
C_FIRST_CALL = First_time_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 = 8
illegal_tablename = 9
OTHERS = 11.
IF sy-subrc <> 0.
WRITE: / sy-subrc, sy-msgno, sy-msgid, sy-msgv1, sy-msgv2, sy-msgv3.
EXIT.
ELSE.
LOOP AT t_data INTO wa_t_data.
WRITE: / wa_t_data-i_zgultima,
wa_t_data-osm_count.
ENDLOOP.
endif.
endwhile.
catch cx_root into errorinfo.
text = errorinfo->get_text( ).
write: / , text.
endtry.
Message was edited by:
Jacky Zhanghaving exception OTHERS is quite tricky to solve....
try first simplifying it and get it work; then enchance it...
try the following
types:
begin of TResult,
i_zgultima type /BIC/OIZGULTIMA,
i_zusageid type /BIC/OIZUSAGEID,
i_ztd type /BIC/OIZTRANDATE,
osm_count type /BI0/OISM_COUNT,
end of TResult.
data:
TheDSO type RSINFOPROV,
TH_SFC TYPE RSDRI_TH_SFC,
TH_SFK TYPE RSDRI_TH_SFK,
T_MSG type RS_T_MSG,
First_time_Call type RS_BOOL,
WA_SFC type RSDRI_S_SFC,
WA_SFK type RSDRI_S_SFK,
wa_T_data type TResult,
T_DATA type standard TABLE of TResult,
errorinfo type ref to cx_root,
g_s_end type rs_bool,
text type string.
* The dso name
TheDSO = 'ZUTI_USA'.
* The Char.s
clear wa_sfc.
wa_SFC-CHANM = 'ZGULTIMA'.
wa_SFC-chaalias = 'i_zgultima'.
wa_sfc-orderby = 0.
insert wa_sfc into table th_sfc.
clear wa_sfc.
wa_SFC-CHANM = 'ZUSAGEID'.
wa_SFC-chaalias = 'i_zusageid'.
wa_sfc-orderby = 0.
insert wa_sfc into table th_sfc.
clear wa_sfc.
wa_SFC-CHANM = 'ZTRANDATE'.
wa_SFC-chaalias = 'i_ztd'.
wa_sfc-orderby = 0.
insert wa_sfc into table th_sfc.
* The key figures
clear wa_sfk.
wa_SFK-KYFNM = '0SM_COUNT'.
wa_sfk-kyfalias = 'osm_count'.
wa_sfk-aggr = 'SUM'.
insert wa_sfk into table th_sfk.
g_s_end = ' '. "rs_c_false.
first_time_call = 'X'. "rs_c_true.
*try.
while g_s_end = ' '. "rs_c_false.
call function 'RSDRI_INFOPROV_READ'
exporting
I_INFOPROV = TheDSO
I_TH_SFC = TH_SFC
I_TH_SFK = TH_SFK
i_save_in_table = rs_c_false
i_save_in_file = rs_c_false
* I_MAXROWS = 1000 "why?
I_Packagesize = 100
i_authority_check = 'R' "rsdrc_c_authchk-read
* i_reference_date = sy-datum "why?
* I_ROLLUP_ONLY = RS_C_FALSE "why?
importing
E_T_Data = T_Data
e_end_of_data = g_s_end
changing
C_FIRST_CALL = First_time_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 = 8
illegal_tablename = 9
OTHERS = 11.
IF sy-subrc <> 0.
BREAK-POINT.
* WRITE: / sy-subrc, sy-msgno, sy-msgid, sy-msgv1, sy-msgv2, sy-msgv3.
EXIT.
* ELSE.
* LOOP AT t_data INTO wa_t_data.
* WRITE: / wa_t_data-i_zgultima,
* wa_t_data-osm_count.
* ENDLOOP.
endif.
endwhile.
*catch cx_root into errorinfo.
*text = errorinfo->get_text( ).
*write: / , text.
*endtry. -
RSDRI_INFOPROV_READ and navigational attributes
Hi experts,
can you please share your knowledge and experience with me?
the issue:
within a custom ABAP program i am calling function module RSDRI_INFOPROV_READ with standard parameters. this works fine only if no characteristics or basic characteristics selection is applied. But the call will fail in case we select on navigational attributes of characteristics.
is there any experience in the field or at SAP about this restriction, or maybe some helpful workaround?
Many thanks for your feedback and assistance!
Cheers, HarryHello everybody,
I face the same problem that RSDRI_INFOPROV_READ doesn't work with navigational attributes. It throws an exception. I did some debugging and found out the following:
At some point in the call stack, the method CL_SQL_PARAMETERS->SET_PARAM_STRUCT is invoked.
This Method reads the structure of the fields:
cl_abap_typedescr=>describe_by_data_ref( struct_ref ).
struct_ref is filled with /BIC/V<Cube>2
This dictionary structure does not contain any navigational attributes.
Then, there is a loop on the InfoObjects that were transferred to RSDRI_INFOPROV_READ with the parameter I_TH_SFC (also nav. attributes). Within the loop, the fields are "compared" to the components of the structure /BIC/V<Cube>2:
READ TABLE sdescr_p->components ASSIGNING <comp>
WITH KEY name = <cf>.
Since the nav. attributes are not contained in the internal table sdescr_p->components an exception is raised and the function terminates with an error.
By the way, this problem only occurs after we have upgraded to BI 7.0.....
Can anybody help?
Thanks a lot!
Cheers
Michael -
Error while using RSDRI_INFOPROV_READ : parallel processing error
Hi
I am also facing parallel processing error while using the function module RSDRI_INFOPROV_READ in transformation.
when only one data package is there, the load happens without any issue. But when multiple data packages are involved the load fails with an error "Exception in parallel processing".Hi Lijo,
I got the following information from the function module documentation of the FM RSDRI_INFOPROV_READ.
If neither I_SAVE_IN_FILE nor I_SAVE_IN_TABLE are set, then the return takes place in the form of packages (that is an internal table), of value I_PACKAGESIZE. A negative value means that the return should be in one package.
Prathish. -
Issue using RSDRI_INFOPROV_READ with BI Accelerator
Hi,
We have been using RSDRI_INFOPROV_READ successfully to get info cube data. For info cube indexed on BI Accelerator the program has stopped returning any data. We get 0 for all data. If we run indexes of a cube from BI accelerator then we start getting data from program using RSDRI_INFOPROV_READ. Anybody has idea how to make RSDRI_INFOPROV_READ work with BI Accelerator?During the course of developing the program, I probably messed up the sequence of the table definitions.
My colleague who did the source code review also changes some variable definitions/types.
Cheers -
Data load through DTP giving Error while calling up FM RSDRI_INFOPROV_READ
Hi All
We are trying to load data in Cube through DTP from DSO. In the Transformation, we are looking up Infocube data through SAP Standard Function Module 'RSDRI_INFOPROV_READ'. The Problem we are facing is that our loads are getting failed & it is giving error as 'Unknown error in SQL Interface' & Parallel process error.
In the DTP, We have Changed the No. of Parallel processes from 3 (default) to 1 but still the above issue exists with data loads.
We had similar flow developed in 3.5 (BW 3.5 Way) where we had used this Function Module 'RSDRI_INFOPROV_READ' & there our data loads are going fine.
We feel there is compatability issue of this FM with BI 7.0 data flows but are not sure. If anybody has any relevant inputs on this or has used this FM with BI 7.0 flow then please let me know.
Thanks in advance.
Kind Regards
SwapnilHello Swapnil.
Please check note 979660 which mentions this issue ?
Thanks,
Walter Oliveira. -
Reading data from 2 infocubes in same start routine - RSDRI_INFOPROV_READ
Hi guys,
Is it possible to read data from 2 Infocubes via RSDRI_INFOPROV_READ FM in same start routine of Infosource.
Both infocube have different KF's.
my one Infocube reading is working fine but now need to another infocube in same strat routine.
Help will be appreciated and full points will be assigned.
Thanks in advance,
HarryHi,
1.It means I have to call FM twice
2. Can I use same internal table to store data of both infocubes
3. both cubes have got different KF
Can you please explain in detail?
Thanks,
Harry -
Hi All,
Would you like kindly to help me please .. ?
i'm having a problem that everytime we run FOX, Planning function (Distribute, Delete, etc), and Exit Function.
And we always stuck in RSDRI_INFOPROV_READ with exception: x_message.
I found that it's because the data are very huge, when i try to narrow it by filtering it by month.. It can run.
My questions are, beside we need to filter it the data more,
Is that any thing that we can do ??
perhaps, there are some tips e.g. some FM should be run / anything ?
And ..
Do you have any information regarding the minimum server spec for BPS ?? Because i'm affraid the spec of server here can't cover it.
Best regards,
Niel.Check link https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b9cd46a7-0301-0010-f39c-9510b9753a13 for performance tuning in BPS.
There was a very good document on Tips & Tricks on FOX in BW-BPS by Marc Bernard but am not able to find the online link but I have one on my machine. Let me know your email and I can send the same to you. -
DBIF_RSQL_INVALID_RSQL from RSDRI_INFOPROV_READ
HI all,
to get an Information from a Cube for SAP-BPS Function I use the Function RSDRI_INFOPROV_READ.
I get the error:
Error in SQL-Statement: DBIF_RSQL_INVALID_RSQL
Error-nr. DBMAN256
I think the Error comes form the Subfunction:
RSDRC_CUBE_DATA_GET
Is this an SAP-Error or should I give other Information to the function RSDRI_INFOPROV_READ?
Thanks!
El-Q
Message was edited by:
El-QThanks for the fast answer.
I tried the programm and I reactivated the Cubes, too.
But it doesn't works better now. - The same Error...
Here aditional Infos...
The Transaktion sm21 said:
16:48:08 DIA 00 100 User-XXX STAR BZE Type conversion for field /BIC/FZ_KOF ==> N : not permitted
Details
Recording at local and central time........................ 19.04.2007 16:48:08
Task................ 15918 . 00 D0 Dialog work process No. 00
User................ USER-XXX
Client.............. ###
Terminal............ #######
Session............. 1
Transaction code.... START_REPORT
Program name........ UPB_PM_START
Problem class....... K SAP Web AS Problem
Development class... SBAC
Module name......... dbrsql
Line................ 9166
Table name.......... /BIC/FZ_KO
Field name.......... F ==> N
Documentation for system log message BZ E :
A target field has been specified in the INTO clause of a SELECT
statement, for the database field in the message. The ABAP data type of
the target field does not suit the type of the database field. Enter a
target field with an appropriate type. For information on the correct
type, see the Online Help on the INTO clause of a SELECT command.
Technical details
File................ 000011
Position............ 0000001980
Entry type.......... h ( Database Error (Non-SQL) )
Message ID.......... BZ E
Variable parts...... /BIC/FZ_KOF ==> N dbrsql 9166
I hope this helps to understand the Error in a better way...for me, it's an SAP-Problem, isn't it?
Because I can't change the select in an SAP-Function.
Thanks!
El-Q -
BAdi RSR_OLAP_BADI and RSDRI_INFOPROV_READ
Hi folks,
I try to use the RSR_OLAP_BADI to compute virtual key figures. These key figures are based on a lookup in an Info Cube which I do in the COMPUTE method of the implementation class. In this method I call the function module RSDRI_INFOPROV_READ for reading data out of an Info Cube. In some cases I get the error message
It seems that the function module has an internal state which would be overwritten through the invocation in the COMPUTE method.
Has anyone an idea how to prevent this? Or is there a better way to read from an Info Cube??
Thanks a lot for any advices!
Rgds,
JuergenHi,
thanks all for your quick answers. I prefer using the RFC call. I found out that I have to use RSDRI_INFOPROV_READ_RFC instead to use an RFC capable function module. This also means that I have to call RSDRI_DATA_UNWRAP to get the result in an internal table.
The structure of that internal table must be "/BIx/V 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at l_t_data into wa_data.
move-corresponding wa_data to wa_vjwerte.
--> here it it's comp S008 in production it's S019!!!
wa_vjwerte-0MATERIAL__ZRTLOSORT = wa_data-S008_0MATERIAL.
wa_vjwerte-0PLANT__ZRTZBART = wa_data-S005_0PLANT.
wa_vjwerte-0PLANT__0SALES_DIST = wa_data-S009_0PLANT.
append wa_vjwerte to m_t_vjwerte.
endloop.
ENDWHILE. -
Error when using RSDRI_INFOPROV_READ in Virtual Provider
Hello,
I Have a Virtual Provider built using a function Module. In that function module i am reading data from an infocube using RSDRI_INFOPROV_READ.
When i execute a query built on the virtual provider, i have an error telling me a nested query is not allowed.
I am trying this on BI3.5. I have this working on BI7.0.
Is this not possible in BI3.5? Is there a workaround or a Sapnote?
ThanxTake a look at OSS Notes 832019 & 918131.
-
Filtering of data while reading with "RSDRI_INFOPROV_READ" from infocube.
Hi all,
I am working with a function module "rsdri_infoprov_read" to read data from multi provider. Here i am facing a problem with the parameter 'i_t_range' - select options, I have filled elements of this parameter, but regardless of my selection it brings some more data from cube. It would be so helpful for me if somebody can can have a look at it. The value apppending to i_t_range is as shown below,
plant is the selectio screen input.
LOOP AT s_plant.
g_s_range-chanm = 'GCSLOCT'.
g_s_range-sign = 'I'.
g_s_range-compop = 'EQ'.
g_s_range-low = s_plant-low.
APPEND g_s_range TO g_t_range.
ENDLOOP.
material is the selectio screen input for which product.
LOOP AT i_t_materials.
g_s_range-chanm = 'GCSMATE'.
g_s_range-sign = 'I'.
g_s_range-compop = 'EQ'.
g_s_range-low = i_t_materials-sub_type.
APPEND g_s_range TO g_t_range.
ENDLOOP.
version is the planning book version constant.
g_s_range-chanm = 'GCSPLVER'.
g_s_range-sign = 'I'.
g_s_range-compop = 'EQ'.
g_s_range-low = version.
APPEND g_s_range TO g_t_range.
ENDLOOP.
week is the selectio screen input for period.
g_s_range-chanm = '0CALWEEK'.
g_s_range-sign = 'I'.
g_s_range-compop = 'BT'.
g_s_range-low = s_period-low.
g_s_range-high = s_period-high.
APPEND g_s_range TO g_t_range.
It should fetch data for the plant which i given in s_plant-low(select option) only but it returns other plants too in the output internal table e_t_data.So it effects the perfomance and here i need to fliter the other plants while reading itself.
This is for plant, but coming to other inputs like material,version and period into the i_t_range table and for which it returns the corrct values only.The problem's with the plant input selection only.
I hpe you guys can easilyhelp me with this,,
thanks in advance for all.
Regards
ashir ckJust as double check,
Put in a breakpoint after it gets out of the Loop at S_plant and check what is in table g_t_range. Maybe something there is a value in there that you are not expecting.
plant is the selectio screen input.
LOOP AT s_plant.
g_s_range-chanm = 'GCSLOCT'.
g_s_range-sign = 'I'.
g_s_range-compop = 'EQ'.
g_s_range-low = s_plant-low.
APPEND g_s_range TO g_t_range.
ENDLOOP.
PUT A BREAKPOINT HERE -
Question About RSDRI_INFOPROV_READ
Hello Everyone,
I am trying to use the function Module RSDRI_INFOPROV_READ, while loading a DSO. The Start routine to the DSO does a lookup on the a Planning infocube to get the Amount Field. However, the load to the DSO has been failing consistently and i just cant seem to figure out why. Iam not so much of a ABAP'er and i need your help. I am pasting the Code below, can someone share your inputs why this is happening?
CONSTANTS :
RS_C_FALSE TYPE RS_BOOL VALUE ' ',
RS_C_TRUE TYPE RS_BOOL VALUE 'X',
RS_C_UNKNOWN TYPE RS_BOOL VALUE 'U'.
TYPES :
BEGIN OF GT_S_DATA,
ZPLANITEM TYPE /BI0/OISEM_POSIT,
ZPROITEM TYPE /BIC/OIZ_PROITEM,
ZAMOUNT1 TYPE /BI0/OIAMOUNT,
END OF GT_S_DATA.
DATA:
G_S_SFC TYPE RSDRI_S_SFC,
G_TH_SFC TYPE RSDRI_TH_SFC,
G_S_DATA TYPE GT_S_DATA,
G_T_DATA TYPE STANDARD TABLE OF GT_S_DATA
WITH DEFAULT KEY INITIAL SIZE 10,
G_S_SFK TYPE RSDRI_S_SFK,
G_TH_SFK TYPE RSDRI_TH_SFK,
G_S_RANGE TYPE RSDRI_S_RANGE,
G_T_RANGE TYPE RSDRI_T_RANGE,
G_END_OF_DATA TYPE RS_BOOL,
G_FIRST_CALL TYPE RS_BOOL.
* Planning Item
CLEAR G_S_SFC.
* --- name of characteristic
G_S_SFC-CHANM = '0SEM_POSIT'.
* --- name of corresponding column in G_T_DATA
G_S_SFC-CHAALIAS = '0SEM_POSIT'.
* --- no ORDER-BY
G_S_SFC-ORDERBY = 0.
* --- include into list of characteristics
* INSERT G_S_SFC INTO TABLE G_TH_SFC.
* --- name of characteristic
G_S_SFC-CHANM = '/BIC/SZ_PROITEM'.
* --- name of corresponding column in G_T_DATA
G_S_SFC-CHAALIAS = '/BIC/SZ_PROITEM'.
* --- no ORDER-BY
G_S_SFC-ORDERBY = 0.
* --- include into list of characteristics
INSERT G_S_SFC INTO TABLE G_TH_SFC.
* For the following key figures should be returned:
* 0Amount
CLEAR G_TH_SFK.
* 0Amount
CLEAR G_S_SFK.
* --- name of key figure
G_S_SFK-KYFNM = '0AMOUNT'.
* --- name of corresponding column in G_T_DATA
G_S_SFK-KYFALIAS = '0AMOUNT'.
* --- aggregation
G_S_SFK-AGGR = 'SUM'.
* --- include into list of key figures
INSERT G_S_SFK INTO TABLE G_TH_SFK.
* --- this variable will be set to TRUE when the last data
* package is read
G_END_OF_DATA = RS_C_FALSE.
* --- this variable indicates whether this is an initial
* call to the reading module or a follow-up call (which
* simply retrieves already selected data)
G_FIRST_CALL = RS_C_TRUE.
WHILE G_END_OF_DATA = RS_C_FALSE.
DATA:WA_SOURCE_PACKAGE TYPE _TY_S_SC_1.
DATA:ZAMOUNT TYPE /BI0/OIAMOUNT.
LOOP AT SOURCE_PACKAGE INTO WA_SOURCE_PACKAGE.
BREAK-POINT.
CALL FUNCTION 'RSDRI_INFOPROV_READ'
EXPORTING
I_INFOPROV = 'ZAIGTXPC'
I_TH_SFC = G_TH_SFC
I_TH_SFK = G_S_SFK
I_SAVE_IN_TABLE = RS_C_FALSE
I_SAVE_IN_FILE = RS_C_FALSE
I_REFERENCE_DATE = SY-DATUM
I_PACKAGESIZE = 10
I_AUTHORITY_CHECK = 'R'
IMPORTING
E_T_DATA = G_T_DATA
E_END_OF_DATA = G_END_OF_DATA
CHANGING
C_FIRST_CALL = G_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
NCUM_NOT_SUPPORTED = 7
ILLEGAL_DOWNLOAD = 8
ILLEGAL_TABLENAME = 9
TRANS_NO_WRITE_MODE = 10
INHERITED_ERROR = 11
X_MESSAGE = 12
OTHERS = 13.
IF SY-SUBRC = 0.
MOVE G_S_SFK TO ZAMOUNT.
ENDIF.
IF WA_SOURCE_PACKAGE-ZAMTFLD = 'A'.
MOVE ZAMOUNT TO WA_SOURCE_PACKAGE-Z_DUM_ACT.
ELSEIF
WA_SOURCE_PACKAGE-ZAMTFLD = 'B'.
MOVE ZAMOUNT TO WA_SOURCE_PACKAGE-Z_DUM_BAL.
ELSEIF
WA_SOURCE_PACKAGE-ZAMTFLD = 'D'.
MOVE ZAMOUNT TO WA_SOURCE_PACKAGE-Z_DUM_ADJ.
APPEND WA_SOURCE_PACKAGE TO SOURCE_PACKAGE.
ENDIF.
ENDLOOP.
ENDWHILE.
Edited by: Vamshi_g_1 on Jun 7, 2011 1:50 AM
Edited by: Matt on Jun 7, 2011 6:55 AM - added tagsYou're using the function module incorrectly, and the logic of your start routine doesn't really make much sense. You set up the function module to read 2 characteristics and one key figure. But nowhere do you restrict what values to return. You then start a while loop that will read data from the infoprovider until there's none left. THEN for each package returned by the function module, you loop through your source data, hoping that G_S_SFK will contain the value you need.
There's so many things that aren't right about your usage of the FM. You need to talk to an ABAPper. Having a none-abapper do complicated coding will cause immense support pain further down the project path, and getting in someone to fix the issues is far more expensive than getting someone suitably experienced in the first place.
I just googled on RSDRI_INFOPROV_READ and in the first hits there are examples on how to use this FM. The FM documentation itself points to a sample program. If you insist on doing this yourself, then read all of those and figure out what they're doing. And what's wrong with what you're doing. If you can't do that - get someone who knows what they're doing in.
Finally, "However, the load to the DSO has been failing consistently" doesn't really tell us anything. Is it dumping, not providing the expected data, causing an earthquake?
Maybe you are looking for
-
I purchased a mac book air today. When in store I was able to see all of my music in itunes. Now I am at home I cant see any of my music although i tunes is authorized on the computer. How do I fix this ?
-
Mac will only stay on when hooked up to charger - HELP
As of last week, my MAC just shut down randomly. Once I plugged the charger in, it would turn back on, but the second I take it out of the charger, it shuts off again. For the past week, I've kept the charger in place; however, I can tell it's erodin
-
Can't find my rental in itunes 11.0.1
I just rented Ted. The first movie I rented in the new itunes 11.0.1. Never had any problems before, but it does not show up in my movies. I can't even find a tab for rentals anywhere in 11. Anyone else have this issue?
-
Vertical lines iphone 4s, guaranteed
Hello, My iphone 4s has vertical lines. The lines cover the display completely, they are colorful and across the entire screen. I didn't even drop or something else. I bought my phone 6 months ago and I have 2 years guarentee in Turkey but the autho
-
Hi, i want to develop an application with vs .net 2008 in c#. i need the illustrator cs3 com type library for my develop. i have install illustrator cs3, but no library to find. where i get this libraray? or what kind of installation i need to use th