Code: Alles auswählen.
SELECT timestamp proxy_name short_text ifname FROM srt_util_errlog INTO (wa_tab-timestamp, wa_tab-proxy_name,
wa_tab-short_text, wa_tab-ifname)
WHERE proxy_name = l_param
AND expire BETWEEN l_date AND l_datbis.
APPEND wa_tab TO it_tab.
CLEAR wa_tab.
ENDSELECT.
LOOP AT it_tab INTO wa_tab.
CALL FUNCTION 'CIF_GEN4_CONVERT_TIMESTAMP' "
EXPORTING
IV_TIMESTAMP = WA_TAB-timestamp
IV_TIMEZONE = 'CET'
IMPORTING
ev_date = sy-datum " sy-datum
ev_time = sy-uzeit " sy-uzeit
EXCEPTIONS
TIME_CONVERSION_FAILED = 1. "
IF wa_tab-ifname IS INITIAL.
WRITE:/ wa_tab-timestamp UNDER 'Timestamp',
wa_tab-proxy_name UNDER 'Proxyname',
wa_tab-short_text UNDER 'Text',
'Kein Angabe' UNDER 'Interface'.
ELSE.
WRITE:/ wa_tab-timestamp UNDER 'Timestamp',
* wa_tab-proxy_name UNDER 'Proxyname',
wa_tab-short_text UNDER 'Text',
wa_tab-ifname UNDER 'Interface'.
ENDIF.
* ENDIF.
ENDLOOP.
Code: Alles auswählen.
LOOP AT it_tab INTO wa_tab.
CALL FUNCTION 'CIF_GEN4_CONVERT_TIMESTAMP' "
EXPORTING
IV_TIMESTAMP = WA_TAB-timestamp
IV_TIMEZONE = 'CET'
IMPORTING
ev_date = sy-datum " sy-datum
ev_time = sy-uzeit " sy-uzeit
EXCEPTIONS
TIME_CONVERSION_FAILED = 1. "
a_char1 = wa_tab-timestamp.
TRANSLATE a_char1 USING ''.
CONDENSE a_char1 NO-GAPS.
CONCATENATE a_char1+0(4) a_char1+4(2) a_char1+6(2) INTO l_datfeld. " SEPARATED BY '.'.
CONCATENATE a_char1+8(2) a_char1+10(2) a_char1+12(2) INTO l_timefeld SEPARATED BY ':'.
IF l_datfeld BETWEEN l_change AND sy-datum.
IF wa_tab-ifname IS INITIAL.
WRITE:/ l_datfeld UNDER 'Datum',
l_timefeld UNDER 'Zeit',
wa_tab-proxy_name UNDER 'Proxyname',
wa_tab-short_text UNDER 'Text',
'Kein Angabe' UNDER 'Interface'.
ELSE.
WRITE:/ l_datfeld UNDER 'Datum',
l_timefeld UNDER 'Zeit',
wa_tab-proxy_name UNDER 'Proxyname',
wa_tab-short_text UNDER 'Text',
wa_tab-ifname UNDER 'Interface'.
ENDIF.
ENDIF.
ENDLOOP.
Code: Alles auswählen.
CONVERT TIMESTAMP ... TIMEZONE ... INTO DATE ... TIME ...
Code: Alles auswählen.
CONVERT DATE ... TIME ... INTO TIMESTAMP ... TIMEZONE ...
Folgende Benutzer bedankten sich beim Autor a-dead-trousers für den Beitrag:
jeyloeso