Hi,
ich glaube zumindest den Unterschied zu kennen.
War aber auch mein Fehler mit den Bezeichnern.
Nun ja.
Ich habe das Coding nun etwas vereinfacht und das Programm lässt sich auch starten.
*&---------------------------------------------------------------------*
*& Report ZSELECTFLIGHT *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
REPORT ZSELECTFLIGHT_ITAB
.
*--------------Deklaration
*Interne Tabellendefinition
types: begin of lFlight,
lcarrid type S_CONN_ID,
lconnid type S_CARR_ID,
lfldate type s_date,
lprice type s_price,
lseatsmax type S_SEATSMAX,
lseatsocc type S_SEATSocc,
lpers type p decimals 2,
end of lFlight.
DATA:
it_flight TYPE standard table of lFlight.
*Arbeitsbereich
DATA wa_it_flight type lFlight.
*data: wa_sflight type sflight.
data pers type p decimals 2.
parameters pa_FLI type s_carr_id.
*--------------------Programm
select * from sflight into corresponding fields of wa_it_flight
where
carrid = pa_fli.
if wa_it_flight-lseatsmax <> 0.
pers = wa_it_flight-lseatsocc / wa_it_flight-lseatsmax.
else.
pers = 0.
endif.
append wa_it_flight to it_flight.
endselect.
loop at it_flight into wa_it_flight.
new-line.
write: /
wa_it_flight-lconnid,
wa_it_flight-lcarrid,
wa_it_flight-lseatsmax,
wa_it_flight-lseatsocc,
wa_it_flight-lfldate,
wa_it_flight-lprice,
wa_it_flight-lpers,
'%'.
endloop.
Allerdings bei
select * from sflight into corresponding fields of wa_it_flight
where
carrid = pa_fli.
wird nie was in wa_it_flight geschrieben. Somit wird in meine interne tabelle immer Nuller geschrieben.
Thanks
Forty2