cancel
Showing results for 
Search instead for 
Did you mean: 

Does exist a way to read data from IP planning cube with ABAP?

alfonso_gonzalez2
Participant
0 Kudos

Hello All.

My scenario is as follows:

I have an ODS where we store costcenters to be planned. This ODS is loaded via a manual falt file load (regular dta transfer process). In order to avoid inconsisten data in the planning cube, I want to check in my ODS load process, if any costcenter which is already planned (it has planned data in my planning cube) is being deleted in the loaded file.

To do this, I need to access my planning data cube ( i guess also planning buffer), so my question is if there is any function module which retrieves data from a planning level as reference data.

Thanks a lot and best regards,

Alfonso.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can try using FM RSDRI_INFOPROV_READ to read data from your cube with the same selections as of your planning level.

Check the demo report RSDRI_INFOPROV_READ_DEMO to understand how you can use this FM in your ABAP code.

Regards,

Deepti

alfonso_gonzalez2
Participant
0 Kudos

Dear Deepti.

And does that function module also reads the open request of a transactional cube?

Thanks.

Former Member
0 Kudos

Regards

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

I had similar needing as you and I remember that in the function modules mentioned above, if I am not wrong in RSDRI_INFOPROV_READ there is one parameters option to read also yellowe request. Maybe something related with roolback . Unfortunately I am in vacation and I cannot check in the abap code on the previous project. For sure anyway u can read yellow requests, just have a look at the FM parameters. Next week I come back at work and if you still; need I will check.

I used the way to read trough FM on cubes and sometimes it s really the best and fastest way if u need other informations.

Hope I helped.

Ciao

Walter

Edited by: Walter Cista on Jan 6, 2009 10:26 AM

alfonso_gonzalez2
Participant
0 Kudos

Dear Walter.

Thanks for your answer, it was very helpfull.

You were right, the parameter that allows to read yellow request is I_ROLLUP_ONLY which has to be set to blank.

Thanks a lot to all of you.

Best regards.

Former Member
0 Kudos

Hi,

If records from both the request should be read ie Request under processing(which is in yellow) and Request which is processed(Which is in Green) at a time. What should be done.

Is there any function module which returns the records of both requests.

Rgds,

Ganesha

Former Member
0 Kudos

Hi Alfonso,

note 1101726 shows how the plan buffer can be read.


     l_r_plan_buffer = cl_rsplfa_plan_buffer=>if_rsplfa_plan_buffer~get_instance( i_infoprov ).
     l_r_plan_buffer->get_data( EXPORTING i_t_charsel = l_t_charsel        
                                          i_include_zero_records = rc_false 
                                          i_r_msg = l_r_msg 
                                IMPORTING e_r_th_data  =  l_r_th_data
                                EXCEPTIONS OTHERS  = 2 ).   

Please take a look at the note. You do not need to implement the after_burn_selection exit, but you can find sample code how to read the planning buffer. Please give it a try.

Another solution would be to use the function module RSDRI_INFOPROV_READ. But you need to make shure that you first close the yellow request. This can be done using function module RSAPO_SWITCH_BATCH_TO_TRANS.

Hope this helps

Matthias Nutt

SAP Consulting Switzerland

alfonso_gonzalez2
Participant
0 Kudos

Dear Matthias.

Thanks for your answer.

Before I opened this post, I tried what you suggest about oss note. But I was getting an ABAP sump when the coded reached the follogin point,

IF cl_rsplfr_controller=>p_r_area IS NOT BOUND.

Interfacemethode wird im falschen Kontext aufgerufen

MESSAGE e190(rsplf) INTO l_dummy.

i_r_msg->add_msg( ).

RAISE error.

ELSE.

so I decided to try something else.

Now I am trying with function module RSSEM_INFOPROV_READ which works basically the same way as the one you told me (also DEEPTI told me this one), but this one reads the data from the open request.

Best regards,

Alfonso.

Former Member
0 Kudos

Hi Alfonso,

thank you very much for your reply. Reading the planning buffer outside the planning framework seems to be more complicated than I thought. The problem is to set the attribute CL_RSPLFR_CONTROLLER=>p_r_area. So I think for now you need the use the function modules mentioned above.

Regards Matthias

Former Member
0 Kudos

Hi Alfonso,

thank you very much for your reply. Reading the planning buffer outside the planning framework seems to be more complicated than I thought. The problem is to set the attribute CL_RSPLFR_CONTROLLER=>p_r_area. So I think for now you need the use the function modules mentioned above.

Regards Matthias