DATA : BEGIN OF <gt_sflight> OCCURS 0,
carrid TYPE sflight-carrid,
connid TYPE sflight-connid,
END OF <gt_sflight>.
OCCURS ๋ ์์คํ ์คํ ํ๊ฒฝ์์ Internal Table ์ ๋ฉ๋ชจ๋ฆฌ ํ ๋น์ ์๋ฏธํฉ๋๋ค . 0์ผ๋ก ํ์ํ๋ฉด ๋ฉ๋ชจ๋ฆฌ ์ ํ์ ๋์ง ์๋๋ค๋ ๋ป์ผ๋ก ๋ฉ๋ชจ๋ฆฌ ํ ๋น์ ์ต์ํํ๋ค๋ ์๋ฏธ ์ ๋๋ค . 0 ์ด์ธ์ ์ซ์๋ฅผ ์ฌ์ฉํ ์๋ ์์ผ๋ ๋ฉ๋ชจ๋ฆฌ ํ ๋น์ด ๋ถ์กฑํ๋ฉด ์์คํ ์ด ์๋์ผ๋ก ๋ฉ๋ชจ๋ฆฌ๋ฅผ ํ๋ณดํ๋ฏ๋ก ๊ทธ๋ ๊ฒ ํฐ ์๋ฏธ๊ฐ ์์ต๋๋ค. ํ์ง๋ง OCCURS ๋ฅผ ์ ์ธํ Intenal Table ์ Standard ํ ์ด๋ธ ํํ๋ฅผ ๋ํ๋ด๋ ๊ฒ์ ๋๋ค.
[์ถ์ฒ : http://sapjoy.co.kr/abapqna/7518]
DATA : gt_data TYPE sflight OCCURS 0. <" ํค๋๊ฐ ์๋ ์ธํฐ๋ํ
์ด๋ธ >
DATA : gt_data TYPE sflight OCCURS 0 WITH HEADER LINE, <" ํค๋๊ฐ ์๋ ์ธํฐ๋ํ
์ด๋ธ >
gt_temp LIKE gt_data OCCURS 0. <" ํค๋๊ฐ ์๋ ์ธํฐ๋ํ
์ด๋ธ >
DATA : <gt_spfli> TYPE TABLE OF <spfli> WITH HEADER LINE.
OCCURS 0. | WITH HEADER LINE. | |
---|---|---|
๋์ | Structure | Table |
์์ฑ | BODY | HEADER |
DATA : BEGIN OF gs_vbap,
vbeln TYPE vbak-vbeln,
angdt TYPE vbak-angdt,
vbtyp TYPE vbak-vbtyp,
matwa TYPE vbap-matwa,
arktx TYPE vbap-arktx.
INCLUDE STRUCTURE tds_sd_prodh_univ_node.
INCLUDE STRUCTURE j_1bsd_tc_det.
DATA : zmeng TYPE vbap-zmeng,
meins TYPE vbap-meins,
END OF gs_vbap,
<gt_vbap> LIKE TABLE OF <gs_vbap> WITH HEADER LINE.
LOOP AT <gt_sflight>. "---> INTO ์๋ต
gv_tabix = sy-tabix.
CASE gt_sflight-planetype.
WHEN 'A340-600'.
gt_sflight-planetype = 'A380'.
MODIFY <gt_sflight> INDEX <gv_tabix> "---> FROM ์๋ต
TRANSPORTING <planetype>.
ENDCASE.
ENDLOOP.
LOOP AT
/READ TABLE
ํ
์ด๋ธ INTO
WA INDEX
gv_tabixINTO
๋ก ๋ฐ์ดํฐ๋ฅผ ์ํฌ์์ด๋ฆฌ์ด(์คํธ๋ญ์ฒ)์ ๋ด์์ฃผ์ด์ผ ํ์ง๋ง,INTO
๋ฅผ ์๋ตํ๋ค.TO
์ FROM
์ ์๋ตํ๋ค.DATA : BEGIN OF gs_data,
vbeln TYPE lips-vbeln,
posnr TYPE lips-posnr,
pstyv TYPE lips-pstyv,
matnr TYPE lips-matnr,
matwa TYPE lips-matwa,
matkl TYPE lips-matkl,
END OF gs_data,
gt_data LIKE TABLE OF gs_data WITH HEADER LINE,
lv_tabix TYPE sy-tabix.
CLEAR : gt_data, gt_data[].
gt_data-vbeln = '1000000001'.
gt_data-posnr = 10.
gt_data-pstyv = 'ADP1'.
gt_data-matnr = 'T-RSP512'.
gt_data-matwa = 'ST_10'.
gt_data-matkl = '01'.
APPEND gt_data.
CLEAR gt_data.
CLEAR : gt_spfli, gt_spfli[], gt_mat, gt_mat[].
CLEAR
๋ ๋ชจ๋ ๋์์ ์ด๊ธฐํํ๋ค.REFRESH
๋ ์ธํฐ๋ ํ
์ด๋ธ
, ์ฆ ๋ฐ๋ ์ ์ฉ ์ด๊ธฐํ ์ฝ๋์ด๋ค.APPEND
/MODIFY
ํ ํด๋ฆฌ์ด ํ ๋๋ ์คํธ๋ญ์ฒ(=ํค๋)๋ง ์ฒญ์ํ๋ค.APPEND : gt_spfli, gt_mat.
CLEAR : gt_spfli, gt_mat.
SIGN
OPTION
LOW
HIGH
๋ฅผ ๊ฐ์ง๋ค.REPORT zc525lr0001 MESSAGE-ID zc5m25.
TABLES : sflight.
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE TEXT-t01.
PARAMETERS : pa_carr TYPE sflight-carrid.
SELECT-OPTIONS : so_conn FOR sflight-connid.
SELECTION-SCREEN END OF BLOCK bl1.
INITIALIZATION. <" ์ด๊ธฐ๊ฐ ์ค์ *>
pa_carr = 'AA'.
<* ์
๋ ์
์คํฌ๋ฆฐ์ ํค๋๋ฅผ ๊ฐ์ง ์ธํฐ๋ํ
์ด๋ธ์ด๋ค. *>
<* ๋ฐ๋ผ์ ์ํฌ์์ด๋ฆฌ์ด๋ฅผ ์ ์ธํ์ง ์์๋, ์ด๋ฏธ ์ํฌ์์ด๋ฆฌ์ด๋ฅผ ๊ฐ์ง๊ณ ์๋ค. *>
<* so_conn ์ ํค๋, so_conn[] ์ ๋ฐ๋๋ฅผ ์๋ฏธํ๋ค. *>
so_conn-sign = 'I'. " include *
so_conn-option = 'EQ'.
so_conn-low = '0017'.
APPEND so_conn. <" ํค๋๊ฐ ์์ผ๋ฏ๋ก... APPEND so_conn to so_conn[]. ๋ฅผ ์๋ฏธํ๋ค.>
์ ์ฝ์์ต๋๋ค. ์ข์ ์ ๋ณด ๊ฐ์ฌ๋๋ฆฝ๋๋ค.