[ECC 6.0] Workflow fails at switch step when logistics invoice header text is 'R', but not when it is 'r' or 'Really strange'

Rick Bakker rbakker at gmail.com
Sat May 10 21:29:50 EDT 2008


Hello,

Were you able to replicate this problem in a simplified version of the
workflow and/or the object? Can you remember exactly which conditions
you had in the switch and what the data types of all the relevant
fields were?

I tried to replicate your error messages but all I achieved was having
the workflow consistently choose the wrong path - by not doing a
SWC_GET_PROPERTY SELF in the GET_PROPERTY of the virtual attribute.
I assume you thought of that.

Rick Bakker
Hanabi Technology

On 5/9/08, Kjetil Kilhavn <kjetil.kilhavn at bluec.no> wrote:
> Ready for the strangest problem I have ever encountered? I've actually given
> up this one, but it should be usable as weekend amusement I think.
>
> I've made a custom workflow for handling parked logistics invoices (don't need
> advice about how this is a bad idea - I know). Anyway, an issue came up for
> invoices for late payment interest (or Rente (either forsinkelsesrente or
> morarente) as it is called in Norway). Handling these invoices were a
> problem, so we needed to identify them and have a separate branch in the
> workflow.
>
> Simple solutions are the best often, so it was suggested that an R would be
> put in the header text instead of the normal <purchase order number>/<contact
> person> header text - or at least preceding it.
>
> Very well, I created a virtual attribute (boolean) to have something I could
> use in my conditions. This virtual attribute retrieves the header text, which
> had already been added as an attribute, and checks if the first non-space
> character is either 'R' or 'r'. If it is, my new attribute is set to X,
> otherwise cleared (set to space). So far all is well.
>
> I inserted a switch (expecting more special cases to come along) in the
> workflow. In the switch I check my attribute, and if it is X the outcome for
> late payment interest invoices is selected, otherwise the default outcome is
> selected. So far all is still well.
>
> The funny thing is, if I park an invoice where the header text is 'R' the
> virtual attribute seems to be set correctly when I test the BOR object type,
> but the workflow fails (status ERROR) with two error messages in the log:
> WL/821 (Work item nnn: Object FLOWITEM method EXECUTE can not be executed)
> SWP/103 (Error when starting a SWITCH branch)
>
> If, on the other hand, the header text is 'r' the virtual attribute seems to
> be set correctly, and the workflow functions as expected. If I have parked
> the invoice with header text 'R', I can later change it to e.g. 'Rente' and
> use transaction SWPR to kick the stopped workflow back into action.
>
> I would love to see an explanation for this behaviour, but I don't expect one.
>
> In a final act of desperation I substituted a condition for the switch, and
> that solved the problem - but I am still wondering why UPPER and lower case
> in a header text which was not referenced either in the switch or in the
> steps following the outcome would make a difference.
>
> Have a good weekend :-)
> --
> 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