Skip to Content
0
Former Member
Jun 26, 2009 at 09:30 AM

SSM7.0 - Logic to calculate scores

34 Views

Hi all,

I am trying to override a variable (KPI15_TARDEV) with a new score calculation by creating a logic (See below for example).

I need to store Actual (KPI15_ACT) and Target (KPI15_TAR) values in temp variables in order to calculate the new score.

The issue I have is that on the front-end user interface /browser the KPI Actual value gets overwritten with the incorrect score (value from KPI15_TARDEV) and the incorrect score is also displayed. The back-end/PAS shows the correct actual value. The Target value remains the same in the front-end and in PAS.

If I hardcode the actual and target values below (remove KPI15_ACT and KPI15_TAR) i.e.

ACT1 =9

TAR1 = 10

then the correct score is displayed and the KPI actual value is not overwritten on the front-end user interface. However I need to have the actual and target values stored in a temporary variable as these values are entered in via the Entry and approval process.

Could someone please assist? Thanks.

KPI15_TARDEV Logic example

u2026 create temp variables

scalar ACT1

scalar TAR1

scalar TEST

u2026 assign temp variables with values from KPI15_ACT and KPI15_TAR

ACT1 =KPI15_ACT

TAR1 = KPI15_TAR

u2026 calculate new scores

TEST

if ACT LT 0 AND TAR LT 0 AND ACT_ABS EQ TAR_ABS = ((ACT1)/(TAR1) *100 )

if ACT LT 0 AND TAR LT 0 AND ACT_ABS LT TAR_ABS = ((TAR1)/( ACT1) *100 )

u2026.

u2026 assign new scores to KPI15_TARDEV

KPI15_TARDEV

IF TEST LT 90 = 1

IF TEST GT 110 = 5

u2026