cancel
Showing results for 
Search instead for 
Did you mean: 

Read Infocube in APO

Former Member
0 Kudos

Hello All,

My requirement is to read infocube within APO. We are at version SCM 3.0. I checked all the thread related to reading infocube , everyone suggested to use FM RSDRI_INFOPROV_READ , however , this FM does not exists in APO 3.0 version . I then tried to use FM RSDPL_CUBE_DATA_READ. I passed keyfigure and Characteristic and ranges , FM in returns created the new table and store data of infocube into table. But when I checked table definition , there are some characteristic maintained as Primary key and therefore I am getting correct output what I need.

Does anybody ever implmented this FM in APO 3.0 version. and Does anyone has any idea ,how to avoid FM creating primary key.

I found , this FM makes that characteristic as primary key which comes first while passing characteristic to FM....It is little strange...

Does anyone has any idea on this ?. Or any other alternate way to read infocude content in APO.

Regards,

Prashant.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Vishu,

Thanks for your response.

I have a requirements to read infocube through ABAP code. The infocube is stored in APO itself and I suppose to write a program in APO to read this infocube. We are at 3.0 version of APO. I just wanna read cube content and do not write anything back to cube.

I was trying to read infocube through FM RSDPL_CUBE_DATA_READ. I passed keyfigure and Characteristic name and ranges as well , FM in returns creates the new table and store data of infocube into table. This FM stores cube content in table and we suuppose to read this table inorder to read infocube values.

However, I did not get correct results what I wanted tp get. I then checked the checked table definition and found that FM created table with primary key.and that the reason I was not getting correct output.

For example,

If infocube has follwing values

<b>Material Customer</b>

M1 C1

M1 C2

M2 C5

M1 C7

Now , when I call above FM with only charatristic Material and customer and passing ranges as Material = M1. Then it fetches only first row . ( M1 AND c1 ).

this is because , the table which FM created has Material being the primary key of the table and therefore I am not getting correct results. I suppose to get all the three rows of M1 but I didn't.

Do have any idea on this ?. Or any other alternate way to read infocude content in APO through ABAP.

Any code example , pls send it on prashantshah_2@hotmail.com.

Regards,

Prashant.

Former Member
0 Kudos

Hai Prashant,

BW has better tools for the Infocube reading and reporting. The tool is called BEx. You can write queries on a cube and it gives you the perfect result. Also you can use LISTCUBE to see the details of a cube.

Imagine the dimensions as different branches of a tree and data is stored in key figures. Now in your query, you can define your own key. The system goes and searches data in the key figure for your char. combination.SO what ever you give becomes the key. Thats the core concept of BW.

Looks like the FM you are using is actually trying to create a primry key from multi dimensional structure and its taking the first in the order char. as primary key, which by nature could be erronous. I never worked with this FM but I use BEx queries to read data and report. That's a lot lot easier, less error prone.

I am not sure if I answered your questin yet...please let me know if I can clarify any more questions.

Thanks.

Message was edited by:

Visu Venkat

Former Member
0 Kudos

Hi Vishu,

Yeah with Bex query life is easy..but my requirements such that based upon cube content I need to update custom table in APO..and hence , I need to read cube content through ABAP but I am not getting through.

Regards,

Prashant.

Former Member
0 Kudos

Hello Prashant,

I am surprised that the FM RSDRI_INFOPROV_READ does not exist in APO 3.0. I don't have a 3.0 version to check here. However, i can try to point you to the right direction.

Please check if function module RSDRC_CUBE_DATA_GET exists.

The other option is to join the cube tables yourself. The data of an InfoCube is split into several tables (e.g. the Fact Table, the Dimension Tables, the SID tables). To determine the tables of your InfoCube, please go to transaction listschema and enter the name of your cube there. The transaction will then list down the tables involved in you cube

Also, i think there should be a FM which reads an Infocube even for APO 3.0. To help you find that function module, please go to transaction listcube, enter the name of your cube, click execute and enter your selections. Before executing, turn on debugging (/h) and try to find out the FMs involve using the ABAP debugger (e.g. you can add a break point for the CALL FUNCTION statement )

Hope this helps!

Former Member
0 Kudos

Hello Prashant,

Hope by this time you have got the answer, still you may try FM RSDRC_BASIC_CUBE_DATA_GET in APO 3.X to get data from infocube if it is a basic infocube.

To know the underlined tables of an infocube you may use FM RSD_TNAMES_GET_FOR_CUBE in APO 3.X. Then you can join the table and fetch the data as desired.

As far as FM RSDRI_INFOPROV_READ is concerned, that is not available in APO 3.X as in APO 3.0, embedded BW version is 2.X. BW 2.X didn't have the conept of Infoprovider.

Abhay

Former Member
0 Kudos

Hi,

You can use Analasys Process Designer here, APD is the process where we can take BEx query as Source and Your custom table as target.

For better understanding of this new APD tool, search in BI forums.

With rgds,

Anil Kumar Sharma .P

eSkill
Explorer
0 Kudos

Hi!

You should use FM RSDRI_CUBE_READ. Just set a breakpoint at the beginning of this FM and start transaction LISTCUBE to simulate the reading of the Cube data. When the processing stops at the breakpoint you can see how the FM has to be parameterized.

I would not let the FM create a table itself. I would receive the result set in internal table e_t_data and do the further processing in the program.

Hope it helps

Carsten

Former Member
0 Kudos

Thanks Carsten, That was a useful answer.

I debugged the FM RSDRI_CUBE_READ and it is solving my requirements..

I have rewarded the points accordingly.....Thanks again.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hai what are trying to do? Are you trying to do? I mean where are you trying to load data to? For what are you reading data? Give me more details and I would be able to help.