on 2021 May 03 11:15 AM
Hi Experts,
I'm facing a business issue and I'd like to know if it's possible to make it through script logic :
Below the requirement :
I'd like to copy one contract from one category to multiple category and same contract, for example :
L1500054, CAT1 copy to CAT_MATIS1_L1500054,L1500054 - 500
L1500054, CAT1 copy to CAT_MATIS4_L1500054,L1500054 - 500
I tried to create in CATEGORY dimension a property that I called Contract and wrote the script like that :
*SELECT(%CON%, ID, CONTRACT, ID = %CONTRACT_SET%)
*SELECT(%CAT_DEST%, ID, CATEGORY, CONTRACT = %CON% AND STATUS = IN_PROGRESSION)
*XDIM_MEMBERSET CATEGORY = CAT1
*XDIM_MEMBERSET CONTRACT = %CONTRACT_SET%
*XDIM_MEMBERSET TIME = %TIME_SET%
*FOR %CAT_DESTINATION% = %CAT_DEST%
*WHEN CONTRACT
*IS *
*REC(FACTOR = 1, CAT = %CAT_DESTINATION% )
*ENDWHEN
*NEXT
When I execute the script via a package, I select the TIME and let the CONTRACT dimension on <ALL>
The script seems to work correctly but it writes on all the others category that have a Contract property different from the source, for example :
L1500054,CAT1 copy to CAT_MATIS1_L1500054,L1500054
L1500054,CAT1 copy to CAT_MATIS2_L1500013,L1500013
... and so on
According to you, do you think we can achieve this requirement via a script logic ?
Kindly regards.
Request clarification before answering.
You have to create properties like CATEGORY1, CATEGORY2 ... in CONTRACT dimension and fill it with appropriate category ID.
Then in WHEN/ENDWHEN:
*REC(FACTOR = 1, CATEGORY=CONTRACT.CATEGORY1
*REC(FACTOR = 1, CATEGORY=CONTRACT.CATEGORY2
...
Actually you can have multiple when/endwhen and before each you can select only contracts with non-empty property CATEGORYx
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
11 | |
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.