Work item text variable evaluation is character-like?

Mike Pokraka wug at workflowconnections.com
Wed Jul 11 04:44:48 EDT 2012


Hi Kjetil,

Interesting. I dont' have the time to test this myself, but it may be
relevant that the WI text generation and code execution is all in the
SapScript engine which has zip to do with workflow and is considerably
more ancient.

Have you tried playing around with different data types? Maybe an
intermediate 'local' container element of a similarly ancient data type
such as P might work? Or just the fact of placing an intermediate element
there will do the trick.

Cheers,
Mike


On Fri, July 6, 2012 3:53 pm, Kjetil Kilhavn wrote:
> 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)
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>




More information about the SAP-WUG mailing list