cancel
Showing results for 
Search instead for 
Did you mean: 

Inventory movement using logic script - BPC NW 10

Former Member
0 Kudos

Hello BPC experts,

I'm working on inventory movement using logic script. The idea is that the initial stock of the first period equals the final stock of the previous period.

Here is an example of my inventory report : (Dimension INVT in function of dimension TIME)

                                              2014.01       2014.02      2014.03        2014.04

F01 Stock first period                  12            

F02 Initial Stock                          12                 11              10                 9

F03 Inventory Inputs                    2                   4                6                   8

F04 Inventory Outputs                 3                   5                7                   9

F05 Final Stock                          11                 10               9                   8

The Stock of the first period is entered

The initial Stock = Stock first period (12 in our case)

Inventory inputs and Outputs are entered

Final Stock = Initial Stock + Inventory Inputs - Inventory Outputs

I tried the following script but it does not work :

*XDIM_MEMBERSET TIME = 2014.01 //we should then retrieve the first period of each year which is not necessary the first month of the year

*WHEN TIME

*IS 2014.01

*REC(EXPRESSION = [INVT].[F01], INVT = F02)

*ENDWHEN

*SELECT(%TIME_LIST%,"[ID]","TIME","[PREVMEMBER]"<>"") // PREVMEMBER is a property of TIME

*XDIM_MEMBERSET TIME = %TIME_LIST%

*XDIM_MEMBERSET INV = F05

*WHEN TIME

*IS %TIME_LIST%

//Something is missing here.. How to retrieve F05 values related to all periods and copy them in F02

*REC(EXPRESSION =[INVT].[F05],INVT = F02)

*ENDWHEN

Please how can I achieve this ?
Thanks

Maha

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member200327
Active Contributor
0 Kudos

Hi Maha,

Are you trying to plan inventory movement or report actuals?

For reporting of actuals there is special type of BW cubes with non-cumulative key figures. If you have a decent amount of data using BPC for this kind of tasks will definitely run into performance issues.

Regards,

Gersh

Former Member
0 Kudos

Hi Gersh,

It's not about reporting actuals. I'm trying to plan inventory using BPC.

Regards

Maha

former_member186338
Active Contributor
0 Kudos

Hi Maha,

Can you provide additional info in line with

Or we will spend a lot of time asking additional questions!

Vadim

Former Member
0 Kudos

Hi Vadim,

Thank you for your reply

I'm working with BPC NW 10 SP 05 (CPMBPC 801 SP 05), Engine ABAP

My model contains the following dimensions ACCOUNT (A), TIME (T), CATEGORY (C), ENTITY (E), CURRENCY (R), INVT (User Def)

In the INVT dimension we have members like (Stock first period, Initial Stock, Inventory Inputs, Inventory Outputs, Final Stock)


- [INVT].[Stock first period] is entered

- [INVT].[Initial Stock] = [INV].[Stock first period]

- [INVT].[Inventory input] and [INVT].[Outputs] are entered

- [INVT].[Final Stock] = [INVT].[Initial Stock] + [INVT].[Inventory Inputs] - [INVT].[Inventory Outputs]

We want to calculate Initial Stock in DEFAULT.lgf :

[INVT].[Initial Stock] when (TIME=2014.01) = [INVT].[Stock First Period] when (TIME= 2014.01)

[INVT].[Initial Stock] when (TIME=2014.02) = [INVT].[Final Stock] when (TIME= 2014.01)

[INVT].[Initial Stock] when (TIME=2014.03) = [INVT].[Final Stock]  when (TIME=2014.02)

[INVT].[Initial Stock] when (TIME=2014.04) = [INVT].[Final Stock]  when (TIME=2014.03)

When a user enters the values of "Stock first period", "Inventory Inputs" and "Inventory Outputs", Initial Stock and Final stock should be calculated via logic script

Regards

Maha

former_member186338
Active Contributor
0 Kudos

Yes, now it's better!

"We want to calculate Initial Stock in DEFAULT.lgf" - it's a key thing!

One additional question - what about year boundaries? For the next year the Stock First Period will be entered manually?

Vadim

Former Member
0 Kudos

The next year, the Stock First Period won't be entered manually, it will equal the Final Stock of the last year.

Thanks

Maha

former_member186338
Active Contributor
0 Kudos

What do you mean by "equal" How?

former_member186338
Active Contributor
0 Kudos

In general the solution is hard to write in the default.lgf, because the assumption is that user can enter or update any combination of [INVT].[Stock first period], [INVT].[Inventory input] and [INVT].[Outputs]

For each time member you have to recalculate all months [INVT].[Initial Stock] and [INVT].[Final Stock]

It's better to write DM package and launch it after the data is entered once for the whole year.

Vadim

Former Member
0 Kudos

I see what you mean

So What about giving the user two possibilities :

- The first one is to copy the value of [INVT].[Final Stock] of [TIME].[2014.12] for example into [INVT].[Stock First Period] of [TIME].[2015.01] (and of course into [INVT].[Initial Stock] ) using DM package. Then to execute the default logic script to calculate the [INVT].[Initial Stock] once he enters [INVT].[Inputs] and [INVT].[Outputs]

- The second one is to be able to enter [INVT].[Stock First Period] manually and to calculate the [INVT].[Initial Stock] via default logic script.

Is this a good solution?

Thanks

Maha

former_member186338
Active Contributor
0 Kudos

The issue is not only related to [Stock First Period], any [INVT].[Inventory input] and [INVT].[Outputs] correction in the middle year month will require recalculation of the month's after the affected month.

The proposal is simple: users just enter data for [INVT].[Stock first period], [INVT].[Inventory input] and [INVT].[Outputs] in the input form (may be with some Excel formulas to simulate the result). Then after saving data the DM package for the full year scope is launched by user. Over year transfer have to be done using another DM package!

Nothing in default.lgf related to this process.

Vadim