cancel
Showing results for 
Search instead for 
Did you mean: 

Static Dimension Selections for EPM Package Link

houtbyr
Explorer
0 Kudos

RE: BPC 10.0 NW

I'm trying to create a copy of the "CLEAR" DM package and adjust it slightly to specify a list of dimension members (for 1 dimension) so the users don't have to do it each time.

I've read in other posts (

e.g. https://archive.sap.com/discussions/thread/3820096) and know that you can specify a list of dimensions instead of %DIMS% and only those values will pass to the selection which means you should be able to append your own criteria at the end.

My PROMPT is as follows to include all but 1 dimensions in our model:

PROMPT(SELECTINPUT,%SELECTION%,,"Select the members to CLEAR","%ACCOUNT_DIM%,BUSINESS,%CATEGORY_DIM%,%CURRENCY_DIM%,%ENTITY_DIM%,FLOW,FUNCAREA,GROUPS,%INTCO_DIM%,%TIME_DIM%",0)

I also learned that for user created dimensions, you put just the name of the dimension without % and _DIM as shown above (BUSINESS, FLOW, FUNCAREA, GROUPS).

That left out the dimension DATASRC which I want to leave off of the selection screen and specify static values in the script; 14 individual values.

I've seen examples like below that seem to suggest that you can append additional criteria to the selection variable.

INFO(%SUFFIX%,DIMENSION:DATASRC|DATASOURCE1|)

TASK(/CPMB/CM_CONVERT,SELECTION,%SELECTION%%SUFFIX%)
-or-
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%%SUFFIX%)

Using those TASK commands seems to cause me DM Package Link errors:

Failed to analyze instruction /CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%
-and-
Failed to analyze instruction /CPMB/CM_CONVERT,SELECTION,"%SELECTION%%SUFFIX%"

I tried surrounding those variables with quotes and without much like how the PROMPT requires this but both ways failed.

Vadim suggested to make sure the DM package is using the

/CPMB/DEFAULT_FORMULAS chain, so I imagine these errors are more about what's available in the CLEAR package BW set-up for /CPMB/CLEAR. I'm not sure how to check/validate this.

https://archive.sap.com/discussions/thread/3582652

So, I tried to just append the criteria in the CLEAR tasks to avoid those TASK functions:

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

That also didn't work as it seemed like the SUFFIX criteria was ignored (cleared ALL datasources regardless of SUFFIX value).

I also played with the positions of the pipes (|) in the INFO line based on how the selection text was showing and where they should be; in the log, the selection list does not end with a pipe but tried it several ways:
  • INFO(%SUFFIX%,"DIMENSION:|DATASRC|DATASOURCE1|")
  • INFO(%SUFFIX%,"|DIMENSION:|DATASRC|DATASOURCE1")

Below is my (non-working) script (note commented lines) from some testing so far. For now, I'm just trying to get it to clear "DATASOURCE1" DATASRC values with the data intersections defined in the other selection fields I've provided in the dialog screen.

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

PROMPT(SELECTINPUT,%SELECTION%,,"Select the members to CLEAR","%ACCOUNT_DIM%,BUSINESS,%CATEGORY_DIM%,%CURRENCY_DIM%,%ENTITY_DIM%,FLOW,FUNCAREA,GROUPS,%INTCO_DIM%,%TIME_DIM%",0)

INFO(%SUFFIX%,"|DIMENSION:|DATASRC|DATASOURCE1")

'TASK(/CPMB/CM_CONVERT,SELECTION,%SELECTION%%SUFFIX%)

'TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%%SUFFIX%)

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

TASK(/CPMB/CLEAR_CUBE,CHECKLCK,1)

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

TASK(/CPMB/CLEAR_CUBE,DUMPLOADMODE,3)

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

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

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,ENABLETASK,0)

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKLCK,1)

TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKJOUR,1)

To be honest, I don't fully understand the technical details behind the scripting so the issue could be pretty obvious to others. Are the CM_CONVERT and DEFAULT_FORMULAS_LOGIC tasks supposed to concatenate the selection strings together and store them into %SELECTION%? Is there somewhere that explains this a little better?

Thanks, Rich

houtbyr
Explorer
0 Kudos

I was also referencing this old blog post trying to get this to work:

https://blogs.sap.com/2013/01/06/customize-the-standard-sap-bpc-packages/

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Instead of:

INFO(%SUFFIX%,"|DIMENSION:|DATASRC|DATASOURCE1")

use

INFO(%SUFFIX%,|DIMENSION:|DATASRC|DATASOURCE1)

" - to be removed!

former_member186338
Active Contributor
0 Kudos

P.S. And it's better to use real dimension names:

PROMPT(SELECTINPUT,%SELECTION%,,"Select the members to CLEAR","ACCOUNT,BUSINESS,CATEGORY,CURRENCY,ENTITY,FLOW,FUNCAREA,GROUPS,INTCO,TIME",0)
houtbyr
Explorer
0 Kudos

I removed the quotes that surrounded the SUFFIX value. I also addressed the dimensions using their actual names (not knowing any better before).

The script is still ignoring the SUFFIX and clearing data in ALL datasrc values instead of the single one specified. My script is now as follows.

PROMPT(SELECTINPUT,%SELECTION%,,"Select the members to CLEAR","ACCOUNT,BUSINESS,CATEGORY,CURRENCY,ENTITY,FLOW,FUNCAREA,GROUPS,INTCO,TIME",0)
INFO(%SUFFIX%,|DIMENSION:|DATASRC|BUS1_ELIM_STEP1)
TASK(/CPMB/CLEAR_CUBE,CHECKLCK,1)
TASK(/CPMB/CLEAR_CUBE,SELECTION,%SELECTION%%SUFFIX%)
TASK(/CPMB/CLEAR_CUBE,DUMPLOADMODE,3)
TASK(/CPMB/CLEAR_CUBE,KEYDATE,%SELECTION_KEYDATE%)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,SELECTION,%SELECTION%%SUFFIX%)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,ENABLETASK,0)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKLCK,1)
TASK(/CPMB/CLEAR_COMMENTS_FOR_CLEAR,CHECKJOUR,1)

BUS1_ELIM_STEP1 is the actual DATASRC member I'm trying to remove.

I've tried with the | leading and trailing the SUFFIX... also either having %SUFFIX% included or excluded from the TASK commands.

houtbyr
Explorer
0 Kudos

GOT IT!

I had an extra | in the SUFFIX after "DIMENSION".

Use:

INFO(%SUFFIX%,|DIMENSION:DATASRC|BUS1_ELIM_STEP1)

Not:

INFO(%SUFFIX%,|DIMENSION:|DATASRC|BUS1_ELIM_STEP1)

THANKS VADIM!!!!!

former_member186338
Active Contributor
0 Kudos

Actually the correct syntax is:

INFO(%SUFFIX%,|DIMENSION:DATASRC|BUS1_ELIM_STEP1)

houtbyr
Explorer

Yes, I originally posted the correction with the wrong | removed (by accident) and was hoping I edited my post before you saw it. You're too fast!! 😉

Thanks for all of your help Vadim. This stuff isn't very obvious and I've been struggling with this for several hours.

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

Please, provide the list of dimensions in your model!

houtbyr
Explorer
0 Kudos

FINANCE Model Dimensions:

  • ACCOUNT
  • BUSINESS
  • CATEGORY
  • CURRENCY
  • DATASRC
  • ENTITY
  • FLOW
  • FUNCAREA
  • GROUPS
  • INTCO
  • TIME