Trapping errors in WI description

Michael Pokraka workflow at quirky.me.uk
Wed Oct 20 04:51:46 EDT 2004


Hi Jocelyn,
No, both cases tested against char (QM Task code & task code description,
QMSM-MNCOD & QPCT-KURZTEXT). The text attribute was the one that failes i=
f
the code was blank. So I checked against an empty code, which now works.
 
Still, the difference in "not ... is initial" vs "<> ''" bothers me
slightly.... but it was yet another interesting foray into the quirky dep=
ths
of SAP.
 
Thanks for your input as usual,
Cheers
Mike
 
 
Dart, Jocelyn wrote:
> Nothing fishy at all, Mike.
> Any chance the attribute you were testing was not a pure character type=
 -
> say type N, where initial =3D all zeroes?
> But again - direct test of the value is not the best way to solve your
> problem.
> Jocelyn
>
> -----Original Message-----
>> From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]
> Sent: Tuesday,19 October 2004 7:16 PM
> To: SAP-WUG at MITVMA.MIT.EDU
> Subject: Re: Trapping errors in WI description
>
> Hi Jocelyn,
> That's pretty much what I thought, but the results are inconsitent. It =
DOES
> contain something greater than 9 and less than A.... sounds like someth=
ing
> starting with a '<' will fit the bill. However checking for it directly=
 will
> not work. Checking ... <> '' doesn't work. Checking initial definitely
> fails.
>
> Admittedly this is academic as I've gone with your approach by checking
> whether a related attribute is blank. I did notice something interestin=
g
> though:
>
> if &Blah& is initial    " ***** DOES NOT WORK
> if &Blah& <> ''         " ***** WORKS!
>
> I'm no SapScript expert, but there does seem to be something fishy goin=
g
> on....
>
> Thanks for your input,
> Cheers
> Mike
>
>
> Dart, Jocelyn wrote:
>> Hi Mike,
>> &Attrib& will look at the contents of the attribute.
>> The contents is not <WI_OBJECT_ID...> - that's just what gets displaye=
d if
>> the attribute is empty.
>> So perhaps better to look for &Attrib& is initial - however even this =
is
>> not
>> failsafe.
>> Why not create a virtual attribute DBXXXX_found "flag" that checks at
>> least
>> one of the database attributes returns a value
>> and use that.
>>
>> Regards,
>> Jocelyn
>>
>> -----Original Message-----
>>> From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf Of
>> Michael Pokraka
>> Sent: Tuesday,19 October 2004 1:58 AM
>> To: SAP-WUG at MITVMA.MIT.EDU
>> Subject: Trapping errors in WI description
>>
>> G'day all,
>> I've discrovered some slightly inconsistent behaviour on our 6.20/4.7
>> system.
>>
>> I'm trying to determine if a DB table attribute fails in the WI text, =
in
>> order to avoid having '< _WI_OBJECT_ID.BLAH not found>' appearing in t=
he
>> text.
>>
>> So, methinks this is easy with a couple lines of sapscript. None of th=
ese
>> worked:
>> 1: if not ( &Attrib& is initial )
>> 2: if &Attrib& CS '_WI_OBJECT'
>> 3: if &Attrib& =3D '< _WI.... (full text pasted in)'
>>
>> Even more strange - if I reverse 2 above to 'if not (...', the same
>> result.
>> So I think there's something weird about when it generates the message=
.
>> Just
>> for fun I tried:
>> if &Attribute& > 'A'
>> and it worked, both with a valid and errored field value. Now I'm utte=
rly
>> confused.
>>
>> Can someone recommend a good way of checking for failed attributes/mis=
sing
>> elements? I want to avoid editing the object as the table attribute is
>> from
>> the SAP standard supertype.
>>
>> Any thoughts welcome,
>> Cheers
>> Mike
>>
>>
>
>
 


More information about the SAP-WUG mailing list