on 2019 Feb 08 3:28 AM
Hello:
I have to allocate from different Cost Center ( CECO DIM) to another CostCenter using variable drivers and account.
Each cost center has is master data the following property:
Property CUENTA_DIST = Value of the account to allocate (WHERE)
Property DRIVER_DIST= Value of the driver to allocate (USING)
My script Logic is:
*XDIM_MEMBERSET CECO AS %var1% = 1201603,1300014,1201102
*FOR %y%= %var1%
*SELECT(%var2%,DRIVER_DIST,CECO,ID=%y%) - Here is not working
*SELECT(%var3%,CUENTA_DIST,CECO,ID=%y%) - Here is not working
*RUNALLOCATION
*FACTOR = USING/TOTAL
*DIM CECO WHAT =%y%; WHERE = BAS(016); USING = <<<; TOTAL = <<<
*DIM CUENTA WHAT = BAS(SFCuentas); WHERE = %var3%; USING = %var2%; TOTAL = <<<
*DIM FUENTE What = Input; WHERE = Input; USING = <<<; TOTAL = <<<
*ENDALLOCATION
I got blank component in the select. Is my script correct?
Thanks in advance.
Luciana
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you also post UJKT for:
*SELECT(%CC%,ID,CECO,ID=1201603,1300014,1201102) //to ensure correct sort order
*XDIM_MEMBERSET CECO=%CC%
*SELECT(%CDRIV%,DRIVER_DIST,CECO,ID=%CC%) //list of DRIVER_DIST property
*XDIM_MEMBERSET CUENTA=%CDRIV%
*SELECT(%CWHERE%,CUENTA_DIST,CECO,ID=%CC%) //list of CUENTA_DIST property
*XDIM_MEMBERSET CUENTA=%CWHERE%
to see the order in variables...
My test case:

Script:
*SELECT(%CC%,ID,COST_CENTER,ID=CC_AU001002,CC_AU002000,CC_AU005000) //for correct sort order
*XDIM_MEMBERSET COST_CENTER=%CC%
*SELECT(%CDRIV%,BPC_FUNCTIONAL_AREA,COST_CENTER,ID=%CC%)
*XDIM_MEMBERSET FUNCTIONAL_AREA=%CDRIV%
*SELECT(%CWHERE%,BPC_PROFIT_CENTER,COST_CENTER,ID=%CC%)
*XDIM_MEMBERSET PROFIT_CENTER=%CWHERE%
*FOR %C%=%CC% AND %D%=%CDRIV% AND %W%=%CWHERE%
*XDIM_MEMBERSET COST_CENTER=%C%
*XDIM_MEMBERSET FUNCTIONAL_AREA=%D%
*XDIM_MEMBERSET PROFIT_CENTER=%W%
*NEXTUJKT log:
LGX:
*XDIM_MEMBERSET COST_CENTER=CC_AU001002,CC_AU002000,CC_AU005000
*XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610001,FA_610002,FA_610300
*XDIM_MEMBERSET PROFIT_CENTER=PC_AU00-00010,PC_AU00-00003,PC_AU00-00002
*XDIM_MEMBERSET COST_CENTER=CC_AU001002
*XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610001
*XDIM_MEMBERSET PROFIT_CENTER=PC_AU00-00010
*XDIM_MEMBERSET COST_CENTER=CC_AU002000
*XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610002
*XDIM_MEMBERSET PROFIT_CENTER=PC_AU00-00003
*XDIM_MEMBERSET COST_CENTER=CC_AU005000
*XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610300
*XDIM_MEMBERSET PROFIT_CENTER=PC_AU00-00002You can see that order is absolutely correct!
May be you have BPC SP issue!
Upgrade to the latest: SAP Business Planning and Consolidation 10.1 Support Package 15, version for SAP NetWeaver 7.40
Note: https://launchpad.support.sap.com/#/notes/2552555
P.S. Look on dimension order of PROFIT_CENTER dimension:

You can see that the order is different compared to correct result in my script!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To test the logic simply execute in UJKT the following script:
*SELECT(%CC%,ID,CECO,ID=1201603,1300014,1201102) //to ensure correct sort order
*SELECT(%CDRIV%,DRIVER_DIST,CECO,ID=%CC%) //list of DRIVER_DIST property
*SELECT(%CWHERE%,CUENTA_DIST,CECO,ID=%CC%) //list of CUENTA_DIST property
*FOR %C%=%CC% AND %D%=%CDRIV% AND %W%=%CWHERE%
*XDIM_MEMBERSET CECO=%C%
*XDIM_MEMBERSET CUENTA=%D%
*XDIM_MEMBERSET CUENTA=%W%
*NEXTPost resulting LGX - you will see the correct sequence!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim, thanks in advance.
Here is the sample data:

And here is the result, with your script:

The drivers and account are getting mix.
Master Data is correct:

Script Logic;
*SELECT(%CC%,ID,CECO,ID=1201603,1300014,1201102)
*SELECT(%CDRIV%,DRIVER_DIST,CECO,ID=%CC%)
*SELECT(%CWHERE%,CUENTA_DIST,CECO,ID=%CC%)
*FOR %C%=%CC% AND %D%=%CDRIV% AND %W%=%CWHERE%
*RUNALLOCATION
*FACTOR = USING/TOTAL
*DIM CECO WHAT =%C%; WHERE = BAS(016); USING = <<<; TOTAL = <<<
*DIM CUENTA WHAT = BAS(SFCuentas); WHERE = %W%; USING = %D%; TOTAL = <<<
*DIM FUENTE What = Input; WHERE = Input; USING = <<<; TOTAL = <<<
*ENDALLOCATION
*NEXT
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim, thanks in advance.
Here is the sample data:
And here is the result, with your script:
The drivers and account are getting mix.
Master Data is correct:
Script Logic;
*SELECT(%CC%,ID,CECO,ID=1201603,1300014,1201102)
*SELECT(%CDRIV%,DRIVER_DIST,CECO,ID=%CC%)
*SELECT(%CWHERE%,CUENTA_DIST,CECO,ID=%CC%)
*FOR %C%=%CC% AND %D%=%CDRIV% AND %W%=%CWHERE%
*RUNALLOCATION
*FACTOR = USING/TOTAL
*DIM CECO WHAT =%C%; WHERE = BAS(016); USING = <<<; TOTAL = <<<
*DIM CUENTA WHAT = BAS(SFCuentas); WHERE = %W%; USING = %D%; TOTAL = <<<
*DIM FUENTE What = Input; WHERE = Input; USING = <<<; TOTAL = <<<
*ENDALLOCATION
*NEXT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The correct script will be (using AND in FOR):
*SELECT(%CC%,ID,CECO,ID=1201603,1300014,1201102) //to ensure correct sort order
*SELECT(%CDRIV%,DRIVER_DIST,CECO,ID=%CC%) //list of DRIVER_DIST property
*SELECT(%CWHERE%,CUENTA_DIST,CECO,ID=%CC%) //list of CUENTA_DIST property
*FOR %C%=%CC% AND %D%=%CDRIV% AND %W%=%CWHERE%
//Variables will be assigned with correct order:
//First CECO member, DRIVER_DIST of first CECO member, CUENTA_DIST of first CECO member,
//Second CECO member, DRIVER_DIST of second CECO member,...
*RUNALLOCATION
*FACTOR = USING/TOTAL
*DIM CECO WHAT =%C%; WHERE = BAS(016); USING = <<<; TOTAL = <<<
*DIM CUENTA WHAT = BAS(SFCuentas); WHERE = %W%; USING = %D%; TOTAL = <<<
*DIM FUENTE What = Input; WHERE = Input; USING = <<<; TOTAL = <<<
*ENDALLOCATION
*NEXT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, but if you read help for SELECT: https://help.sap.com/viewer/a2049170bfeb4178ace32222842c3ec1/10.1/en-US/77b5be0a7ff947ab9e98b5e60e17...
you will see that SELECT can't be used inside FOR/NEXT - SELECT is processed before FOR/NEXT
Instead of RUNALLOCATION try to use WHEN/ENDWHEN or use some temporary members... Please provide clear data sample!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 7 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.