cancel
Showing results for 
Search instead for 
Did you mean: 

Data Manager "Clear Package" Customization

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

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!

Former Member
0 Kudos

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

former_member186338
Active Contributor
0 Kudos

Please provide the correct ID of X005 TOTAL and I will show the script!

Former Member
0 Kudos

Hi Vadim,

Please see the screen shot below.

Regards,

Venkat

Former Member
0 Kudos

Apologies, Instead of "Y", i have changed to "X" in my previous Posts .

It is "Y"

REgards,

Venkat

former_member186338
Active Contributor
0 Kudos

Ups, you have ID with space inside???

Immediately correct it, a lot of scripts and procedures will not work with ID's with space!!!!

Former Member
0 Kudos

Ya, there is a space. Sure, I will discuss with my Client and perform the action. I will be checking with them tomorrow .

Regards,

Venkat

former_member186338
Active Contributor
0 Kudos

Let's assume that now it's X005_TOTAL

former_member186338
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Ok great, thanks a lot again. So, I should use the "/CPMB/ALLOCATION" Chain by calling the Script  in this package for performing this action? Please let me know.

Thanks and Best Regards,

Venkat

former_member186338
Active Contributor
0 Kudos

P.S.

*RUNALLOCATION is faster then *WHEN/*ENDWHEN loop!

Former Member
0 Kudos

Ok great, thanks a lot Vadim. So, should I use the "/CPMB/ALLOCATION" Package/Chain by calling the Script  in this package for performing this action? Please let me know.

Thanks and Best Regards,

Venkat

former_member186338
Active Contributor
0 Kudos

I prefer /CPMB/DEFAULT_FORMULAS_LOGIC, but /CPMB/ALLOCATION is the same (compare in RSPC)

Vadim

former_member186338
Active Contributor
0 Kudos

And please use UJKT to test the script:

Former Member
0 Kudos

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

former_member186338
Active Contributor
0 Kudos

"you have mentioned each member seperately in "WHAT" Condition" - absolutely incorrect!

*XDIM_MEMBERSET SALESOFFICE AS %X005_T% = BAS(X005_TOTAL)

This line will dynamically fill the %X005_T% variable with the base members under the parent X005_TOTAL

Vadim

Former Member
0 Kudos

Ok, but when i try to include this code, it is giving an Validation error. Please see the screen shot below. Is it because, the Base member of X005_TOTAL is parent of another member?

Thanks in advance,

Regards,

Venkat

former_member186338
Active Contributor
0 Kudos

It's because X005 TOTAL has space inside!!!!!!!!!!!!!!!!!!!!!!

I have already clearly explained you the issue!!!

Former Member
0 Kudos

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

former_member186338
Active Contributor
0 Kudos

"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

Former Member
0 Kudos

Apologies, marked helpful answers. Right, that was an error. Agreed. please see the Base members below for X005 TOTAL.

US PCS&D

Y005

Y007

Regards,

Venkat

former_member186338
Active Contributor
0 Kudos

Same issue "US PCS&D"

Please use correct ID's without spaces and characters like "&"

You will not be able to work with the dimensions with ID's like you have!!!

US PCS&D -> US_PCS_D

P,.S. Do you understand the error here: "NFO(%HARDCODEDDIM2%,DIMENSION:KEYFIGURE|PPV|REVAL|UY|FOREX|)????"

Former Member
0 Kudos

Sure Vadim, I have also joined this Proj recently. May be I will have to look in all the ID's, Impact and propose for changing them.

former_member186338
Active Contributor
0 Kudos

"and propose for changing them" - not propose, change is required!

Do you understand the error here: "NFO(%HARDCODEDDIM2%,DIMENSION:KEYFIGURE|PPV|REVAL|UY|FOREX|)????"

Former Member
0 Kudos

I think it should be written this way..

INFO(%HARDCODEDDIM2%,DIMENSION:KEYFIGURE|PPV,REVAL,UY,FOREX|)


Please correct me if I am wrong.


Regards,


Venkat

former_member186338
Active Contributor
0 Kudos

Yes, now it's correct!

Do you understand:

Why do you add %HARDCODEDDIMx% one at a time?????????????????? Have to be done in single line!

??

Former Member
0 Kudos

No Vadim, I am not getting this one. Can you pls. let me know?

Thanks in advance,

Regards,

Venkat

former_member186338
Active Contributor
0 Kudos

Ups...

"Have to be done in single line!"

TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%%HARDCODEDDIM1%%HARDCODEDDIM2%%HARDCODEDDIM3%)

Hope, now it's clear!!!

P.S. Same for:

TASK(/CPMB/CLEAR_COMMENTS_FOR...

Former Member
0 Kudos

Ah..ok, got it now, So, the same for CLEAR Comments as well as shown below..I guess.

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,SELECTION,%SELECTION%%HARDCODEDDIM1%%HARDCODEDDIM2%%HARDCODEDDIM3%)

Thanks in advance,

Regards,

Venkat

former_member186338
Active Contributor
0 Kudos

Don't "guess", test yourself!

Former Member
0 Kudos

Ok sure, One quick question please. For e.g. should the Sales office be prefixed by the parent always? for e.g. SALESOFFICE|Y005_US PCS&D where Y005 is a Parent and PCS&D is a Base member.

Thanks again.

Best Regards,

Venkat

former_member186338
Active Contributor
0 Kudos

"For e.g. should the Sales office be prefixed by the parent always?" Why????

I see no reason! base is the base, parent is the parent! Just no spaces and special characters in the member id's!

Former Member
0 Kudos

Okie, thanks a lot.. I will test and confirm.

Thanks a lot for your support.

Regards,

Venkat

Former Member
0 Kudos

Thanks a lot Vadim.

It is working perfect now. Thanks a lot for your support.

Regards,

Venkat

gajendra_moond
Contributor
0 Kudos

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.

Answers (1)

Answers (1)

gajendra_moond
Contributor
0 Kudos

Hi Venkata

A different title of the thread would have been better to distinguish your problem statements.

Former Member
0 Kudos

Hi Gajendra,

A new thread with different title has been posted. Please refer thread .

Regards,

Venkat

gajendra_moond
Contributor
0 Kudos

Please delete this thread as it is a duplicate now.

Former Member
0 Kudos

Hi Gajendra,

Can you pls, guide in closing this Thread? I can not see any option for doing this.

Thanks in advance,

Regards,

Venkat