Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Processing External Data →  ABAP Database Access →  ABAP SQL →  ABAP SQL - Operands and Expressions →  ABAP SQL - SQL Expressions sql_exp →  sql_exp - sql_func →  ABAP SQL - Built-In Functions sql_func →  ABAP SQL - Special Functions →  ABAP SQL - Date Functions and Time Functions 

sql_exp - Time Functions

Other versions: 7.31 | 7.40 | 7.54


... TIMS_IS_VALID( time ) ...


1. ... TIMS_IS_VALID( time )


These SQL functions perform operations with arguments of the built-in data type TIMS. The arguments of the functions are specified as a comma-separated list in parentheses. A blank must be placed after the opening parenthesis and before the closing parenthesis. SQL expressions of matching data types can be specified as actual parameters. If an actual parameter contains the null value, every function except TIMS_IS_VALID returns a null value.

Variant 1

... TIMS_IS_VALID( time )


The function TIMS_IS_VALID determines whether time (if specified) contains a valid time in the format HHMMSS. The actual parameter must have the built-in data type TIMS. The result has the data type INT4. A valid time produces the value 1 and all other input values (including the null value) produce the value 0.


When used, this function requires the strict mode from Release 7.53.


Applies the time function to a time column of the database table DEMO_EXPRESSIONS. The program DEMO_SQL_TIME_FUNCTIONS executes this access to the table and represents the result.

DATA(time1) = sy-timlo. 


DELETE FROM demo_expressions. 
INSERT demo_expressions FROM @( VALUE #( 
  id      = 'X' 
  tims1 = time1 ) ). 

       FROM demo_expressions 
       FIELDS tims1 AS time1, 
              tims_is_valid( tims1 ) AS valid1 
       INTO @DATA(result).