cancel
Showing results for 
Search instead for 
Did you mean: 

Data Manager "Clear Package" Customization

Former Member
0 Kudos

Hello All,

We are trying to create a 'Clear' DM Package that avoids the User making any manual selections and is therefore low risk. Therefore, the user wants to have a Script logic created where in all the Dimensions are hardcoded to ALL except for a few which should have a  Prompt in the Data Manager.


Following are the steps which I have created for this purpose.


1. Script Logic with below code


*XDIM_MEMBERSET TIME = %TIME_DIM%

*XDIM_MEMBERSET VERSION = %CATEGORY_DIM%

*XDIM_MEMBERSET ASSET = <ALL>

*XDIM_MEMBERSET COSTCENTER = <ALL>

*XDIM_MEMBERSET COSTELEMENT = <ALL>

*XDIM_MEMBERSET DATASRC = <ALL>

*XDIM_MEMBERSET PLANNED_ASSET = <ALL>

*XDIM_MEMBERSET LOCATION = %ENTITY_DIM%

*XDIM_MEMBERSET M_P = <ALL>

*XDIM_MEMBERSET RptCurrency = <ALL>

2. DM Package customization as below;  (The above script not part of the below code)

PROMPT(SELECTINPUT,,,,"%ENTITY_DIM%,%CATEGORY_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%,)

TASK(/CPMB/CLEAR_CUBE,CHECKLCK,%CHECKLCK%)

TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%)

TASK(/CPMB/CLEAR_CUBE,DUMPLOADMODE,3)

TASK(/CPMB/CLEAR_CUBE,KEYDATE,%SELECTION_KEYDATE%)

I am not calling the script from the above Data Manager package "Advance script" since the code assumes <ALL> i guess. If that is the case, should I create a Script for this purpose? If yes, can you please let me know if I should call the script in the Data Manager Package. Also, please let me know if the Script logic code in step 1 is correct since I only defined the scope.

Step 1 : Made a manual posting

Step 2: executed the Package with below selections

Step 3: Report check after the package run

The requirement is to call the script for performing the "CLEAR". Therefore, pls let me know if the script in step 1 should be part of Data Manager advanced script?

Also, would like to know if I do not include the step 1 in the Data Manger and execute as well, it is performing the same. Can I perform the same actions as performed now.

But final requirement by user is to have this called via script.

Thanks in advance,

Venkat

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

P.P.S. And for standard clear package (without script logic, using CLEAR process chain) - ALL for dimension is equivalent for nothing:

PROMPT(SELECTINPUT,,,,"%ENTITY_DIM%,%CATEGORY_DIM%,%TIME_DIM%")

is enough to provide user with LOCATION, TIME and VERSION selection. Other dimensions will have nothing - equivalent to ALL.

Vadim

Former Member
0 Kudos

Ok, thanks Vadim. So can I conclude by only copying the "CLEAR" DM Package and customize the "ADVANCE SCRIPT" code as below with out creating a "Script Logic"? or pls. let me know if I have to make any other changes.

PROMPT(SELECTINPUT,,,,"%ENTITY_DIM%,%CATEGORY_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%,)

TASK(/CPMB/CLEAR_CUBE,CHECKLCK,%CHECKLCK%)

TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%)

TASK(/CPMB/CLEAR_CUBE,DUMPLOADMODE,3)

TASK(/CPMB/CLEAR_CUBE,KEYDATE,%SELECTION_KEYDATE%)

Thanks in advance,

Best Regards,

Venkat

former_member186338
Active Contributor
0 Kudos

Script logic is not necessary for the requirements you have!

Customization for the advances DM script will be:

Original:

PROMPT(SELECT,%SELECTION%,,"Select the members to CLEAR",%DIMS%,0)

PROMPT(RADIOBUTTON,%ENABLETASK%,"Do you want to clear comments associated with the data region?",1,{"Yes","No"},{"1","0"})

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"})

PROMPT(RADIOBUTTON,%CHECKJOUR%,"Exit the package if journal data encountered (no change will be committed)?",0,{"Yes","No"},{"1","0"})

INFO(%SELECTION_KEYDATE%,)

TASK(/CPMB/CLEAR_CUBE,CHECKLCK,%CHECKLCK%)

TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%)

TASK(/CPMB/CLEAR_CUBE,DUMPLOADMODE,3)

TASK(/CPMB/CLEAR_CUBE,KEYDATE,%SELECTION_KEYDATE%)

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,SELECTION,%SELECTION%)

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,ENABLETASK,%ENABLETASK%)

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKLCK,%CHECKLCK%)

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKJOUR,%CHECKJOUR%)

Custom:

PROMPT(SELECTINPUT,%SELECTION%,,"Select the desired data range:","%ENTITY_DIM%,%CATEGORY_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%,)

TASK(/CPMB/CLEAR_CUBE,CHECKLCK,%CHECKLCK%)

TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%)

TASK(/CPMB/CLEAR_CUBE,DUMPLOADMODE,3)

TASK(/CPMB/CLEAR_CUBE,KEYDATE,%SELECTION_KEYDATE%)

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,SELECTION,%SELECTION%)

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,ENABLETASK,1)

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKLCK,%CHECKLCK%)

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKJOUR,0)

Vadim

former_member186338
Active Contributor
0 Kudos

P.S. Even if you need to fix some dimensions to some specific members you still can customize advanced DM script...

Script logic is required if you need to have some complex user input. For example if you want to ask user to provide TIME members in the FROM - TO way...

And in script logic it's better to use *RUNALLOCATION *FACTOR=0... - faster!

Vadim

Former Member
0 Kudos

Ok,thanks again Vadim and one final question pls.

I have one fixed dimension for this Dimension "M_P" = should always be fixed to "M".

Could you pls. help how can I configure this in the "Advance Script" in Data Manager Package?

Thanks in advance,

Regards,

Venkat

former_member186338
Active Contributor
0 Kudos

Easy:

TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%DIMENSION:M_P|M|)

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,SELECTION,%SELECTION%DIMENSION:M_P|M|)

Or you can define variable using info:

INFO(%HARDCODEDDIM1%,DIMENSION:M_P|M|)

and then:

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

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

Vadim

Former Member
0 Kudos

Vadim,

Can you pls. test from your end as well once? When i tried with the below code, it is deleting both "M" as well as "P".

Please see my final code below

PROMPT(SELECTINPUT,,,,"%ENTITY_DIM%,%CATEGORY_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|)

TASK(/CPMB/CLEAR_CUBE,CHECKLCK,%CHECKLCK%)

TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%)

TASK(/CPMB/CLEAR_CUBE,DUMPLOADMODE,3)

TASK(/CPMB/CLEAR_CUBE,KEYDATE,%SELECTION_KEYDATE%)

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

My Testing includes;

1. POstings on both M and P

2. My DM selections for CLEAR

3. Report after CLEAR package run

Thanks in advance,

Regards,

Venkat

Former Member
0 Kudos

Vadim,

fyi, I logged off and logged in twice after making the changes to the advance script.

Regards,

Venkat

former_member186338
Active Contributor
0 Kudos

Please, show the screenshot of the dimension administration M_P to see both members!

And your final script is not correct, please use full version from my post. TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR... etc...

Vadim

P.S. Looks like none of my answers are useful...

former_member186338
Active Contributor
0 Kudos

No reason!

Former Member
0 Kudos

Hi Vadim,

Pls. see the screenshot below.

I will try by including the whole code now again.

Thanks and best Regards,

Venkat

former_member186338
Active Contributor
0 Kudos

Both M and P are base members?

Former Member
0 Kudos

Both are Base member Vadim

Former Member
0 Kudos

I included the whole code and tested but still has an issue. Please see the full screenshot of M_P dimension below.

former_member186338
Active Contributor
0 Kudos

"I included the whole code and tested but still has an issue" - please show the code you are testing...

Former Member
0 Kudos

This is the code which I included and tested.

PROMPT(SELECTINPUT,,,,"%ENTITY_DIM%,%CATEGORY_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|)

TASK(/CPMB/CLEAR_CUBE,CHECKLCK,%CHECKLCK%)

TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%)

TASK(/CPMB/CLEAR_CUBE,DUMPLOADMODE,3)

TASK(/CPMB/CLEAR_CUBE,KEYDATE,%SELECTION_KEYDATE%)

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

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

former_member186338
Active Contributor
0 Kudos

And the DM log screenshot of the test!

former_member186338
Active Contributor
0 Kudos

Do you see your mistake - only one line is corrected:

This one - is not corrected:

TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%)

Have to be:

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

Other lines missing:

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,ENABLETASK,1)

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKLCK,%CHECKLCK%)

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKJOUR,0)

Vadim

Former Member
0 Kudos

Please see the screen shot below

Details of the Log below:

/CPMB/MODIFY completed in 0 seconds

/CPMB/CLEAR_COMMENTS_FOR_CLEAR completed in 0 seconds

/CPMB/CLEAR_CUBE completed in 1 seconds

/CPMB/CLEAR completed in 0 seconds

[Selection]

--------------------------------------------------------------

SELECTION = /PYRAMID/MOH_DEP/PRIVATEPUBLICATIONS/09154255/TempFiles/FROM.TMP@@@SAVE@@@@@@EXPAND@@@|DIMENSION:LOCATION|8905|DIMENSION:TIME|2014.OCT|DIMENSION:VERSION|AOP2

CHECKLCK = Yes

[Message]

--------------------------------------------------------------

Task name CLEAR CUBE DATA:

Submit count: 2

Reject count: 0

model: MOH_DEP. Package status: SUCCESS

Former Member
0 Kudos

ah..ok, but I was thinking the lines highlighted above by you are associated with Comments and not to do anything with my requirement, Let me include and test the whole logic again,.

Thanks again for your support.

Regards,

Venkat

former_member186338
Active Contributor
0 Kudos

Test exactly this code:

PROMPT(SELECTINPUT,%SELECTION%,,"Select the desired data range:","%ENTITY_DIM%,%CATEGORY_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|)

TASK(/CPMB/CLEAR_CUBE,CHECKLCK,%CHECKLCK%)

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

TASK(/CPMB/CLEAR_CUBE,DUMPLOADMODE,3)

TASK(/CPMB/CLEAR_CUBE,KEYDATE,%SELECTION_KEYDATE%)

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

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,ENABLETASK,1)

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKLCK,%CHECKLCK%)

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKJOUR,0)

I have slightly changed the line:

INFO(%HARDCODEDDIM1%,|DIMENSION:M_P|M|) - "|" added in front of variable.

Vadim

Former Member
0 Kudos

Great Vadim!...I have tested with the old code and it is working perfect now. I will also try again with the New code in the previous post and test.

Thanks a lot for your Support.....

Best Regards,

Venkat

former_member186338
Active Contributor
0 Kudos

Please, close the discussion as required!

By the way, the code has to work without extra "|". Please read a long discussion:

Vadim

Former Member
0 Kudos

Ok, thanks a lot..It is working with out the extra "I". I have closed the post.

Thanks again for your Support.

Regards,

Venkat

Answers (2)

Answers (2)

former_member186338
Active Contributor
0 Kudos

P.S. And your Advanced DM script is absolutely not related to the script logic...

Please, clearly specify you requirements:

What do you want to be entered by user and what has to be fixed in the code! For ALL dimensions in the cube!

Vadim

Former Member
0 Kudos

Hi Vadim,

The requirement is the user wants to have a Script called when for "CLEARING" the data when we execute the "CLEAR" Package. Currently, we are selecting all the fields when we execute the "CLEAR" package. Th reason is to restrict other users is to restricting them from changing all the other Dimension members except for 3 Dimensions "Location", "Category and "Time" which has to be selected by the users. For e.g, I have  records in the data model.

Location   Category      Time        Asset    CostCenter     Cost Element  Currency  Signedata

India         AOP1      2015.JAN       1           NO_CC           NO_CE          INR       1000

India         AOP1      2015.JAN       5           12345              12345             INR       4000

India         AOP2      2015.JAN       2           NO_CC           NO_CE          INR       5000  

Ireland      AOP1      2015.JAN       2           NO_CC           NO_CE          EUR      2000

Users, when they execute the DM Package "CLEAR", they should be able to change "Location", "Category" and "Time" and the rest of the Dimensions should be "ALL"members based on the Prompts selections.

Fields to be entered by the Users are;

Location  -  India

Category -  AOP1

Time -  2015.JAN

The first 2 records from the above example should be cleared and rest has to remain.

I hope i have answered your question, If not, pls. let me know.

Regards,

Venkat

former_member186338
Active Contributor
0 Kudos

Then: my previous answer

former_member186338
Active Contributor
0 Kudos

Hi Venkat,

But in your script logic I can see only scope declaration statements - no data to be written! Have you missed a part of script?

Vadim