cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the sign of data while copying data using Copy data manager package?

0 Kudos

Hi all,

I have a strange requirement to flip the sign of the data while copying using COPY DM package.

An example is as follows: (pic attached)

We need a Copy reverse append functionality to be implemented 😞

We thought about copying first and then use script logic to change the sign but that option takes away the append functionality required.

Tried to implement a custom logic but not able to successfully pass "Selection" and "ToSelection" advanced script parameters to Custom BAdI script logic.

Please help.

Regards,

Surya Tamada

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

You can't change sign using copy package. Use script logic instead:

*XDIM_MEMBERSET ACCOUNT=SOURCE

*WHEN ACCOUNT

*IS *

*REC (EXPRESSION =-%VALUE%+[ACCOUNT].[DESTINATION], ACCOUNT = DESTINATION)

*ENDWHEN

"Tried to implement a custom logic but not able to successfully pass "Selection" and "ToSelection" advanced script parameters to Custom BAdI script logic." - strange statement! What do you mean by badi in this case? No badi required!

Answers (1)

Answers (1)

0 Kudos

Hi Vadim,

May be I did not articualte it good enough.

Client wants to select values from Source and copy it to destination but the sign to be flipped.

If I use your logic script code, how do I get the scoping for the destination or differentiate if from that of the source?

Now coming to my "Strange Statement" 🙂

I tried to achieve this by implementing Custom logic BAdI and struggling to pass "SELECTION" (source), "TOSELECTION" (destination) from advanced script to the BAdI using script logic.

Regards,

ST

former_member186338
Active Contributor
0 Kudos

Sorry, but looks like you still unable to provide a clear requirements. You have to explain what dimensions are fixed, what dimensions has to be selected for source and what for target.

Badi is absolutely strange idea - not related to this case. May be you need some basic bpc training.

0 Kudos

Hi Vadim,

Thank you very much for your comments. Sure I need some basic training.

Let me make another attempt to explain. Hopefully, I will be successful this time:

1. The client wants a way to copy data from a source to a destination using an interface similar to COPY data manager package. The user should be able to select dimension members by clicking on "add" button as mentioned in the picture above (see previous message).

2. As the COPY DM package does not allow reversing the sign of SIGNEDDATA before saving, I am trying to replicate similar interface using Advance Script of another DM package.

3. "selection" and "toselection" are the items I am using in advanced script of DM package to create the interface.

Client does not want to fix any values. It must be dynamic.

*XDIM_MEMBERSET ACCOUNT=SOURCE

*WHEN ACCOUNT

*IS *

*REC (EXPRESSION =-%VALUE%+[ACCOUNT].[DESTINATION], ACCOUNT = DESTINATION)

*ENDWHEN

In the code above, you mentioned "source" and "destination", I would like to scope them DYNAMICALLY. Could you please help me understand how to read data from the interface and scope DYNAMICALLY?

Let me know if you need more information. Thank you very much for your time.

Kind Regards,

Surya Tamada

former_member186338
Active Contributor

From my own experience copy from any to any is never used in the real business processes 🙂 You have to talk again with your client!

In the real life the requirements are like:

Some dimension members are hard coded (fixed in script logic).

Some dimension members are equal for the source and destination, but selectable by user: ex.: TIME

Some dimensions require source member and target member selectable by user.

This scenario can be achieved using script logic and the statements in advanced script like:

For "same":

PROMPT(SELECTINPUT,%SELECTION%,,"Select DIM2, DIM3:","DIM2,DIM3")

and passed as:

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

and used in script as:

%DIM2_SET%, %DIM3_SET%

For different source and target (for each dimension):

PROMPT(COPYMOVEINPUT,%DIM1SOURCE%,%DIM1TARGET%,"Select the members of DIM1 to COPY and where to",DIM1,0)

and passed as:

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,MEMBERSELECTION,DIM1SOURCE%EQU%%DIM1SOURCE%%TAB%DIM1TARGET%EQU%%DIM1TARGET%)

and used in script as:

$DIM1SOURCE$, $DIM1TARGET$

0 Kudos

Fully agree with you, Vadim.

We have been trying to explain the same thing to the client over various conversations. Hopefully your comments will help them appreciate it further.

Regards,

ST

former_member186338
Active Contributor
0 Kudos

Using badi or custom chain with z class for this task is overkill (ABAP maintenance is not so simple)! Try to analyze business process first.