check_expiration

in src/zgoog_cl_content_repo_gcs.clas.abap [0:0]


  METHOD check_expiration.

    DATA: lv_len        TYPE i,
          lv_dummy      TYPE string ##NEEDED,
          lv_time       TYPE timestamp,
          lv_expiration TYPE timestamp.

    lv_len = strlen( iv_expiration ).
    IF NOT iv_expiration CO '0123456789' OR lv_len <> 14.
      MESSAGE e185(cms) WITH 'expiration' INTO lv_dummy.
      sys_error_set( ).
      gs_error-status_code = 401.
      EXIT.
    ENDIF.

    GET TIME STAMP FIELD lv_time.

    lv_expiration = iv_expiration.
    IF lv_expiration < lv_time.
      MESSAGE e184(cms) INTO lv_dummy.
      sys_error_set( ).
      gs_error-status_code = 401.
      EXIT.
    ENDIF.