Code: Alles auswählen.
data: zeit_beg_kurz like tzonref-tstamps,
zeit_end_kurz like tzonref-tstamps,
zeit_dif_kurz like tzonref-tstamps.
get time stamp field zeit_beg_kurz.
perform verarbeitung.
get time stamp field zeit_end_kurz.
zeit_dif_kurz = zeit_end_kurz - zeit_beg_kurz.
write: / 'Kurzer Stempel ->',
20 'Start:', zeit_beg_kurz no-grouping,
/20 'Ende :', zeit_end_kurz no-grouping,
/20 'Diff.:', zeit_dif_kurz no-grouping.
Code: Alles auswählen.
report z_local.
tables: mara,
mvke,
marc.
data: gt_mara_zmm_matstamm type table of zmm_matstamm,
gt_mvke_zmm_matstamm type table of zmm_matstamm,
gt_marc_zmm_matstamm type table of zmm_matstamm,
wa_zmm_matstamm type zmm_matstamm.
field-symbols <gs_mara> type zmm_matstamm.
data: gt_mvke type zmm_matstamm,
gt_marc type zmm_matstamm.
data: gt_matnr type range of mara-matnr,
gs_matnr like line of gt_matnr.
data: zeit_beg_kurz like tzonref-tstamps,
zeit_end_kurz like tzonref-tstamps,
zeit_dif_kurz like tzonref-tstamps.
gs_matnr-sign = 'I'.
gs_matnr-option = 'BT'.
gs_matnr-low = '000000000000142259'.
gs_matnr-high = '000000000000143769'.
append gs_matnr to gt_matnr.
start-of-selection.
get time stamp field zeit_beg_kurz.
select matnr mstav prdha zzgattung zzmarke yykeid ntgew
from mara into corresponding fields of table gt_mara_zmm_matstamm
where matnr in gt_matnr.
select matnr mvgr1 provg from mvke into corresponding fields of table gt_mvke_zmm_matstamm
where matnr in gt_matnr.
select matnr herkl from marc into corresponding fields of table gt_marc_zmm_matstamm
where matnr in gt_matnr.
loop at gt_mara_zmm_matstamm assigning <gs_mara>.
clear: gt_mvke, gt_marc.
read table gt_mvke_zmm_matstamm into gt_mvke with key matnr = <gs_mara>-matnr.
read table gt_marc_zmm_matstamm into gt_marc with key matnr = <gs_mara>-matnr.
<gs_mara>-mvgr1 = gt_mvke-mvgr1.
<gs_mara>-provg = gt_mvke-provg.
<gs_mara>-herkl = gt_marc-herkl.
endloop.
get time stamp field zeit_end_kurz.
zeit_dif_kurz = zeit_end_kurz - zeit_beg_kurz.
* select matnr mstav prdha zzgattung zzmarke yykeid ntgew
* from mara into corresponding fields of wa_zmm_matstamm
* where matnr in gt_matnr.
*
* clear: gt_mvke, gt_marc.
* select single mvgr1 provg from mvke into corresponding fields of gt_mvke
* where matnr eq wa_zmm_matstamm-matnr.
*
* select single herkl from marc into corresponding fields of gt_marc
* where matnr eq wa_zmm_matstamm-matnr.
*
* wa_zmm_matstamm-mvgr1 = gt_mvke-mvgr1.
* wa_zmm_matstamm-provg = gt_mvke-provg.
* wa_zmm_matstamm-herkl = gt_marc-herkl.
* append wa_zmm_matstamm to gt_mara_zmm_matstamm.
* get run time field time.
* endselect.
write: 20 'Start:', zeit_beg_kurz no-grouping,
/20 'Ende :', zeit_end_kurz no-grouping.
end-of-selection.