條件輸入完後要將符合條件的資料篩選出來, 可配合使用 SELECT 指令 1.使用WHERE <條件式> Example: TABLES SPFLI. SELECT-OPTIONS AIRLINE FOR SPFLI-CONNID. SELECT * FROM SPFLI WHERE CONNID IN AIRLINE. WRITE: / SPFLI-CONNID,SPFLI-CITYFROM,SPFLI-CITYTO. ENDSELECT. 2.使用CHECK參數 Example: TABLES SPFLI. SELECT-OPTIONS AIRLINE FOR SPFLI-CONNID. SELECT * FROM SPFLI. CHECK AIRLINE. WRITE: / SPFLI-CONNID,SPFLI-CITYFROM,SPFLI-CITYTO. ENDSELECT. * exp: TABLES SPFLI. SELECT-OPTIONS: S_CARRID FOR SPFLI-CARRID, S_CITYFR FOR SPFLI-CITYFROM, S_CITYTO FOR SPFLI-CITYTO, S_CONNID FOR SPFLI-CONNID. SELECT * FROM SPFLI. CHECK: SPFLI-CARRID IN S_CARRID, SPFLI-CITYFR IN S_CITYFR, SPFLI-CITYTO IN S_CITYTO, SPFLI-CONNID IN S_CONNID. WRITE: / SPFLI-CARRID, SPFLI-CONNID, SPFLI-CITYFROM, SPFLI-CITYTO. ENDSELECT.
3.使用 IF … IN 敘述 Example: SELECT-OPTIONS AIRLINE FOR SPFLI-CONNID. SELECT * FROM SPFLI. IF SPFLI-CONNID IN AIRLINE. WRITE: / SPFLI-CONNID,SPFLI-CITYFROM,SPFLI-CITYTO. ENDIF. ENDSELECT. *-------------------------------------------------------------------------------------*
SELECTION-SCREEN 1.產生空白列 語法: SELECTION-SCREEN SKIP [] Example: SELECTION-SCREEN SKIP 2. 產生兩列空白列 2.產生底線 語法: SELECTION-SCREEN ULINE / (length) Example: SELECTION-SCREEN ULINE /10(30). 自第10格開始產生長度30的底線 3.印出備註說明 語法: SELECTION-SCREEN COMMENT / (length) Example: REMARK = 'Pls enter your name'. SELECTION-SCREEN COMMENT /10(30) REMARK. 4. 同一列中輸入數個資料項 語法: SELECTION-SCREEN BEGIN OF LINE. …… SELECTION-SCREEN END OF LINE. Example: SELECTION-SCREEN BEGIN OF LINE. SELECTION-SCREEN POSITION 20. PARAMETERS NAME(10). SELECTION-SCREEN POSITION 40. PARAMETERS BIRTH TYPE D. SELECTION-SCREEN END OF LINE. 在20格輸入NAME內容, 40格輸入 BIRTH的內容
5. 繪出BLOCK PANEL 語法: SELECTION-SCREEN BEGIN OF BLOCK [WITH FRAME [TITLE ……. SELECTION-SCREEN END OF BLOCK . Example: SELECTION-SCREEN BEGIN OF BLOCK RADIO WITH FRAME . PARAMETER R1 RADIOBUTTON GROUP GR1. PARAMETER R2 RADIOBUTTON GROUP GR1. PARAMETER R3 RADIOBUTTON GROUP GR1. SELECTION-SCREEN END OF BLOCK RADIO. *-------------------------------------------------------------------------------------*