cancel
Showing results for 
Search instead for 
Did you mean: 

BADI Macro for Disaggregation in DP(APO)

Former Member
0 Kudos

Hi,

I have a planning book in APO with CVC combination Material , Program and Location.

I need to consider lowest level of history data for calculation of forecast weeks.

Hence created a BADI macro and fetching data from planning book.

Using  BAPI_PBSRVAPS_GETDETAIL2  BAPI for keyfigure data in  key_figure_value.

Also using

C_T_TAB

C_T_TAB_OLD for retrieving planning book data.

I am able to get highest level data(total value for key figures) but I need lowest level (material,program and location wise disaggregated) data.

Any suggestions on this?

Regards

Kota

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If you are reading Planning Book data using BAPI by passing only Keyfigure value in KEY_FIGURE_SELECTION then you will always get the data as aggregated level.If you want to read the data specific to material program and location then you need to pass these values to the BAPI as an input parameters in SELECTION parameter table which will give you KF values for that particular combination.

Regards,

Saurabh

Former Member
0 Kudos

Hi Saurabh,

You are correct when the data required for a given material, program and location combinations.

but I want data for a particular material with all possible program and location combinations(lowest level data).

The current issue is solved when I give Material,Program and Location parameters in "group_by".

Now I require to calculate average ratio for these combinations.Is there any way for calculating average for all these combinations?

Former Member
0 Kudos

Hi,

Lowest level data means there also exists some combination....so when you can do this in planning book and see the data, you can also read the same values using BAPI by changing the selection parameters...using 'selection' & 'group_by' ... I think you will have to read CVC data first and then pass the combinations to BAPI to get the details...

Former Member
0 Kudos

Hi,

Thanks for your response.

I am getting lowest level data from BAPI with all possible cvc combinations.

Now I require to calculate average ratio for a key figure from lowest level with respect to the aggregated total value and apply the ratio for forecast weeks disaggregated data.

Please suggest me on how to calculate average ratio on disaggregated data in planning book.

Regards

Kota.

Answers (0)