Skip to Content

Static Dimension Selections for EPM Package Link

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 01 at 05:30 AM

    Instead of:

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

    use

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

    " - to be removed!

    Add comment
    10|10000 characters needed characters exceeded

    • 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.

  • Jan 31 at 09:18 PM

    Please, provide the list of dimensions in your model!

    Add comment
    10|10000 characters needed characters exceeded