반응형
TYPES : BEGIN OF ty_s_disp.
TYPES : matnr TYPE mard-matnr,
maktx TYPE makt-maktx,
werks TYPE mard-werks,
lgort TYPE mard-lgort,
tstock TYPE pmatstkbkdate1-matlwrhsstkqtyinmatlbaseunit,
tvlaue TYPE mbew-stprs,
meins TYPE matdoc-meins,
stock1 TYPE matdoc-menge,
stock2 TYPE matdoc-menge,
stock3 TYPE matdoc-menge,
stock4 TYPE matdoc-menge,
stock5 TYPE matdoc-menge.
TYPES : END OF ty_s_disp.
TYPES : ty_t_disp TYPE STANDARD TABLE OF ty_s_disp.
DATA : gt_disp TYPE ty_t_disp.
DATA(p_date) = sy-datum.
SELECT a~material AS matnr,
a~matlwrhsstkqtyinmatlbaseunit AS tstock,
b~meins,
a~plant AS werks,
a~storagelocation AS lgort
FROM pmatstkbkdate1( p_keydate = @p_date ) AS a
JOIN mara AS b
ON b~matnr = a~material
INTO CORRESPONDING FIELDS OF TABLE @gt_disp.
반응형