title: Format time in ABAP, removing seconds
body: <p>I'd like to format a time (SY-TIMLO) to the user defined format in SU01. For US users, this often involves AM/PM. The easiest way I've found is:</p>
  
  <pre><code>lv_formatted_time = |{ lv_time TIME = USER }|
  </code></pre>
  
  <p>Is there an easy way to remove the seconds without the use of more extensive methods like the one below?</p>
  
  <pre><code>*-- Convert time to user time format based on environment setting.
  *-- As we are not using SET COUNTRY this has the same effect as
  *-- user settings in SU01 &gt; Defaults &gt; Time Format. US users will see AM/PM.
  
      CALL METHOD CL_ABAP_TIMEFM=&gt;CONV_TIME_INT_TO_EXT
        EXPORTING
          TIME_INT            = lv_time
          WITHOUT_SECONDS     = ABAP_TRUE
          FORMAT_ACCORDING_TO = CL_ABAP_TIMEFM=&gt;ENVIRONMENT
        IMPORTING
          TIME_EXT            = lv_formatted_time.
  </code></pre>