cancel
Showing results for 
Search instead for 
Did you mean: 

Month wise Opening Stock and Closing Stock in SAP BPC 10.0 NW Calculation

former_member590808
Participant
0 Kudos

Hi

We have two GLs S60040-Opening Stock and S60041- Closing Stock. We want to copy month-wise closing stock of previous month to opening stock of next month.

TIMES dimension is in following format:

I am unsure whether member formula will be a correct approach or writing a Business Rule ?

I tried using PREVMEM property of TIMES dimension but was unable to fetch the data of S60041 in subsequent month at S60040.

Please suggest how should I go ahead with the solution.

Regards,

Neha.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

I am unable to understand, what you are doing!

Just created a simple test:

Model: PlanYTD - YTD

Accounts: PL010 and PL020 - both INC

Data:

Rule:

Script CALCACCOUNT.LGF:

*RUN_PROGRAM CALC_ACCOUNT
CATEGORY = %CATEGORY_SET%
CURRENCY = %RPTCURRENCY_SET%
TID_RA = %TIME_SET%
CALC=COPYPREV
OTHER = [ENTITY=%ENTITY_SET%]// or OTHER=[ENTITY=C1000] or [ENTITY=%ENTITY_SET%;INTCO=%INTCO_SET%...]
*ENDRUN_PROGRAM

Package log:

Package log:
/CPMB/MODIFY completed in 0 seconds
/CPMB/RUNCALCACCOUNT_LOGIC completed in 0 seconds
/CPMB/CLEAR completed in 0 seconds

[Selection]
--------------------------------------------------------------

SELECTION = /SHELLTEST/PlanYTD/PRIVATEPUBLICATIONS/SUPPORT_EXT/TempFiles/FROM.TMP@@@SAVE@@@@@@EXPAND@@@|DIMENSION:CATEGORY|Actual|DIMENSION:ENTITY|DE|DIMENSION:RPTCURRENCY|LC|DIMENSION:TIME|2006.06


[Message]
--------------------------------------------------------------

model: PlanYTD. Package status: SUCCESS



Formula log:
LOG BEGIN TIME:2018-12-25 07:50:24
FILE:\ROOT\WEBFOLDERS\SHELLTEST\ADMINAPP\PlanYTD\CALCACCOUNT.LGF
USER:SUPPORT_EXT
APPSET:SHELLTEST
APPLICATION:PlanYTD
RUN CALC_ACCOUNT
1  SUBMITTED, 1  SUCCESS, 0  FAIL.

SCRIPT RUNNING TIME IN TOTAL:0.00 s.
LOG END TIME:2018-12-25 07:50:24
File path: \ROOT\WEBFOLDERS\SHELLTEST\PlanYTD\PRIVATEPUBLICATIONS\SUPPORT_EXT\tempfiles\20181225075024\00O2TF566Z8NU51UNVPIJTM9I_CALCACCOUNT.LOG

Result:

No surprise!

former_member186338
Active Contributor
0 Kudos
CALC=COPYPREV

COPYPREV - ID of account-based calculation rule!

former_member590808
Participant
0 Kudos

0 records are getting submitted.

*RUN_PROGRAM CALC_ACCOUNT
	APL_CATEGORY = ACT
	APL_CURRENCY = %APL_CURRENCY_SET%
	APL_TIMES = %APL_TIMES_SET%
	CALC = Closing Stock
	OTHER= [APL_KEYFIGURE=dummy_test;APL_ENTITY=1010]
*ENDRUN_PROGRAM

former_member590808
Participant
0 Kudos

Hi,

I could resolve the issue. I was passing audittrail as well in the Business Rule. Once I removed it, Its working fine.

Thanks alot. Thank you so much for your patience !

regards,

Neha.

Answers (6)

Answers (6)

former_member186338
Active Contributor
0 Kudos

Please accept the correct answer!

former_member186338
Active Contributor
0 Kudos

"0 records are getting submitted." - Sorry, you are doing something wrong!

I am unable to check your mistakes (not full info provided), but you definitely have it!

My sample based on ENVIRONMENTSHELL is working absolutely fine.

former_member186338
Active Contributor
0 Kudos

P.S.

CALC = Closing Stock

ID with space inside??? Bad idea

former_member590808
Participant
0 Kudos

Hi,

Sorry I meant Model type: YTD

Account Type: INC

I have checked "Apply to YTD".

Before execution:

before-execution.png

Parameters:

prompts.png

After execution: after-execution.png

My query is if am passing only a particular month, why does the value changes for rest of the month ?

Package log:log-file.txt

former_member186338
Active Contributor
0 Kudos

Sorry, but I am unable to understand your last comment:

Account: YTD model ???? How account is related to model?

what do you mean by: "For Periodic Measure following is the result:"??? Why do you post it?

Nothing for the following:

Why do you check Apply to periodic?

What do you have before package run?

Where is the package log?

Do you really need an answer?

former_member186338
Active Contributor
0 Kudos

Sorry, but you have to provide info about model: periodic or ytd

What measure is used on report?

ACCTYPE for S60040 and S60041

Why do you check Apply to periodic?

What do you have before package run?

Where is the package log

etc....

former_member590808
Participant
0 Kudos

Account: YTD model

Account Type: INC

Measure: YTD

For Periodic Measure following is the result:

former_member186338
Active Contributor
0 Kudos

You can use script logic with property NEXTMEM:

*XDIM_MEMBERSET TIME=2018.11 //source month
*XDIM_MEMBERSET ACCOUNT=S60041 //source account
*WHEN ACCOUNT
*IS *
*REC(EXPRESSION=%VALUE%,TIME=TIME.NEXTMEM,ACCOUNT=S60040)
*ENDWHEN

Or you can use Balance Carry Forward rule or Account Calculation rule with:

Year:+0

Month:-1

former_member590808
Participant
0 Kudos

Thanks for your reply !

I have used Account Translation Rule:

I executed the Package for 2005.05, So the values are getting copied for all the rest of the months. And when I changed the Closing Stock for 2005.05, the opening stock is coming as summation of S60040+S60041 of previous month.Do Business Rule work like that ?

And if am executing for a single month why do the calculation get reflected for all the rest of the month. ?