on 12-09-2009 8:21 PM
Hi Experts,
I have created a planification function type exit.
when I execute this function based on an aggregation level which is based on a real time cube , I managed to get back the data on the buffer; but when I execute this function based on an aggregation level which is based on a multiprovider ( contain 1 real time cube and 1 basis cube ) : the method doesn't work, the buffer is always empty.
Here the ABAP ( found on note 1101726 ) :
i_infoprov is my aggregation level
i_t_charsel contain info objet 0INFOPROV = basis cube from whitch i want the data )
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 = i_t_charsel
i_include_zero_records = rs_c_false
i_r_msg = l_r_msg
IMPORTING e_r_th_data = l_r_th_data
EXCEPTIONS OTHERS = 2 ).
l_r_th_data is still empty !
Is somebody has already had to make it and could help me?
thanks a lot by advance
Ingrid.
Hi Matthias,
Thanks a lot for your answer.
I want to use buffer because I have create a generic planning function type which is supposed to work with every aggregation level . But i think there is a method which permit to get data from buffer with an infoprovider ( an not an aggregation level ), so i will try to use it and define the infoprovider to use with a filter as you suggest in your reponse, if its works, i will give you points and thanks so much. See the response tomorrow...
Ingrid.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matthias,
My idea does not work because i don't give the rigth parameters.
Do you have an example of coding to get data from IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~GET_REF_DATA_SEL as you explain in your answer ?
I try :
l_infoprov = P_SOURCE->get_infoprov('ZCCAN03_1' ). " data are in cube ZCCAN03_1
but it's not OK because P_SOURCE is not a reference variable .
Thank you,
Ingrid.
Hi Ingrid,
IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~GET_REF_DATA_SEL sets the filter to read the reference data.
The most simple example is to read the same data as for the "transactional" filter. In this you can write the following:
e_t_ref_charsel = i_t_data_charsel.
Copying the filter is usually one of the first statements in your code. Now you have your reference filter in table e_t_ref_charsel and can enhance it. That means change some entries, delete or add some entries according to your needs.
Take a look at the standard copy planning function:
copying the filter
e_t_ref_charsel = i_t_data_charsel.
... doing some stuff here ..
getting parameter values and adding it to e_t_ref_charsel
l_t_param_tab = i_r_param_set->get_tab_param_struc( 'FROMTAB' ).
LOOP AT l_t_param_tab INTO l_r_param_tab_wa.
l_r_param_sel = l_r_param_tab_wa->get_comp_data_sel( 'FROMSEL' ).
l_t_charsel = l_r_param_sel->get_t_sel( ).
LOOP AT l_t_charsel INTO l_s_charsel.
APPEND l_s_charsel TO e_t_ref_charsel.
ENDLOOP.
Another example can be found in the standard currency conversion (implemented in class CL_RSPLFC_CURR_CONV).
This seems to me a bit more simple. So you may take a look at it first.
The important point is to fill e_t_ref_charsel according to your needs.
Hope this helps ...
Regards Matthias
Hi Ingrid,
are you asking how to fill the reference data selection from variables? Well to do this you need to create parameters and read them here. Filling the parameters with variables in the planning modeler is possible.
You can see your reference data in method IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~EXECUTE in table i_th_ref_data.
Regards Matthias
Hi Matthias,
I have finally a problem .... I use the same planning function type for 2 aggregatiion level and I use the instruction 'CASE' to execute the good treatment.
The 2 aggregation level are based on multiproviders, but I have data in I_TH_REF_DATA only with one of the multiprovider.
In both case, multiprovider are based on same cube but the only difference is on the caracteristics and ratios used in the aggregation level.
Do you have an idea ?
Thanks by advance,
Ingrid.
Hi,
good. Could it be that this is a block building error? You need to know that your execute method is called for each block. The tables with the reference and transaction data are filled according the the current block for which the execute method is called.
How are your characteristics set up for the planning function. Are they all marked as "to be changed"? How did you set the flag "Without blocks" of your planning function type?
Regards Matthias
Hi,
ok. mmhh its hard to tell without having access to the system. Can you check the multiprovider? Are you getting the correct data in c_th_data in the execute method?
You have set up the planning function for each agglevel, correct? So you have two planning function which refer to your exit planning function type, correct?
Regards Matthias
Matthias,
I can give you more informations :
I execute my function in debugging mode after method IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~GET_REF_DATA_SEL :
I am in the class CL_RSPLFR_CONTROLLER, method EXECUTE_SERVICE and when i am in function 'module read_data_from_buffer' : the parameters are the same in both case ... unfortunally, in 1 case i get the data and in the other, l_r_th_data is empty.
I don't understand.
Ingrid.
Hi Matthias,
I verify the mapping, in debug I found that the problem was on the parameter P_handle .... ?
So, we decide to recreate the multi-provider ( and AL, function, filters , sequence, layout ) and it seems to be OK.
Next time, i will do it fist ( I did but 'in model' and the result was KO ... ).
thanks for your answer and for the time you accord to my post.
Ingrid.
Hi Ingrid,
why don't you read the data you need as reference data? Create an exit with reference data and change the filter for the reference data. This should be easier. Changing the filter for the reference data can be done in method GET_REF_DATA_SEL of your exit class. You may also need to implement IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~ADD_NEW_BLOCKS. A good starting point for this method is to copy it from class CL_RSPLFC_COPY.
Regards Matthias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
11 | |
10 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.