Skip to Content
avatar image
Former Member

Script Logic - Copy

HELLO,

BPC 10.1NW

iam trying to copy data from 1 period to next 2 periods.Below is my script. I want to copy

2017.09 to 2017.10,2017.11 & 2017.12 to 2018.01,2018.02. When i run below script - 2018.01,2018.02 -data is getting copied from both 2017.09 & 2017.12. script works when i have only one member for time selection. with multiple members it gives incorrect results.

Time = 2017.09,2017.12

version - FORECAST

-----------------------------------------------------

*XDIM_MEMBERSET ACCOUNT = BAS(INVENTORY_FIFO)

*XDIM_MEMBERSET AUDIT_ID = IC_ALLOC_CALC

*XDIM_MEMBERSET TIME = %TIME_SET%

*XDIM_MEMBERSET VERSION = %VERSION_SET%

*WHEN ACCOUNT

*IS *

*FOR %TIM%=%TIME_SET%

*REC(FACTOR=1,TIME=TMVL(1,%TIM%))

*REC(FACTOR=1,TIME=TMVL(2,%TIM%))

*NEXT

*ENDWHEN

Thanks.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    May 18, 2017 at 03:25 AM

    Correct script would be -

    *XDIM_MEMBERSET ACCOUNT = BAS(INVENTORY_FIFO)
    *XDIM_MEMBERSET AUDIT_ID = IC_ALLOC_CALC
    *XDIM_MEMBERSET TIME = %TIME_SET%
    *XDIM_MEMBERSET VERSION = %VERSION_SET%

    *FOR %TIM%=%TIME_SET%
    *WHEN TIME
    *IS %TIM%
    *REC(FACTOR=1,TIME=TMVL(1,%TIM%))
    *REC(FACTOR=1,TIME=TMVL(2,%TIM%))
    *ENDWHEN
    *NEXT

    Add comment
    10|10000 characters needed characters exceeded

  • May 18, 2017 at 06:29 AM

    Ashish provided a correct script, but I have some extra questions:

    if you select 2 months:

    2017.09

    2017.10

    overwrite will happen. What values do you want to have as a result?

    Add comment
    10|10000 characters needed characters exceeded

  • May 24, 2017 at 06:51 AM

    MEGHANA,

    Can you use this code if it helps

    GANAPATHI

    Add comment
    10|10000 characters needed characters exceeded