Code: Alles auswählen.
* Struktur <logdata> = Struktur Nicht-Schlüsselfelder
* der protokollierten Tabelle
...
loop at lt_dbtablog into ls_dbtablog.
assign ls_dbtablog-logdata to <logdata> casting.
* Feldzuweisung in Sammeltabelle
endloop.
4.6, Releasewechsel ist am Jahresende, dein Tipp ist vermerkt. Danke für deine Hilfe.edwin hat geschrieben:Welches SAP-Rel ?
Code: Alles auswählen.
DATA log TYPE dbtablog.
DATA ls_log TYPE ylog. " struktur DBTABLOG + Deine Tabelle
DATA:
buffer TYPE xstring,
conv TYPE REF TO cl_abap_conv_in_ce.
*---------------------------------------------------------------------*
* MAIN *
*---------------------------------------------------------------------*
PARAMETERS date TYPE sy-datum DEFAULT sy-datum.
SELECT * FROM dbtablog INTO log
WHERE
tabname = 'Deine Tabelle' AND
logdate GE date.
CLEAR ls_log.
MOVE-CORRESPONDING log TO ls_log.
conv = cl_abap_conv_in_ce=>create(
encoding = 'DEFAULT'
endian = 'L'
input = log-logdata
).
*MANDT 3 Character
CALL METHOD conv->read(
EXPORTING n = 3
IMPORTING data = ls_log-mandt
).
*TPLNR 30 Character
CALL METHOD conv->read(
EXPORTING n = 30
IMPORTING data = ls_log-tplnr
).
*BRGT Decimal Feld
CALL METHOD conv->read(
IMPORTING data = ls_log-brgt
).
etc.
etc.
FREE conv.
APPEND ls_log TO gt_log.
ENDSELECT.