Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Skip January Month every year in Script logic calculation

Hi Friends,

The script below should not work for January Month and should work for rest of the Months for all Years. Could you pls. help how can I achieve this.

When i run the Data Package for January, this piece of logic should not work and should work for rest of the Months.

// POST NET PERIODIC VALUE

*XDIM_MEMBERSET TIME=$TIM$

*XDIM_MEMBERSET LOCATION=BAS(%LOCATION_SET%)

*XDIM_MEMBERSET KIT=BAS(ALL_KIT)

*XDIM_MEMBERSET KEYFIGURE=REVAL,PPV,UY,FOREX

*XDIM_MEMBERSET VERSION=ACTUAL

*XDIM_MEMBERSET DATASRC=YTDVAR

*WHEN TIME

*IS *

*REC(EXPRESSION=%VALUE%,DATASRC=PERIODVAR)

*ENDWHEN

*COMMIT

Thanks in advance,

Regards,

Venkat

replied

Hello Venkat,

You can update your script as below (changes in bold)-

*WHEN TIME.MONTHNUM

*IS <> 1

*REC(EXPRESSION=%VALUE%,DATASRC=PERIODVAR)

*ENDWHEN

Alternatively,  you could also write the script as -

*WHEN TIME.PERIOD

*IS <> JAN

*REC(EXPRESSION=%VALUE%,DATASRC=PERIODVAR)

*ENDWHEN

The *When statements in the above 2 examples will ensure that *rec is executed only when month is not equal to January.

Regards,

Shelly Jain

1 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question