on 11-20-2017 1:54 PM
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
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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$
User | Count |
---|---|
14 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.