on 2015 Jul 21 3:31 PM
Hi, We are upgrading to BPC 7.5 Netweaver SP18 from BPC NW 7.5 SP14. This line in script logic works completely fine in our production SP14 instance, but it doesn't work in SP18 version. Is there a different way I can code this line to make it working?
*XDIM_FILTER CMRAW=[CMRAW].PROPERTIES("BUYER")=$BUYERCODE$
$BUYERCODE$ receives its value from what user entered on the pop-up screen while trying to run the job.
Here is what we have in the ADVANCED section of package to pass the value
TASK(Z_BPC_SC_CALC_LOGIC,REPLACEPARAM,BUYERCODE%EQU%%BUYERCODE%%TAB%FISYR%EQU%%FISYR%) Full logic in script:
Request clarification before answering.
Here is the full logic in ADVANCED section of PACKAGE: PROMPT(TEXT,%BUYERCODE%,"YOU MUST Enter a Single Buyer Code (ex: GA)") PROMPT(TEXT,%FISYR%,"YOU MUST Enter a Fiscal Year (ex: 2011)") INFO(%EQU%,=) INFO(%TAB%,;) TASK(Z_BPC_SC_CALC_LOGIC,SUSER,%USER%) TASK(Z_BPC_SC_CALC_LOGIC,SAPPSET,%APPSET%) TASK(Z_BPC_SC_CALC_LOGIC,SAPP,%APP%) TASK(Z_BPC_SC_CALC_LOGIC,LOGICFILENAME,BUYER_ALLOC_REQ_QTY.LGF) TASK(Z_BPC_SC_CALC_LOGIC,REPLACEPARAM,BUYERCODE%EQU%%BUYERCODE%%TAB%FISYR%EQU%%FISYR%) Here is the full logic in script logic:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
*XDIM_MEMBERSET CURRENCY=LOCAL *XDIM_MEMBERSET CMDATASRC=DS_BW *XDIM_MEMBERSET CMACCT=A_VOLUME *XDIM_MEMBERSET CMVENDOR=V_99 *XDIM_MEMBERSET FIN<>F_99 *XDIM_MEMBERSET PRDCNG_COPLANT=P_NONE *XDIM_MEMBERSET VERSIONBASE=MASTER *XDIM_FILTER TIME=[TIME].PROPERTIES("YEAR")=$FISYR$ *XDIM_FILTER CMRAW=[CMRAW].PROPERTIES("BUYER")=$BUYERCODE$ *RUNALLOCATION *FACTOR=0 *DIM CMACCT WHAT=A_VOLUME; WHERE=<<< *ENDALLOCATION
Hi Vadim, Please find attached the UJKT results attached here.
We have two script logics:
(1) runs full allocation based on the YEAR...so user enters year and that is fed into $YEAR$
(2) We have a job that does allocation for a specific buyer - so user enters $YEAR$ and $BUYERCODE$ - so this does allocation for that buyer only in that year.
Both scripts have exactly the same logic, except one has an additional variable for $BUYERCODE$. The first script runs just fine. we are having issues with second script. My BASIS team has moved the standard process chains to a different folder in RSA1 and hence I am unable to run the package when I change the DM Script to what you had provided. So, I switched back to the custom Z_BPC_SC....... Interestingly, these both script logics are running fine in SP14 production environment but not in SP18 test environment.
Note - I know there is a lot of ancient code in these scripts and there might be better way to do lot of things, but currently it is working in production so based on the amount of time I have before go-live I am trying to focus on fixing the issue and not re-designing the code ( which I plan to do later).
DM Script (Advanced): PROMPT(TEXT,%BUYERCODE%,"YOU MUST Enter a Single Buyer Code (ex: GA)") PROMPT(TEXT,%FISYR%,"YOU MUST Enter a Fiscal Year (ex: 2011)") INFO(%EQU%,=) INFO(%TAB%,;) TASK(Z_BPC_SC_CALC_LOGIC,SUSER,%USER%) TASK(Z_BPC_SC_CALC_LOGIC,SAPPSET,%APPSET%) TASK(Z_BPC_SC_CALC_LOGIC,SAPP,%APP%) TASK(Z_BPC_SC_CALC_LOGIC,LOGICFILENAME,BUYER_ALLOC_REQ_QTY.LGF) TASK(Z_BPC_SC_CALC_LOGIC,REPLACEPARAM,BUYERCODE%EQU%%BUYERCODE%) TASK(Z_BPC_SC_CALC_LOGIC,REPLACEPARAM,FISYR%EQU%%FISYR%)
Sorry, but "My BASIS team has moved the standard process chains to a different folder in RSA1 and hence I am unable to run the package when I change the DM Script to what you had provided." - can't help with a broken system! Please, repair!
And the mentioned lines:
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)
are NOT optional!
Vadim
P.S. In general, the script logic code is very old and some parts can create issues with the latest SP's... It's highly recommended to rewrite it - not a huge job!
Hi Vadim,
I created a test package called ISTEST.LGF which has the same logic as my sript_2.lgf except that I Have hardcoded the buyer code to see if that works.
I also used the standard process chain you specified and created a new package to run this test script via the standard process chain. It ran fin this time, but it did not move the data. Please see the DM Script (Advanced) here:
PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%,%CURRENCY_DIM%,%TIME_DIM%")
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,ISTEST.LGF)
Also attached is the script logic in ISTEST.LGF
What other parts in the logic you think need to be absolutely changed?
Advanced script is incorrect! You have to use (already posted!!!!):
PROMPT(TEXT,%BUYERCODE%,"YOU MUST Enter a Single Buyer Code (ex: GA)")
PROMPT(TEXT,%FISYR%,"YOU MUST Enter a Fiscal Year (ex: 2011)")
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,BUYER_ALLOC_REQ_QTY.LGF)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,BUYERCODE%EQU%%BUYERCODE%%TAB%FISYR%EQU%%FISYR%)
then you don't need to hardcode values!
Second:
And what is working? Allocation? Copy to first Destination???? Etc...
You script logic code performs multiple calculations in the sequence....
Vadim
I tried the exact same DM Script logic that you gave:
PROMPT(TEXT,%BUYERCODE%,"YOU MUST Enter a Single Buyer Code (ex: GA)")
PROMPT(TEXT,%FISYR%,"YOU MUST Enter a Fiscal Year (ex: 2011)")
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,BUYER_ALLOC_REQ_QTY.LGF)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,BUYERCODE%EQU%%BUYERCODE%%TAB%FISYR%EQU%%FISYR%)
Also, used "$BUYERCODE$" - quotes in the logic
And everything else works except the BAPI to actually move the data to a different application (COSTMODEL)
This is my problem logic(see in bold below), it is trying to add a dimension and move the data to that application.
*XDIM_MEMBERSET CURRENCY=LOCAL
*XDIM_MEMBERSET CMACCT=A_VOLUME
*XDIM_MEMBERSET CMDATASRC=DS_BW,DS_MANOVERRIDE
*XDIM_MEMBERSET CMDRIVER=D_NONE
*XDIM_MEMBERSET PRDCNG_COPLANT=P_NONE
*XDIM_MEMBERSET FIN=F_99
*XDIM_MEMBERSET VERSIONBASE=MASTER
*XDIM_MEMBERSET CMVENDOR=BAS(V_DETAILVENDORS)
*XDIM_FILTER TIME=[TIME].PROPERTIES("YEAR")="$FISYR$"
*XDIM_FILTER CMRAW=[CMRAW].PROPERTIES("BUYER")="$BUYERCODE$"
*XDIM_MEMBERSET CURRENCY=LOCAL
*XDIM_MEMBERSET CMACCT=A_VOLUME
*XDIM_MEMBERSET CMDATASRC=DS_BW,DS_MANOVERRIDE
*XDIM_MEMBERSET CMDRIVER=D_NONE
*XDIM_MEMBERSET PRDCNG_COPLANT=P_NONE
*XDIM_MEMBERSET FIN=F_99
*XDIM_MEMBERSET VERSIONBASE=MASTER
*XDIM_FILTER TIME=[TIME].PROPERTIES("YEAR")="$FISYR$"
*XDIM_FILTER CMRAW=[CMRAW].PROPERTIES("BUYER")="$BUYERCODE$"
I know what is DAPP badi - it's the VERY old 7.0 badi to write data to another application. In BPC 7.5 you have to use standard supported operator *DESTINATION_APP instead of this unsupported badi. Rewrite script with *DESTINATION_APP.
If you really want to understand what's wrong with DAPP - use ABAP debug of this badi execution
Vadim
P.S. I really see no evidence that "This is my problem logic(see in bold below), it is trying to add a dimension and move the data to that application." - the code is not working! No log, nothing to discuss!
And I prefer to use SELECT (instead of *XDIM_FILTER) like:
*SELECT(%FM%,[ID],TIME,"[YEAR]=$FISYR$")
*SELECT(%BC%,[ID],CMRAW,"[BUYER]=$BUYERCODE$")
*XDIM_MEMBERSET TIME=%FM%
*XDIM_MEMBERSET CMRAW=%BC%
*XDIM_MEMBERSET CURRENCY=LOCAL
*XDIM_MEMBERSET CMACCT=A_VOLUME
*XDIM_MEMBERSET CMDATASRC=DS_BW,DS_MANOVERRIDE
*XDIM_MEMBERSET CMDRIVER=D_NONE
*XDIM_MEMBERSET PRDCNG_COPLANT=P_NONE
*XDIM_MEMBERSET FIN=F_99
*XDIM_MEMBERSET VERSIONBASE=MASTER
*XDIM_MEMBERSET CMVENDOR=BAS(V_DETAILVENDORS)
*DESTINATION_APP = COSTMODEL
*WHEN TIME //any dimension can be used
*IS * //already scoped
*REC(EXPRESSION=%VALUE%,CMDATASRC=DS_BW)
*ENDWHEN
Result:
Values for CMDATASRC=DS_BW,DS_MANOVERRIDE will be written (with accumulation) to DS_BW in COSTMODEL
Assumption - current model and COSTMODEL use the same set of dimensions!
Vadim
Thanks Vadim...one quick question -
Is there a better/different way to write this statement? ( in bold)
*RUNALLOCATION
*FACTOR=1
*DIM CMDATASRC WHAT=DS_BW; WHERE=DS_BW,DS_MANOVERRIDE,DS_NEGOVERRIDE,DS_AUTOOVERRIDE
*DIM PRDCNG_COPLANT WHAT<>P_NONE; WHERE=P_NONE
*ENDALLOCATION
I am trying to sum all the data in those data sources and move it back to DS_BW. As I test more examples, it seems that is not working as expected.
Can I break it down to multiple or any other syntax?
The logic of this allocation is strange:
It will copy the value in DS_BW to DS_BW,DS_MANOVERRIDE,DS_NEGOVERRIDE,DS_AUTOOVERRIDE
why to DS_BW?
And will sum PRDCNG_COPLANT members <>P_NONE to P_NONE
I do not know what do you mean by "as expected"???
Please spend some time with easy samples to understand how allocation works...
Vadim
It is not copying the values from DS_BW,DS_MANOVERRIDE,DS_NEGOVERRIDE,DS_AUTOOVERIDE to DS_BW, which is why the problem is occuring. Which is why I asked you if there was an alternate way to do the same thing by using a different syntax. I have not developed this code and supporting the code that was written 5-6 years ago.
| 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.