Code: Alles auswählen.
select
caufv~aufpl
caufv~getri
afvv~ruest
afvv~bearz
crhd~arbpl
caufv~dispo
afvv~beaze
afvv~rstze
crtx~ktext
afvc~arbid
afpo~matnr
from
caufv
join afvv on caufv~aufpl = afvv~aufpl
join afpo on caufv~aufnr = afpo~aufnr
join afvc on afvv~aufpl = afvc~aufpl
join crhd on crhd~objty = 'A'
and afvc~arbid = crhd~objid
join crtx on crtx~objty = 'A'
and crhd~objid = crtx~objid
into corresponding fields of table tl_auftraege
where
caufv~getri in datum
and caufv~werks in werke
and caufv~dispo in dispon
and crtx~spras = sy-langu
and crhd~arbpl in arbeitsp
order by crhd~arbpl.