Trapping errors in WI description

Michael Pokraka workflow at quirky.me.uk
Tue Oct 19 05:16:23 EDT 2004


Hi Jocelyn,
That's pretty much what I thought, but the results are inconsitent. It DO=
ES
contain something greater than 9 and less than A.... sounds like somethin=
g
starting with a '<' will fit the bill. However checking for it directly w=
ill
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 interesting
though:
 
if &Blah& is initial    " ***** DOES NOT WORK
if &Blah& <> ''         " ***** WORKS!
 
I'm no SapScript expert, but there does seem to be something fishy going =
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 displayed=
 if
> the attribute is empty.
> So perhaps better to look for &Attrib& is initial - however even this i=
s not
> failsafe.
> Why not create a virtual attribute DBXXXX_found "flag" that checks at l=
east
> 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, i=
n
> order to avoid having '< _WI_OBJECT_ID.BLAH not found>' appearing in th=
e
> text.
>
> So, methinks this is easy with a couple lines of sapscript. None of the=
se
> 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 res=
ult.
> 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 utter=
ly
> confused.
>
> Can someone recommend a good way of checking for failed attributes/miss=
ing
> 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