Code: Alles auswählen.
SELECT afko~aufnr
crhd~arbpl
afvv~vgw01
FROM afko
JOIN afvc
ON afvc~aufpl = afko~aufpl
JOIN crhd
ON afvc~arbid = crhd~arbpl
JOIN afvv
ON afvv~aufpl = afvc~aufpl
INTO ls_dummy
WHERE aufnr = lv_test
and crhd~arbpl in ltr_arbpl.
ENDSELECT.
Code: Alles auswählen.
CONSTANTS: resource_type_work_center TYPE cr_objty VALUE 'A'.
SELECT afko~aufnr
crhd~arbpl
afvv~vgw01
FROM afko
JOIN afvc
ON afvc~aufpl = afko~aufpl
JOIN crhd
ON afvc~arbid = crhd~objid
JOIN afvv
ON afvv~aufpl = afvc~aufpl
AND afvv~aplzl = afvc~aplzl
INTO TABLE lt_dummy
WHERE aufnr = lv_test
and crhd~arbpl in ltr_arbpl
and crhid~objty = resource_type_work_center.