Validation within custom method

Stephan Becker stephan.becker at london.com
Mon Oct 2 05:21:15 EDT 2000


make it easy on yourself and put a second step after the main method and make the user enter the date there.. a mega-simple screen will do.. with the "advance with dialog" flag on, the user won't even know in most cases it's two different tasks..
 
------Original Message------
From: "Schroeter, Brad" <BSchroeter at ti.com>
To: SAP-WUG at MITVMA.MIT.EDU
Sent: September 29, 2000 2:21:55 PM GMT
Subject: Re: Validation within custom method
 
 
Peter,
I would have gone that route but the transaction could be executed in change
mode multiple times before the Workflow process (at which time the date
entry may or may not be known) and I only want the field to be required
within one particular step of the Workflow process.
 
Thanks,
Brad
 
-----Original Message-----
From: Roehlen, Peter [mailto:PRoehlen at powercor.com.au]
Sent: Thursday, September 28, 2000 10:18 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Validation within custom method
 
 
Brad,
 
If it is a dialog method (ie SAP transaction call), then I'd suggest you
create a field exit (a couple of minutes work) to validate inside the
screen.  It's always better to catch the problem at the source.
 
Regards
 
Peter.
 
-----Original Message-----
From: Schroeter, Brad [mailto:BSchroeter at ti.com]
Sent: Friday, 29 September 2000 9:15 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Validation within custom method
 
 
 
Within a custom method I'm trying to validate that a user has made an entry
in a date field (it's not required by the transaction but we need for our
process).  I copied a SAP method and added some validation to have Workflow
keep calling the transaction until the user enters a date.
 
1) Is there a better way to do this without doing "wait up to x seconds" and
selecting from a database within the method?
 
2) If not, what's the best way to figure out the number of seconds in the
"wait" statement?  I just picked 5 and it works fine in our development
system, but I'm not sure if that will always be long enough to recognize a
database update in a production system.
 
-Brad
 
-----------------------------------------------------------------
 
while val_flag <> 'X'.
 
  call transaction 'CC32' and skip first screen.
 
* Wait for ECR table (AENR) to be updated.
  wait up to 5 seconds.
 
* Get ECR effectivity (valid from) date.
  select single datuv
      into valid_from_date
      from aenr
    where aennr = object-key-changenumber.
 
* If effectivity (valid from) date is blank, display error; otherwise
* set validation flag.
  if valid_from_date is initial.
    call function 'POPUP_TO_DISPLAY_TEXT'
       exporting
          titel              = 'Error'
          textline1       = 'Please enter effectivity (valid from) date'
          start_column = 13
          start_row       = 13
  else.
     val_flag = 'X'.
  endif.
 
endwhile.
 
**********************************************************************
Powercor Australia Ltd. This email and any file attachments are
confidential and intended solely for the use of the individual or
entity to whom they are addressed. If you have received this email in
error please tell us immediately by return email and delete the
document.
**********************************************************************
 
______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup
 


More information about the SAP-WUG mailing list