Code: Alles auswählen.
"prüfen, wie alt der Spoolauftrag ist
SPOOLTIME = TSP01-RQCRETIME(14).
SYTIME = SY-DATUM.
SYTIME+8 = SY-UZEIT.
CALL FUNCTION 'CCU_TIMESTAMP_DIFFERENCE' "
EXPORTING
TIMESTAMP1 = SYTIME " ccupeaka-timestamp
TIMESTAMP2 = SPOOLTIME " ccupeaka-timestamp
IMPORTING
DIFFERENCE = DIFFCHECK " i --> Differenz in Sekunden
. " CCU_TIMESTAMP_DIFFERENCE
Code: Alles auswählen.
CONVERT TIME STAMP time_stamp TIME ZONE tz
INTO [DATE dat]
[TIME tim] [DAYLIGHT SAVING TIME dst].
Code: Alles auswählen.
DATA: time_stamp TYPE timestamp.
GET TIME STAMP FIELD time_stamp.
Code: Alles auswählen.
REPORT Z_TEST.
DATA: DIFFCHECK TYPE I.
DATA: TIME_STAMP TYPE TIMESTAMP.
DATA: TIME_STAMP2 TYPE TIMESTAMP.
DATA: TIME1 LIKE CCUPEAKA-TIMESTAMP.
DATA: TIME2 LIKE CCUPEAKA-TIMESTAMP.
PARAMETERS: SEKUNDEN(10).
AT SELECTION-SCREEN. "Enter drücken zum aktualisieren
"Zeit des Reportstarts
IF TIME1 IS INITIAL.
GET TIME STAMP FIELD TIME_STAMP.
TIME1 = TIME_STAMP.
ENDIF.
"aktuelle Zeit
GET TIME STAMP FIELD TIME_STAMP2.
TIME2 = TIME_STAMP2.
"Differenz ermitteln
CALL FUNCTION 'CCU_TIMESTAMP_DIFFERENCE' "
EXPORTING
TIMESTAMP1 = TIME2 " ccupeaka-timestamp
TIMESTAMP2 = TIME1 " ccupeaka-timestamp
IMPORTING
DIFFERENCE = DIFFCHECK " i
. " CCU_TIMESTAMP_DIFFERENCE
SEKUNDEN = DIFFCHECK.