Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DATA:
- wa_spfli type spfli,
- wa_sflight type sflight,
- wa_scarr type scarr,
- summe type i,
- anz_fluege type i,
- avg(4) type p DECIMALS 2.
- select * from scarr into wa_scarr.
- SELECT * FROM spfli INTO wa_spfli WHERE carrid = wa_scarr-carrid.
- write:/ wa_scarr-carrid, wa_scarr-carrname, wa_spfli-connid, wa_spfli-cityfrom,wa_spfli-cityto.
- SELECT * FROM sflight INTO wa_sflight WHERE carrid = wa_spfli-carrid AND connid = wa_spfli-connid.
- anz_fluege = anz_fluege + 1.
- summe = summe + wa_sflight-seatsocc.
- write:/ wa_sflight-fldate, wa_sflight-price,wa_sflight-currency,wa_sflight-seatsocc.
- ENDSELECT.
- avg = summe / anz_fluege.
- WRITE:/ anz_fluege. write:/ avg.
- anz_fluege = 0.
- summe = 0.
- ENDSELECT.
- ENDSELECT.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement