Ansicht
Dokumentation

ABENUTCLONG_DIFF - UTCLONG DIFF

ABENUTCLONG_DIFF - UTCLONG DIFF

Fill RESBD Structure from EBP Component Structure   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

- utclong_diff

... utclong_diff( high = time_stamp2
                  low  = time_stamp1 ) ...


Effect

This built-in function calculates the time difference between the values of two time stamp fields time_stamp2 and time_stamp1. The return value has the type decfloat34 and contains the exact difference in seconds rounded to seven decimal places. If the time stamp in time_stamp2 is later than the time stamp in time_stamp1, the result is positive. If the values are identical, the result is 0, otherwise it is negative.

Time stamp fields of the type utclong containing valid time stamps must be passed to the arguments high and low. time_stamp2 and time_stamp1 are time-stamp-like expression positions. An initial time stamp is handled like the smallest possible value of a time stamp.

Notes

  • The system class CL_ABAP_UTCLONG contains a method DIFF with multiple output parameters for days, hours, minutes, and seconds across which the time difference is spread instead of just one return parameter.
  • If the function utclong_diff is used as the right side of an assignment or other operand positions in which the return value is converted, the decimal places are converted in accordance with the general conversion rules for source field type decfloat34, if necessary, and are not cut off. If the decimal places are to be cut off, the built-in function trunc can be applied to the return value.

Example

Calculation of the time interval in microseconds of consecutive time stamps from an internal table.

Exceptions

Catchable Exceptions

CX_SY_CONVERSION_NO_DATE_TIME

  • Cause: A time stamp specified for high or low is invalid.
    Runtime Error: INVALID_UTCLONG

Non-Catchable Exceptions

  • Cause: An argument without a time stamp type is passed to high or low.
    Runtime Error: TCHK_TYPE_LOAD





TXBHW - Original Tax Base Amount in Local Currency   General Material Data  
This documentation is copyright by SAP AG.

Length: 3778 Date: 20240423 Time: 125943     sap01-206 ( 74 ms )