Quantcast
Channel: SCN : Discussion List - SAP Planning and Consolidation, version for SAP NetWeaver
Viewing all articles
Browse latest Browse all 5414

IF statement in script logic compare values

$
0
0

HI We have 2 Input schedules one is sending to [COSTCENTER].[NOCOSCENTER],[DATATYPE].[PERCENT] and another one for few accounts (accounts are in both input Schedule bothe different cost center ID ) send data to the cost center entered in the Input Schedule on [DATATYPE].[PERCENT]


AFTER we need to run a loic with Package


We have actually this simple script logic :

/ /DATA in the PACKAGE

*XDIM_MEMBERSET VERSION = %VERSION_SET%

*XDIM_MEMBERSET COMPANY = %COMPANY_SET%

*XDIM_MEMBERSET TIME = %TIME_SET%

*XDIM_MEMBERSET COSTCENTER = %COSTCENTER_SET%


*FOR %KPI% = %TCOE_ACCTS% //  the %TCOE_ACCTS% comes from a *SELECT in an SELECT.LGF

*WHEN ACCOUNT *IS %KPI%


*REC(EXPRESSION = %VALUE% * ([COMPANY].[NOCOMPANY],[COSTCENTER].[NOCOSTCENTER],[DATASRC].[MAN_INPUT],[DATATYPE].[PERCENT],[FLOW].[F_CLO],[FUNCT_AREA].[NOFCTAREA],[INPCURRENCY].[NOCURRENCY],[INTERCO].[I_NONE],[RPTCURRENCY].[INPUT])/100, ACCOUNT = TCOE_%KPI%, DATASRC = AUTOCALC)


*ENDWHEN

*NEXT

*COMMIT


The user want the script compare values between [COSTCENTER].[NOCOSTCENTER], [DATATYPE].[PERCENT]  and [COSTCENTER].[DIFFERENT OF NOCOSTCENTER]  with [DATATYPE].[PERCENT] and do an IF statement.


IF [COSTCENTER]<> [NOCOSTCENTER],[DATATYPE].[PERCENT] contains value > 0 ( the value to check is the value in [DATATYPE].[PERCENT] > 0 take this PERCENTAGE if not take the PERCENTAGE in[COSTCENTER].[NOCOSTCENTER],[DATASRC].[MAN_INPUT],[DATATYPE].[PERCENT], The value in [COSTCENTER]<> [NOCOSTCENTER],[DATATYPE].[PERCENT] can be 0 or BLANK


I found this: http://scn.sap.com/thread/3547999

Do you have a recommendation? Do you have a better solution


Viewing all articles
Browse latest Browse all 5414

Trending Articles