Skip to Content

Custom copy package

Hi,

I am trying to create a custom copy package based on this blog:

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

My current code for the package is this:

PROMPT(COPYMOVEINPUT,%SELECTION%,%TOSELECTION%,"Please select target and destination period","%TIME_DIM%")
PROMPT(SELECTINPUT,%SELECTION2%,,"Please select organisation and planning-cycle","%ENTITY_DIM%,PLCYCLE")
INFO(%SUFFIX2%,DIMENSION:PLVERSION|PL_00|)
INFO(%SUFFIX3%,DIMENSION:RPTCURRENY|LC|)
INFO(%SUFFIX4%,DIMENSION:SCOPE|S_NONE|)
INFO(%SUFFIX5%,DIMENSION:VERSION|630|)
INFO(%TEMPNO1%,%INCREASENO%)
INFO(%ACTNO%,%INCREASENO%)
INFO(%SELECTION_KEYDATE%,)
TASK(/CPMB/CM_CONVERT,OUTPUTNO,%TEMPNO1%)
TASK(/CPMB/CM_CONVERT,ACT_FILE_NO,%ACTNO%)
TASK(/CPMB/CM_CONVERT,SAPPSET,%APPSET%)
TASK(/CPMB/CM_CONVERT,SAPP,%APP%)
TASK(/CPMB/CM_CONVERT,SELECTION,%SELECTION%%SELECTION2%%SUFFIX2%%SUFFIX3%%SUFFIX4%SUFFIX5%)
TASK(/CPMB/CM_CONVERT,TOSELECTION,%TOSELECTION%%SELECTION2%%SUFFIX2%%SUFFIX3%%SUFFIX4%SUFFIX5%)
TASK(/CPMB/CM_CONVERT,KEYDATE,%SELECTION_KEYDATE%)
TASK(/CPMB/CLEAR_SOURCE_CUBE,CHECKLCK,%CHECKLCK%)
TASK(/CPMB/CLEAR_SOURCE_CUBE,SELECTION,%TOSELECTION%%SELECTION2%%SUFFIX2%%SUFFIX3%%SUFFIX4%SUFFIX5%)
TASK(/CPMB/CLEAR_SOURCE_CUBE,KEYDATE,%SELECTION_KEYDATE%)
TASK(/CPMB/CLEAR_SOURCE_CUBE,DUMPLOADMODE,3)
TASK(/CPMB/APPEND_LOAD,PREPROCESSMODE,0)
TASK(/CPMB/APPEND_LOAD,TARGETMODE,0)
TASK(/CPMB/APPEND_LOAD,INPUTNO,%TEMPNO1%)
TASK(/CPMB/APPEND_LOAD,ACT_FILE_NO,%ACTNO%)
TASK(/CPMB/APPEND_LOAD,RUNLOGIC,1)
TASK(/CPMB/APPEND_LOAD,CHECKLCK,1)
TASK(/CPMB/APPEND_LOAD,KEYDATE,%SELECTION_KEYDATE%)

The idea is that the user selects an entity and planning cycle as well as a destination and target period. Certain other dimensions are fixed and for some dimensions data on all elements should be copied.

The two prompts seem to work but the summary I receive only shows the organisation and planning cycle. So the first question is, can I have the time also shown on the summary page?

The second question is about the extra dimensions. We have 13 dimensions in our model. I have 3 on prompt and 4 with one specific member each (INFO lines in the code). For all other dimensions I would expect BPC to copy data on all members, is that true?

Thanks,

Arnold

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Feb 14 at 12:45 PM

    Same method:

    PROMPT(COPYMOVEINPUT,%TIMESRC%,%TIMEDST%,"Please select target and destination period","%TIME_DIM%")
    PROMPT(SELECTINPUT,%SELECTION%,,"Please select organisation and planning-cycle","%ENTITY_DIM%,PLCYCLE")
    INFO(%SUFFIX2%,DIMENSION:PLVERSION|PL_00|)
    INFO(%SUFFIX3%,DIMENSION:RPTCURRENY|LC|)
    INFO(%SUFFIX4%,DIMENSION:SCOPE|S_NONE|)
    INFO(%SUFFIX5%,DIMENSION:VERSION|630|)
    INFO(%EQU%,=)
    INFO(%TAB%,;)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%%SUFFIX2%%SUFFIX3%%SUFFIX4%SUFFIX5%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,MEMBERSELECTION,TIMESRC%EQU%%TIMESRC%%TAB%TIMEDST%EQU%%TIMEDST%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPYSCRIPT.LGF)

    in COPYSCRIPT.LGF use:

    $TIMESRC$ and $TIMEDST$ variables...

    Instead of SUFFIXn you can fix members in the copy script...

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 14 at 12:10 PM

    And a follow on question. What if I wanted to copy data for a number of elements on the ACCOUNT dimension? Could I use a filter to select all accounts with ACCTYPE = AST and ACCTYPE = LEQ? Or would I have to hardcode a long list of accounts?

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 14 at 12:19 PM

    "can I have the time also shown on the summary page?" - no, not possible!

    "For all other dimensions I would expect BPC to copy data on all members, is that true?" - true!

    "Could I use a filter to select all accounts with ACCTYPE = AST and ACCTYPE = LEQ? Or would I have to hardcode a long list of accounts?"

    you can create a filter by property, but it will be user dependent (visible only for user who created this filter).

    In general you can copy using script logic, then you can define filter in script logic text!

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 14 at 12:25 PM

    Hi Vadim,

    thanks for the quick reply.

    If I were to use a logic script, how would I go about prompting the user for a source and destination period and then use the information in the script?

    Thanks,

    Arnold

    Add comment
    10|10000 characters needed characters exceeded