cancel
Showing results for 
Search instead for 
Did you mean: 

BadI /sapapo/sdp_fcst3 method parameter save

0 Kudos

Hi, I need help implementing this BadI to store trend, basic and seasonal values in APO Key Figures.

I am using SCM7 EHP2 SP4.

The following steps were completed successfully:

  • Define 3 new key figures Z1 (trend value), Z2 (seasonal indexes), Z3 (basic value) and add these to my planning area,
    • The key figures settings will allow up to 3 decimals, zero is allowed, aggregation type N
    • The key figures were added in the data view used for statistical forecasting, and are opened for input/output for the whole planning area initialization period.

  • Create a zcustomer_table as suggested in note 394076

The customer must create their own table for this example with the

* following structure:

* pareaid          TYPE  /sapapo/ts_pareaid    Schlüsselfeld

* iobjnm_fcst      TYPE  /sapapo/krit1         Schlüsselfeld

* iobjnm_trend      TYPE  /sapapo/krit1

* iobjnm_season     TYPE  /sapapo/krit1

* iobjnm_base       TYPE  /sapapo/krit1

  • Create one single entry in my zcustomer_table with planning area id zpa1, statistical kf id z4, then trend z1, season z2, base z3

  • Implement badI /sapapo/sdp_fcst3
    • Create code based on example provided in note 394076

method /SAPAPO/IF_EX_SDP_FCST3~PARAMETER_SAVE.

DATA: ls_data TYPE zcustomer_table.

SELECT SINGLE * FROM zcustomer_table INTO ls_data

WHERE pareaid = iv_pareaid

AND iobjnm_fcst = is_dp440g-kennz.

IF sy-subrc EQ 0.

   ev_trend = ls_data-iobjnm_trend.

   ev_season = ls_data-iobjnm_season.

   ev_base = ls_data-iobjnm_base.

ELSE.

   RAISE no_chance.

ENDIF.

endmethod.


    • Activate badI

  • Since the forecast is not executed at the most detailed level, I have created an aggregate at the forecast level

When I execute a univariate forecast interactively or in background, then I save the results, the trend, seasonal indexes and basic values are not saved in my data view and kf.

Do you have any suggestions?

Thanks,

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Nevermind, I was able to solve it.

My issue was related to aggregation type not working as expected. I modified the aggregation types to pro rata as I will never look at these key figures at any level than forecast level.