Validation within custom method

Schroeter, Brad BSchroeter at ti.com
Thu Sep 28 18:14:58 EDT 2000


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.
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20000928/f9100774/attachment.htm


More information about the SAP-WUG mailing list