cancel
Showing results for 
Search instead for 
Did you mean: 

Customize COPY Package

former_member254616
Participant
0 Kudos

Hi All,

I am trying to customize the standard Package of COPY to limit with only few selections for user inputs and others to be Hardcoded but I am facing an issue. I have been following the link below to customize and my requirement is slightly different from the thread below

My Requirement is;

1. User should be able to select TIME for both "SOURCE" and "DESTINATION"

2. User should be able to only select ENTITY for "SOURCE" and Destination should be same. Destination should be hardcoded.

Please see my code below;

PROMPT(RADIOBUTTON,%TARGETMODE%,"Handling of records",0,{"Copy records with match key","Copy by replacing data in same data region of Entity, Category, Time and Audit ID"},{"0","2"})

PROMPT(RADIOBUTTON,%RUNLOGIC%,"Select whether to run default logic for stored values after copying",0,{"Yes","No"},{"1","0"})

PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when importing data.",1,{"Yes, check for work status settings before importing","No, do not check work status settings"},{"1","0"})

PROMPT(COPYMOVEINPUT,%SELECTION%,%TOSELECTION%,"Select the members to COPY and where to",%ENTITY_DIM%,%TIME_DIM%,0)

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

INFO(%SUFFIX1%,DIMENSION:CURRENCY|USD|)

INFO(%SUFFIX2%,DIMENSION:DATASRC|INPUT|)

INFO(%SUFFIX3%,DIMENSION:KEYFIGURE|FOR_PL|)

INFO(%SUFFIX4%,DIMENSION:KEYFIGURE|INV_PL|)

INFO(%SUFFIX5%,DIMENSION:KEYFIGURE|REV_PL|)

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%%SUFFIX1%%SUFFIX2%%SUFFIX3%%SUFFIX4%%SUFFIX5%)

TASK(/CPMB/CM_CONVERT,TOSELECTION,%TOSELECTION%%SUFFIX1%%SUFFIX2%%SUFFIX3%%SUFFIX4%%SUFFIX5%)

TASK(/CPMB/CM_CONVERT,CLEARDATA,%CLEARDATA%)

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

TASK(/CPMB/CLEAR_SOURCE_CUBE,SELECTION,%TOSELECTION%%SUFFIX1%%SUFFIX2%%SUFFIX3%%SUFFIX4%%SUFFIX5%)

TASK(/CPMB/APPEND_LOAD,INPUTNO,%TEMPNO1%)

TASK(/CPMB/APPEND_LOAD,ACT_FILE_NO,%ACTNO%)

TASK(/CPMB/APPEND_LOAD,RUNLOGIC,%RUNLOGIC%)

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

TASK(/CPMB/APPEND_LOAD,CLEARDATA,%CLEARDATA%)

TASK(/CPMB/APPEND_LOAD,RUNLOGIC,0)

TASK(/CPMB/APPEND_LOAD,CHECKLCK,0)

TASK(/CPMB/APPEND_LOAD,CLEARDATA,0)

Can you please help?

Thanks and Best Regards,

Venkat

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

And as alternative to fully meet your requirements you can copy data using script logic. In this case you will be able to:

1. User should be able to select TIME for both "SOURCE" and "DESTINATION"

2. User should be able to only select ENTITY for "SOURCE" and Destination should be same. Destination should be hardcoded.

Vadim

former_member186338
Active Contributor
0 Kudos

Please read my answers here:

former_member254616
Participant
0 Kudos

Hi Vadim,

Thanks a lot for your prompt reply. sorry was on holiday on so could not reply. As you have said, I have 2 options;

1. Change in the DM Package advanced script: From the screen shot below, would it be possible to remove the destination for Location? or would it be possible to just display as "SAME". Basically user should not be able to "SELECT" the destination field for "LOCATION". I can not use a COMBO BOX because I have many values.

PROMPT(RADIOBUTTON,%TARGETMODE%,"Handling of records",0,{"Copy records with match key","Copy by replacing data in same data region of Entity, Category, Time and Audit ID"},{"0","2"})

PROMPT(RADIOBUTTON,%RUNLOGIC%,"Select whether to run default logic for stored values after copying",0,{"Yes","No"},{"1","0"})

PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when importing data.",1,{"Yes, check for work status settings before importing","No, do not check work status settings"},{"1","0"})

PROMPT(COPYMOVEINPUT,%SELECTION%,%TOSELECTION%,"Select the members to COPY and where to","%TIME_DIM%,%ENTITY_DIM%")

INFO(%SUFFIX1%,DIMENSION:CURRENCY|USD|)

INFO(%SUFFIX2%,DIMENSION:DATASRC|INPUT|)

INFO(%SUFFIX3%,DIMENSION:KEYFIGURE|FOREX_PL,INV_IMP_PL,REVAL_PL,UY_PL,PPV_BROK_PL,PPV_DUYT_PL,PPV_FREIGHT_PL,PPV_MAT_PL,PPV_ROYAL_PL|)

INFO(%SUFFIX4%,DIMENSION:VERSION|A100|)

INFO(%TEMPNO1%,%INCREASENO%)

INFO(%ACTNO%,%INCREASENO%)

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%%SUFFIX1%%SUFFIX2%%SUFFIX3%%SUFFIX4%)

TASK(/CPMB/CM_CONVERT,TOSELECTION,%TOSELECTION%%SUFFIX1%%SUFFIX2%%SUFFIX3%%SUFFIX4%)

TASK(/CPMB/CM_CONVERT,CLEARDATA,%CLEARDATA%)

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

TASK(/CPMB/CLEAR_SOURCE_CUBE,SELECTION,%SELECTION%%SUFFIX1%%SUFFIX2%%SUFFIX3%%SUFFIX4%)

TASK(/CPMB/APPEND_LOAD,INPUTNO,%TEMPNO1%)

TASK(/CPMB/APPEND_LOAD,ACT_FILE_NO,%ACTNO%)

‘TASK(/CPMB/APPEND_LOAD,RUNLOGIC,%RUNLOGIC%)

‘TASK(/CPMB/APPEND_LOAD,CHECKLCK,%CHECKLCK%)

‘TASK(/CPMB/APPEND_LOAD,CLEARDATA,%CLEARDATA%)

TASK(/CPMB/APPEND_LOAD,RUNLOGIC,1)

TASK(/CPMB/APPEND_LOAD,CHECKLCK,1)

TASK(/CPMB/APPEND_LOAD,CLEARDATA,0)

2. Using script logic : Please see my script logic below;

*XDIM_MEMBERSET KEYFIGURE=FOREX,REVAL

*XDIM_MEMBERSET CURRENCY=USD

*XDIM_MEMBERSET LOCATION=BAS(%LOCATION_SET%)

*XDIM_MEMBERSET VERSION=ACTUAL

*XDIM_MEMBERSET DATASRC=INPUT

*XDIM_MEMBERSET TIME=BAS(%TIME_SET%)

*WHEN TIME

*IS *

*REC(EXPRESSION=%VALUE%,TIME=%TIME_SET%)

*ENDWHEN


Can you please help me with the DM Advance script? I have

PROMPT(SELECTINPUT,%SELECTION%,,"Select Target TIME","%TIME_DIM%")

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%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPY.LGF)

Thanks and Best Regards,

VRR


former_member186338
Active Contributor
0 Kudos

1. "I can not use a COMBO BOX because I have many values." - then no way!

2. Script option:

PROMPT(COPYMOVEINPUT,%SOURCETIME%,%TARGETTIME%,"Select the TIME members from to","%TIME_DIM%")

PROMPT(SELECTINPUT,%SELECTION%,,"Select Target Entity","%ENTITY_DIM%")

INFO(%EQU%,=)

INFO(%TAB%,;)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,MEMBERSELECTION,SOURCETIME%EQU%%SOURCETIME%%TAB%TARGETTIME%EQU%%TARGETTIME%)

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%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPY.LGF)

*XDIM_MEMBERSET KEYFIGURE=FOREX,REVAL

*XDIM_MEMBERSET CURRENCY=USD

*XDIM_MEMBERSET LOCATION=%LOCATION_SET%

*XDIM_MEMBERSET VERSION=ACTUAL

*XDIM_MEMBERSET DATASRC=INPUT

*XDIM_MEMBERSET TIME=$SOURCETIME$

*WHEN TIME

*IS *

*REC(EXPRESSION=%VALUE%,TIME=$TARGETTIME$)

*ENDWHEN

Vadim

former_member254616
Participant
0 Kudos

Hi Vadim,

Thanks again for your support. Changes done as above but I can see an error in the DM package. Can you please help?

Also, in the "RUN" screen I can only see Location and not the Time. Would it be possible to Include "TIME" as well pls so that users can check the selections before executing the package?

Thanks a lot

Vrr

former_member254616
Participant
0 Kudos

Hi Vadim,

Apologies. I haven't updated the script before. Had done it now, It's working like a charm. Thanks a lot. Also, if possible, can you please help on the "Run" screen setting? It is only showing "Location" and not "TIME"

Thanks a lot again for your support.

Best Regards,

Vrr

former_member186338
Active Contributor
0 Kudos

"It is only showing "Location" and not "TIME"" - this is the standard behavior of DM package, you can't do anything with it! The SELECTION is shown...

Vadim

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

"2. User should be able to only select ENTITY for "SOURCE" and Destination should be same. Destination should be hardcoded." - what do you mean by "Destination should be hardcoded" here?

former_member186338
Active Contributor
0 Kudos

P.S. Incorrect:

INFO(%SUFFIX3%,DIMENSION:KEYFIGURE|FOR_PL|)

INFO(%SUFFIX4%,DIMENSION:KEYFIGURE|INV_PL|)

INFO(%SUFFIX5%,DIMENSION:KEYFIGURE|REV_PL|)

Has to be:

INFO(%SUFFIX3%,DIMENSION:KEYFIGURE|FOR_PL,INV_PL,REV_PL|)

former_member186338
Active Contributor
0 Kudos

For source ENTITY member selection you can use only PROMPT(COMBOBOX... with fixed list of members to combine the result with TIME selection in PROMPT(COPYMOVEINPUT...

Vadim