DATA ITAB LIKE SPFLI OCCURS 0 WITH HEADER LINE.
DATA CTAB LIKE SFLIGHT OCCURS 0 WITH HEADER LINE.
PARAMETERS: P_CARRID LIKE SPFLI-CARRID.
START-OF-SELECTION.
PERFORM GET_DATA.
AT LINE-SELECTION.
PERFORM WRITE.
*&---------------------------------------------------------------------*
*& Form get_data
*&---------------------------------------------------------------------*
FORM GET_DATA.
SELECT * FROM SPFLI INTO TABLE ITAB WHERE CARRID EQ P_CARRID.
LOOP AT ITAB.
WRITE:/ ITAB-CARRID COLOR 4,
ITAB-CONNID COLOR 5,
ITAB-CITYFROM COLOR 6,
ITAB-CITYTO COLOR 7.
HIDE: ITAB-CARRID, ITAB-CONNID.
ENDLOOP.
ENDFORM. "GET_DATA
*---------------------------------------------------------------------*
* FORM WRITE *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
FORM WRITE.
SELECT * FROM SFLIGHT INTO TABLE CTAB WHERE
CARRID = ITAB-CARRID AND CONNID = ITAB-CONNID.
LOOP AT CTAB.
WRITE : / CTAB-CARRID COLOR 2,
CTAB-CONNID COLOR 3,
CTAB-FLDATE COLOR 1.
ENDLOOP.
ENDFORM. " write
Hiç yorum yok:
Yorum Gönder