by Justine2264 » Wed May 30, 2012 7:40 am
hallo,
so solltest du die richtigen vorgaenge erhalten
* Lesen Auftragskopf
select single aufpl into afko-aufpl
from afko
where aufnr = imp_aufnr.
refresh i_zcvorgang.
clear i_zcvorgang.
* Lesen Vorgänge zum Auftrag
select aufpl aplzl arbid aplfl
into corresponding fields of afvc
from afvc
where aufpl = afko-aufpl.
i_zcvorgang-aplfl = afvc-aplfl.
i_zcvorgang-vornr = afvc-vornr.
* Lesen Mengen/Termine/Werte zum Vorgang
select aufpl aplzl bmsch
vge02 vgw02 vge03 vgw03 vge04 vgw04 vge05 vgw05
into corresponding fields of afvv
from afvv
where aufpl = afvc-aufpl
and aplzl = afvc-aplzl.
* Lesen Arbeitsplatzdaten zum Vorgang
select single objty objid
arbpl werks verwe
stand into corresponding fields of crhd
from crhd
where objid = afvc-arbid
and werks = aufk-werks.
joachim