Skip to Content
avatar image
Former Member

HCI DS - Data loading for Forecast / Future period

Hi,

How do we load data for future periods using HCI?

E.G.

We get data for KF1 @ Prod Loc Level for Current Month

P1 L1 100 2015-08-01 00:00:00

How do we populate this data for next 12 months.

I need 11 more records.

I don't want to create 11 new dataflows where I keep changing the month.

I was going through some of the predefined templates of Inventory / Demand data where I do see we get variable value for future period in preload script.

But how do we use it in postload script.

Thanks,

Purav

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Aug 06, 2015 at 06:09 AM

    Hi Purav,

    You could use add_months(original_date, months_to_add). It will add the given number of months to your date.

    For example, original_date is $G_LOAD_DATE and months_to_add takes a value from 0 to 11.

    add_months($G_LOAD_DATE, 0) will return 2015.08.06

    add_months($G_LOAD_DATE, 1) will return 2015.09.06

    .........

    add_month(add_months($G_LOAD_DATE, 11) will return 2016.07.06

    You would need a place to store the months_to_add. If your data flow is reading from a file you could have a separate file with one column and the values you need.

    Regards,

    Alecsandra

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Alecsandra Dimofte

      Couple of Solution for above problem:

      1) As mentioned by Alecsandra, get and additional column.

      a) If data source is using FF, then create additional file with numbers from 0 to N(Forecast period)

      b) If data source is SAP system (APO / BI), we have 2 options.

      i) Create Z table with 1 column and specify 0 to N

      ii) Use 0CalMonth or 0CALDAY object to get 1 to 12 or 1 to 31 as a unique entry by developing split logic to get month / date. This is not the cleanest way / good design, but this also works if we dont have to develop any new Z table.

      2) Enhance ABAP prog which is transported from D to Q to P for each ABAP DF.

      Add logic of generating records for future. Strong documentation should be kept with project owner / stakeholder so that in case of enhancement in ABAP DF during support activities, prog is always appended with a prog which enables generating records for future months.

      Thanks,

      Purav