cancel
Showing results for 
Search instead for 
Did you mean: 

Copy Closing inventory to opening inventory

0 Kudos

Hello Everyone,

I have a requirement where I need to post opening inventory amount once user inputs closing.

Hence I have tried this using below code in default logic, Once user enter closing values and click on save button. Closing inventory value should become opening of next period. irrespective of Category hence if there is value in Actual or in RF. opening account should also have the value from prior period.

//Below logic is to transfer closing inventory to opening
*XDIM_MEMBERSET TIME = %TIME_DIM%
*XDIM_MEMBERSET SCENARIO = Actual, BAS(RF)
*XDIM_MEMBERSET ANALYTICS = NO_ANALYTICS
*XDIM_MEMBERSET BOTTLER = BAS(ALL_BOTTLER)
*XDIM_MEMBERSET BRAND = BAS(PRODUCTS)
*XDIM_MEMBERSET ACCOUNT = INV_CLOSE
*XDIM_MEMBERSET RPTCURRENCY = LC,USD
*XDIM_MEMBERSET AUDITTRAIL = INPUT_DATA


*WHEN TIME
*IS *
*REC(EXPRESSION = %VALUE%, TIME = TMVL(1,%TIME_DIM%), ACCOUNT = INV_OPEN)
*ENDWHEN

Since the logic is written in Default, hence unable to scope the Time dimension.

Is there any other way to post the opening inventory or please rephrase this script.

System : BPC v10.1, model : planning, Also we do not have flow dimension in our model

Thank you appreciate any help.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

First - scoping in default.lgf is a bad practice! Please read my blog: https://blogs.sap.com/2014/06/09/how-to-write-defaultlgf/

Second: you can create a property NEXTPERIOD in TIME dimension and fill it with next month ID for base members.

Then the script will be:

*WHEN ACCOUNT
*IS INV_CLOSE
  *REC(EXPRESSION = %VALUE%, TIME = TIME.NEXTPERIOD, ACCOUNT = INV_OPEN)
*ENDWHEN 

Add other required WHEN/ENDWHEN

0 Kudos

Thank you Vadim,

Its working fine. After reading your blog got knowledge how scope is set when we click on save button. Hence there was no requirement of Scoping in the default logic.

Answers (0)