Trapping errors in WI description

Dart, Jocelyn jocelyn.dart at sap.com
Tue Oct 19 21:05:06 EDT 2004


Nothing fishy at all, Mike.
Any chance the attribute you were testing was not a pure character type - say type N, where initial = 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 something
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 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 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 the
> text.
>
> So, methinks this is easy with a couple lines of sapscript. None of these
> worked:
> 1: if not ( &Attrib& is initial )
> 2: if &Attrib& CS '_WI_OBJECT'
> 3: if &Attrib& = '< _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 utterly
> confused.
>
> Can someone recommend a good way of checking for failed attributes/missing
> 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