REPORT  ZZZTESTUSERNK_3.

PARAMETERS: pa_car type sflight-carrid,
            pa_con type sflight-connid,
            pa_date type sflight-fldate.

DATA: gs_carrier type scarr, " légitársaság
      gs_flight type sflight. " járat


types: begin of s_carrflight,
* SCARR-ból
        carrname type S_CARRNAME.
* SFLIGHT -ból
include type sflight.
types:  end of s_carrflight.

START-OF-SELECTION.

  data gs_carflight type s_carrflight.

* lekérdezzük a légitársaság adatait
  ZCL_TESZT_NK_00=>GET_SCARR(
    EXPORTING
      IV_CARR_ID = pa_car
    IMPORTING
      ES_SCARR = gs_carrier
         ).

* lekérdezzük a járat adatait
  ZCL_TESZT_NK_00=>GET_SFLIGHT(
    EXPORTING
      IV_CARR_ID = pa_car
      IV_CONN_ID = pa_con
      IV_DATE    = pa_date
    IMPORTING
      ES_FLIGHT  = gs_flight
         ).

  MOVE-CORRESPONDING gs_carrier to gs_carflight.
  MOVE-CORRESPONDING gs_flight to gs_carflight.

end-of-SELECTION.

  write: / gs_carflight-carrname,
           gs_carflight-connid,
           gs_carflight-fldate.