Work item text variable evaluation is character-like?

Kjetil Kilhavn kjetil.kilhavn at bluec.no
Fri Jul 6 10:53:06 EDT 2012


I've encountered a problem for which the only explanation I can come up with 
is that all variables evaluated in work item texts are evaluated as character-
like data.

The specific problem is that of telling the user (nicely) what the change in 
purchase order value is since the previous release.

I've identified correctly the previously released value. It is 8 000 NOK.
I've identified correctly the current net order value. It is 64 250 NOK.
I've identified correctly the absolute amount change: 56 250 NOK.

In the work item description I use the following section of code to display in 
a nice way how the net order value has changed:
IF &_WI_OBJECT_ID.ZLASTRELEASEAMOUNT& <> &_WI_OBJECT_ID.TOTALORDERVALUE&
The value has
IF &_WI_OBJECT_ID.ZLASTRELEASEAMOUNT& < &_WI_OBJECT_ID.TOTALORDERVALUE&
increased by
ELSE
been reduced by
ENDIF
&_WI_OBJECT_ID.ZRELEASEAMOUNTDIFF& &_WI_OBJECT_ID.CURRENCY& since the
previous release, and there can be other significant changes as well.
ELSE
The net order value has not changed since the previous release, but
there can be other significant changes.
ENDIF

This comes out as:
- - - Start of work item description - - - 
Purchase order <PO NUMBER> with order value 64.250,00 NOK will be ordered from 
<VENDOR> if it is released.

The purchase order has previously been released with order value 8.000,00 NOK 
by <ACTUAL RELEASE AGENT> on 07.10.2011.

The value has been reduced by 56.250,00 NOK since the previous release, and 
there can be other significant changes as well.

[…]
- - - End of work item description - - - 

The only way this can make sense to me is if the comparison is evaluated as 
IF '800000' < '6425000'. 
Evaluating the above character-like (8 > 6) would lead to the observed result.
Can anyone confirm or deny than my assumption is correct?
-- 
Kjetil Kilhavn (+47 40220607) - Blue Consulting AS (http://www.bluec.no)



More information about the SAP-WUG mailing list