cancel
Showing results for 
Search instead for 
Did you mean: 

Copy Package with null as source

Former Member
0 Kudos

Hi,

I am on bpc 10 nw.

I have source data of [2010.Jan, 2010.Feb, 2010.Mar] = [null, 1,2] in Category = Actual.

And target data of [2010.Jan, 2010.Feb, 2010.Mar] = [100, 200, 300] in Category = Budget.

With the standard copy package,

if i copy from

[2010.Jan, 2010.Feb, 2010.Mar] in Actual -->

[2010.Jan, 2010.Feb, 2010.Mar] in Budget,

the end result becomes

[2010.Jan, 2010.Feb, 2010.Mar] = [0, 1, 2] in Category = Budget.

What parameter can i change in 'Modify Script' or 'Process Chain', such that source = null is ignored, while source = 0 is used?

So instead of the results becoming

[2010.Jan, 2010.Feb, 2010.Mar] = [0, 1, 2] in Category = Budget,

i want the results to be

[2010.Jan, 2010.Feb, 2010.Mar] = [100, 1, 2] in Category = Budget.

Thanks,

LC

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Hi Lip,

Have you tested "Merge data values" instead of "Replace and clear data values"?

Vadim

P.S. For sure script will also do the job.

Former Member
0 Kudos

Hi Vadim,

Yes i have, and blank cells (i.e. blank cells as in cells that hasn't been entered yet, not

+X -X = 0). And these blank cells when copied to target cells with values, are nullifying the values.

Or is this the normal behaviour of a standard copy package?

Thanks,

LipChean

former_member186338
Active Contributor
0 Kudos

Sorry, but do you understand what I am asking for:

"Have you tested "Merge data values" instead of "Replace and clear data values"?"

It's a DM package parameter...

Vadim

Former Member
0 Kudos

Hi Vadim,

Yes i have tested using "Merge data values".

Thanks,

LC

former_member186338
Active Contributor
0 Kudos

And?

Former Member
0 Kudos

Hi Vadim,

After selecting "Merge data values" to run the copy package, source = blank (i.e. not zero) is nullifying target with value.

I have added the DMP parameters below, my colleague said it might have been changed by another person who's since left. Can you help verify if all the parameters are standard?

Thanks,

LC

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",%DIMS%,0)

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

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

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

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

TASK(/CPMB/CLEAR_SOURCE_CUBE,SELECTION,%TOSELECTION%)

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

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,KEYDATE,%SELECTION_KEYDATE%)

former_member186338
Active Contributor
0 Kudos

Ups, tested myself! Standard copy package will always clear data!

Then script logic is the only option:

"Any idea on how to refer to %SELECTION% and do a N-to-N copy to %TOSELECTION%  in script logic?"

N-to-SAME N is not an issue - just the scope!

N-to-Different N - using FOR/NEXT (but I don't see this requirement in the sample)

Vadim

Former Member
0 Kudos

Hi Vadim,

Can you provide a simple guide for N to N different copying using %SELECTION% and %TOSELECTION% ?

Thanks

former_member200327
Active Contributor
0 Kudos

Hi LC,

Package script of delivered packages is stored in a template that users can't change. So, if you want to compare this script with delivered one just create a new Package based on same Process Chain and you'll see the original script.

Regards,

Gersh

Former Member
0 Kudos

Hi,

Does anyone have any suggestion for the script logic?

Thanks

former_member186338
Active Contributor
0 Kudos

But what's an issue?

Have you tried to write a simple script?

For example let's assume that for some dimension - TIME we have 2 variables containing source and target member lists:

%TLS% and %TLT%

Then:

*FOR %TS%=%TLS% AND %TT%=%TLT%

*XDIM_MEMBERSET TIME=%TS%

*WHEN TIME

*IS *

REC(EXPRESSION=%VALUE%, TIME=%TT%)

*ENDWHEN

*NEXT

Vadim

Former Member
0 Kudos

Hi Vadim,

Assuming i'm trying to copy the values from the yellow box to the green box, such that 1, 2, 3, 4, 5, 6 in the yellow box is also sent as 1, 2, 3, 4, 5, 6 in the green box.

I tried with the script logic below, but it's not working. Any suggestions?

Thanks,

LCS

*XDIM_MEMBERSET TIME = $FROM_TIME$
*XDIM_MEMBERSET ENTITY = $FROM_ENT$

*FOR %FE%=$FROM_ENT$ AND %TE%=$TO_ENT$
*FOR %FT%=$FROM_TIME$ AND %TT%=$TO_TIME$

*WHEN TIME
*IS *
  *REC(EXPRESSION=%VALUE%, ENTITY=%TE%,TIME=%TT%)
*ENDWHEN

*NEXT
*NEXT

*COMMIT

former_member186338
Active Contributor
0 Kudos

"I tried with the script logic below, but it's not working" - have you seen where I used:

*XDIM_MEMBERSET TIME=%TS%

in the script?

Vadim

And stop using absolutely useless COMMIT!

Former Member
0 Kudos

Hi Vadim,

I noticed your XDIM_MEMBERSET being inside the For loop, and i previously tried the following, but the logic still produces 21 in all the green cells.

Thanks,

LipChean

*FOR %FE%=$FROM_ENT$ AND %TE%=$TO_ENT$
*FOR %FT%=$FROM_TIME$ AND %TT%=$TO_TIME$

*XDIM_MEMBERSET TIME = $FROM_TIME$

*XDIM_MEMBERSET ENTITY = $FROM_ENT$

*WHEN TIME
*IS *
  *REC(EXPRESSION=%VALUE%, ENTITY=%TE%,TIME=%TT%)
*ENDWHEN

*NEXT
*NEXT

*COMMIT

former_member186338
Active Contributor
0 Kudos

Look once more on my code! In your case have to be (inside the inner loop):

*XDIM_MEMBERSET TIME = %FT%

*XDIM_MEMBERSET ENTITY = %FE%

And stop using absolutely useless COMMIT!

Vadim

Former Member
0 Kudos

Hi Vadim,

It's working now.

One last question, why did you say that *COMMIT is useless?

When is *COMMIT necessary?

Thanks

former_member186338
Active Contributor
0 Kudos

COMMIT is useful only for MDX syntax (without WHEN/ENDWHEN)

Vadim

Former Member
0 Kudos

Hi Vadim,

Noted with thanks.

Regards

Answers (3)

Answers (3)

damovand
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

Please explain what you mean by "[2010.Jan, 2010.Feb, 2010.Mar] = [null, 1,2] in Category = Actual" and "[2010.Jan, 2010.Feb, 2010.Mar] = [100, 200, 300] in Category = Budget".  Are you referring to values that you are selecting when prompted through DM package? Can you provide screen prints?

Regards,

Leila

former_member5472
Active Contributor
0 Kudos

Hi,

I think for this scenario, you may have to write  a script to do the copy. By default, script logic ignores records with zero values. So this will satisfy your requirement.

Prat

Former Member
0 Kudos

Hi,

Any idea on how to refer to %SELECTION% and do a N-to-N copy to %TOSELECTION%  in script logic?

Or are you referring to a calling of Badi within the script logic?

Thanks,

LC

Former Member
0 Kudos

Hi Lip Chean Soh,

Pls check the link below explaining how to customize standard BPC package, maybe useful for you.

Thanks.