on 2015 Jul 15 11:46 AM
Hi All,
I am trying to copy the plants based sale for planning into
a dummy plant, using a logic script as below,
Please find code below; Suggest the changes to get this execute.
*XDIM_MEMBERSET CATEGORY = 010
*XDIM_MEMBERSET ACCOUNT = ZNETQT_B
*XDIM_MEMBERSET INPUTCURRENCY = INR
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET PLAN_ITEM = 001
// *XDIM_MEMBERSET PLANT = %PLANT_SET%
//*XDIM_MEMBERSET PLANT = NATIONAL
*SELECT(%ACCSET%,"[ID]",PLANT,"[CALC]
= 'N'")
*XDIM_MEMBERSET PLANT
= %ACCSET%
*FOR %Q% = PLANT
*WHEN PLAN_ITEM
*IS
001
*WHEN PLANT
*IS *
*REC(FACTOR
= 1, PLANT = “NATIONAL”)
*ENDWHEN
*ENDWHEN
*NEXT
*COMMIT
Request clarification before answering.
Hi Manish,
What I understood from your reuirement is that you need to copy the data from all plants to a DUMMY plant.
I don't see a need of FOR loop in your script logic.
Please remove *FOR and *NEXT line from the code and try to run it.
Regards,
Ankur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manish,
Please explain the calculation logic:
*SELECT(%ACCSET%,"[ID]",PLANT,"[CALC]= 'N'")
will select all base PLANT's, including NATIONAL!
*REC(FACTOR= 1, PLANT = “NATIONAL”)???
If you want to copy all plants except NATIONAL to NATIONAL then:
*SELECT(%ACCSET%,"[ID]",PLANT,"[CALC]='N' AND [ID]<>'NATIONAL'")
*XDIM_MEMBERSET CATEGORY = 010
*XDIM_MEMBERSET ACCOUNT = ZNETQT_B
*XDIM_MEMBERSET INPUTCURRENCY = INR
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET PLAN_ITEM = 001
*XDIM_MEMBERSET PLANT= %ACCSET%
*WHEN PLANT
*IS *
*REC(FACTOR=1, PLANT=“NATIONAL”)
*ENDWHEN
Vadim
P.S. I have removed useless FOR/NEXT loop, useless PLAN_ITEM loop and absolutely useless COMMIT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 41 | |
| 9 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.