Hallo,
ich habe ein Problem mit dem SELECT-Befehl, was bisher nie vorkam. Ich versuche mit dem folgenden Codestück Sätze aus COSP (Primärkosten) und COSS (Sekundärkosten) zu lesen.
* Strukturen für die Rohdaten
types: begin of t_roh,
objnr like cosp-objnr,
kstar like cosp-kstar,
wrttp like cosp-wrttp,
wkg001 like cosp-wkg001,
wkg002 like cosp-wkg002,
wkg003 like cosp-wkg002,
wkg004 like cosp-wkg002,
wkg005 like cosp-wkg002,
wkg006 like cosp-wkg002,
wkg007 like cosp-wkg002,
wkg008 like cosp-wkg002,
wkg009 like cosp-wkg002,
wkg010 like cosp-wkg002,
wkg011 like cosp-wkg002,
wkg012 like cosp-wkg002,
wkg013 like cosp-wkg002,
wkg014 like cosp-wkg002,
wkg015 like cosp-wkg002,
wkg016 like cosp-wkg002,
end of t_roh.
data: fl_roh type t_roh.
data: it_roh type table of t_roh.
data: fl_roh1 type t_roh.
data: it_roh1 type table of t_roh.
refresh it_roh.
refresh it_roh1.
if not it_obje is initial.
* Primärkosten lesen
select objnr
kstar
wrttp
wkg001
wkg002
wkg003
wkg004
wkg005
wkg006
wkg007
wkg008
wkg009
wkg010
wkg011
wkg012
wkg013
wkg014
wkg015
wkg016
into corresponding fields of table it_roh
from cosp
for all entries in it_obje
where gjahr eq p_gjahr and
objnr eq it_obje-objnr and
wrttp in ('04', '11').
* Sekundärkosten lesen
select objnr
kstar
wrttp
wkg001
wkg002
wkg003
wkg004
wkg005
wkg006
wkg007
wkg008
wkg009
wkg010
wkg011
wkg012
wkg013
wkg014
wkg015
wkg016
into corresponding fields of table it_roh1
from coss
for all entries in it_obje
where gjahr eq p_gjahr and
objnr eq it_obje-objnr and
wrttp in ('04', '11').
endif.
Das Problem ist, das das Programm mir nicht alle Sätze in die Tabellen it_roh und it_roh1 liefert, die die Selektionsbedingungen genügen. Dieses Phänomen habe ich bisher noch nie erlebt. Hat einer eine Erklärung?
Danke im Voraus
Jürgen