on 07-28-2015 6:08 PM
Hi Experts,
I have a new requirement apart from the one which was solved yesterday. The thread of yesterday is .
The one of yesterday (in the link above) consists of Clearing out a single value but in the below requirement, I have to clear out Multiple values and also if you see the SALESOFFICE, i will have to clear out BAS(X005 TOTAL). Please let me know which is the better option for this type of scenario, whether, to write a script logic and call the script in the CLEAR package or Customizing the "CLEAR" package would be a better solution.
My script logic is below;
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET INGREDIENT = <ALL>
*XDIM_MEMBERSET KEYFIGURE = PPV,REVAL,UY,FOREX
*XDIM_MEMBERSET KIT = <ALL>
*XDIM_MEMBERSET LOCATION = %ENTITY_SET%
*XDIM_MEMBERSET M_P = M
*XDIM_MEMBERSET RptCurrency = USD
*XDIM_MEMBERSET SALESDIST = <ALL>
*XDIM_MEMBERSET SALESOFFICE = BAS(X005 TOTAL),X004
*WHEN_REF_DATA = MASTER_DATA
*WHEN SALESOFFICE
*IS BAS(X005 TOTAL),X004
*WHEN KEYFIGURE
*IS PPV,REVAL,UY,FOREX
*REC(FACTOR = 0)
*ENDWHEN
*ENDWHEN
I have customized the "CLEAR" package to a certain extent but it is still clearing out all the Sales office. Please see the code below.
PROMPT(SELECTINPUT,,,,"%ENTITY_DIM%,%TIME_DIM%")
PROMPT(RADIOBUTTON,%CHECKLCK%,"Do you want to check Work Status when clearing?",1,{"Yes, delete comments with work status settings","No, do not delete comments with work status settings"},{"1","0"})
INFO(%SELECTION_KEYDATE%,)
INFO(%HARDCODEDDIM1%,DIMENSION:M_P|M|)
INFO(%HARDCODEDDIM2%,DIMENSION:KEYFIGURE|PPV|REVAL|UY|FOREX|)
INFO(%HARDCODEDDIM3%,DIMENSION:SALESOFFICE|X005 TOTAL|X004|)
TASK(/CPMB/CLEAR_CUBE,CHECKLCK,%CHECKLCK%)
TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%%HARDCODEDDIM1%)
TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%%HARDCODEDDIM2%)
TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%%HARDCODEDDIM3%)
TASK(/CPMB/CLEAR_CUBE,DUMPLOADMODE,3)
TASK(/CPMB/CLEAR_CUBE,KEYDATE,%SELECTION_KEYDATE%)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,ENABLETASK,1)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKLCK,%CHECKLCK%)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKJOUR,0)
TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%%HARDCODEDDIM1%)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,SELECTION,%SELECTION%%HARDCODEDDIM1%)
TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%%HARDCODEDDIM2%)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,SELECTION,%SELECTION%%HARDCODEDDIM2%)
TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%%HARDCODEDDIM3%)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,SELECTION,%SELECTION%%HARDCODEDDIM3%)
My requirement is;
1. If I can call the above Script logic in the "CLEAR" Package, can you please let me know what changes have to be made in the "CLEAR" Package.
2. If I have to make changes directly in the "CLEAR" Package instead of using the above script, how can i customize the "CLEAR" package especially for clearing out the BASE Members of the Parent for e.g. (BAS(X005 TOTAL), X004 and clearing out Multiple Keyfigures PPV,REVAL,UY,FOREX.
Thanks in advance,
Best Regards,
Venkat
First: script logic is always slower then CLEAR package - you have to use it if its not possible to customize advanced DM script.
Second: the issue here is BAS(X005 TOTAL) - by the way, "X005 TOTAL" - is not a member ID, contains space!!!
In the DM advanced script you can only use the list of base members:
INFO(%HARDCODEDDIM3%,DIMENSION:SALESOFFICE|X005_1,X005_2,X005_3,X005_4,X004|)
where X005_1,X005_2,X005_3,X005_4 - list of base members of "X005 TOTAL"
If you can set the list then the issue is solved. If not - script logic with *RUNALLOCATION
Vadim
P.S. Your advanced DM script is absolutely incorrect!
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 a lot for your reply.
1. If I customize in the "CLEAR" Package, the problem here is if a new member is added to the Parent for e.g here it is "X005 TOTAL", then, always I should change the CLEAR Package by including the new Base member here. So that option would be of High risk as we might forget to add a new member always if any.
2. Can you pls. explain me how *RUNALLOCATION would help this as I am planning to use this so that if a new Base member is added, then we need not make any more changes.
Thanks in advance,
Best Regards,
Venkat
Space inside ID is absolutely prohibited!
Script 9you can use other):
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET INGREDIENT = <ALL>
*XDIM_MEMBERSET KEYFIGURE = PPV,REVAL,UY,FOREX
*XDIM_MEMBERSET KIT = <ALL>
*XDIM_MEMBERSET LOCATION = %ENTITY_SET%
*XDIM_MEMBERSET M_P = M
*XDIM_MEMBERSET RptCurrency = USD
*XDIM_MEMBERSET SALESDIST = <ALL>
*XDIM_MEMBERSET SALESOFFICE AS %X005_T% = BAS(X005_TOTAL) // to define variable %X005_T%
*RUNALLOCATION
*FACTOR=0
*DIM SALESOFFICE WHAT=X004; WHERE=%X005_T%,X004
*ENDALLOCATION
Vadim
Ok Sure, but I have a question please? In the RUNALLOCATION logic as well, you have mentioned each member seperately in "WHAT" Condition. Please see below. So, when a new member is added, then the script has to be changed as well right when a new member is created? Please confirm.
*DIM SALESOFFICE WHAT=X004; WHERE=%X005_T%,X004. Currently, I have 4 base members for X005_T Parent.
Regards,
Venkat
Okie..right, until we take a final decision on changing Y005 TOTAL, can you pls. let me know where exactly, I am going wrong in the "CLEAR" Package code? I will try to adopt this logic for now.
PROMPT(SELECTINPUT,,,,"%ENTITY_DIM%,%TIME_DIM%")
PROMPT(RADIOBUTTON,%CHECKLCK%,"Do you want to check Work Status when clearing?",1,{"Yes, delete comments with work status settings","No, do not delete comments with work status settings"},{"1","0"})
INFO(%SELECTION_KEYDATE%,)
INFO(%HARDCODEDDIM1%,DIMENSION:M_P|M|)
INFO(%HARDCODEDDIM2%,DIMENSION:KEYFIGURE|PPV|REVAL|UY|FOREX|)
INFO(%HARDCODEDDIM3%,DIMENSION:SALESOFFICE|X005_1,X005_2,X005_3,X005_4,X004|)
TASK(/CPMB/CLEAR_CUBE,CHECKLCK,%CHECKLCK%)
TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%%HARDCODEDDIM1%)
TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%%HARDCODEDDIM2%)
TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%%HARDCODEDDIM3%)
TASK(/CPMB/CLEAR_CUBE,DUMPLOADMODE,3)
TASK(/CPMB/CLEAR_CUBE,KEYDATE,%SELECTION_KEYDATE%)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,ENABLETASK,1)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKLCK,%CHECKLCK%)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKJOUR,0)
TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%%HARDCODEDDIM1%)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,SELECTION,%SELECTION%%HARDCODEDDIM1%)
TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%%HARDCODEDDIM2%)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,SELECTION,%SELECTION%%HARDCODEDDIM2%)
TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%%HARDCODEDDIM3%)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,SELECTION,%SELECTION%%HARDCODEDDIM3%)
I made modifications as you corrected in the previous posts. The line in BOLD.
Regards,
Venkat
"I will try to adopt this logic for now." - you will have to provide a fixed list of base members of X005 TOTAL - do you agree with this?
Don't you see the error here: INFO(%HARDCODEDDIM2%,DIMENSION:KEYFIGURE|PPV|REVAL|UY|FOREX|)????
Why do you add %HARDCODEDDIMx% one at a time?????????????????? Have to be done in single line!
And sorry, I don't see any helpful marks...
Vadim
Hi Venkata
Here is one probable solution but I am not sure how well it will fit your requirement.
https://scn.sap.com/docs/DOC-65629
It is more about deleting data selectively. One advantage with this approach is that you can use members even if they have spaces in between, though having spaces/special characters in IDs is not preferred.
Hi Venkata
A different title of the thread would have been better to distinguish your problem statements.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
14 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.