๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
728x90
๋ฐ˜์‘ํ˜•

๐Ÿง‘‍๐Ÿ’ผ SAP/ABAP77

[SAP ABAP] SELECT-OPTIONS ๋ž€? SELECT-OPTIONS ๋ž€? ์‚ฌ์šฉ์ž๋กœ๋ถ€ํ„ฐ ๋‹ค์ค‘ ๊ฐ’์„ ์ž…๋ ฅ๋ฐ›๊ฑฐ๋‚˜ ๋ฒ”์œ„๋ฅผ ์ง€์ •ํ•  ์ˆ˜ ์žˆ๋Š” ์ž…๋ ฅ ํ•„๋“œ๋ฅผ ์ •์˜ํ•˜๋Š”๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.SELECT-OPTIONS ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ํŠน์ • ํ•„๋“œ์— ๋Œ€ํ•ด ์—ฌ๋Ÿฌ ๊ฐ’, ๋ฒ”์œ„, ํฌํ•จ ๋ฐ ์ œ์™ธ ์กฐ๊ฑด ๋“ฑ์„ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. SELECT-OPTIONS ๊ตฌ์กฐSELECT-OPTIONS: s_field FOR db_table-field.s_field: ์„ ํƒ ์˜ต์…˜์˜ ์ด๋ฆ„์ž…๋‹ˆ๋‹ค.FOR db_table-field: ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ํ…Œ์ด๋ธ”์˜ ํ•„๋“œ์™€ ์—ฐ๊ฒฐ๋ฉ๋‹ˆ๋‹ค. ์˜ˆ์ œ* 1. SFLIGHT ํ…Œ์ด๋ธ” ์„ ์–ธTABLES: sflight.* 2. SELECT-OPTIONS ์„ ์–ธSELECT-OPTIONS: s_carrid FOR sflight-carrid, s_fldate FOR sfli.. 2024. 7. 16.
[SAP ABAP] SELECTION-SCREEN ์ด๋ž€? (์˜ˆ์ œ ํฌํ•จ) SELECTION-SCREEN ์ด๋ž€? ABAP ํ”„๋กœ๊ทธ๋žจ์—์„œ ์‚ฌ์šฉ์ž ์ž…๋ ฅ์„ ์œ„ํ•œ ํ™”๋ฉด์„ ์ •์˜ํ•˜๋Š”๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.์‚ฌ์šฉ์ž์—๊ฒŒ ๊ฐ’์„ ์ž…๋ ฅ๋ฐ›๋Š” ๊ธฐ๋Šฅ์„ ํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ์ œREPORT ZABAP001 .* 1. ๋ณ€์ˆ˜ ์„ ์–ธDATA: lv_name TYPE char20, lv_age TYPE i, lv_date TYPE d.* 2. Selection screen ์š”์†Œ ์ •์˜SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.* 3. PARAMETERSPARAMETERS: p_name TYPE char20 OBLIGATORY, p_age TYPE i DEFAULT 25, p_date TYPE d DEFAULT s.. 2024. 7. 16.
[SAP ABAP] TYPE ๊ณผ TYPE TABLE OF ๋ž€? TYPE ๊ณผ TYPE TABLE OF ์š”์•ฝ ์ •๋ฆฌTYPE๋‹จ์ผ ๋ฐ์ดํ„ฐ ํ•ญ๋ชฉ(๋ณ€์ˆ˜ ๋˜๋Š” ๊ตฌ์กฐ์ฒด) ์„ ์–ธ์˜ˆ: DATA: lv_carrid TYPE sflight-carrid. TYPE TABLE OF๋™์ผํ•œ ๊ตฌ์กฐ์˜ ์—ฌ๋Ÿฌ ํ–‰์„ ์ €์žฅํ•  ์ˆ˜ ์žˆ๋Š” ์ธํ„ฐ๋„ ํ…Œ์ด๋ธ” ์„ ์–ธ์˜ˆ: DATA: lt_sflight TYPE TABLE OF sflight.  TYPE ์ด๋ž€?TYPE ๊ตฌ๋ฌธ์€ ๋‹จ์ผ ๋ฐ์ดํ„ฐ ํ•ญ๋ชฉ(๋ณ€์ˆ˜ ๋˜๋Š” ๊ตฌ์กฐ์ฒด)์„ ์„ ์–ธํ•˜๋Š”๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.์ฆ‰, ๋ฐ์ดํ„ฐ ํƒ€์ž…์„ ์ง€์ •ํ•˜์—ฌ ๊ฐœ๋ณ„ ํ•„๋“œ๋‚˜ ๊ตฌ์กฐ์ฒด๋ฅผ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ์ œDATA: lv_carrid TYPE sflight-carrid. " ๋‹จ์ผ ๋ณ€์ˆ˜ ์„ ์–ธlv_carrid ๋Š” sflight ํ…Œ์ด๋ธ”์˜ carrid ํ•„๋“œ์™€ ๊ฐ™์€ ๋ฐ์ดํ„ฐ ํƒ€์ž…์„ ๊ฐ–๋Š” ๋‹จ์ผ ๋ณ€์ˆ˜์ž…๋‹ˆ๋‹ค.TYPES: BEGIN OF ty_s.. 2024. 7. 10.
[SAP ABAP] INTO CORRESPONDING FIELDS OF TABLE๊ณผ INTO TABLE ์ฐจ์ด์ , ์˜ˆ์ œ ์š”์•ฝINTO CORRESPONDING FIELDS OF TABLE ๊ณผ INTO TABLE ์€ ABAP์—์„œ SQL SELECT ๋ฌธ์„ ์‚ฌ์šฉํ•  ๋•Œ ๋ฐ์ดํ„ฐ๋ฅผ ์ธํ„ฐ๋„ ํ…Œ์ด๋ธ”์— ๋„ฃ๋Š” ๋ฐฉ๋ฒ•์„ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค. INTO CORRESPONDING FIELDS OF TABLEINTO TABLE๊ณตํ†ต์ ํ•„๋“œ ์ด๋ฆ„๊ณผ ๋ฐ์ดํ„ฐ ํƒ€์ž…์ด ์ธํ„ฐ๋„ ํ…Œ์ด๋ธ”๊ณผ ์ผ์น˜ํ•ด์•ผ ํ•จ์ฐจ์ด์ ์„ ํƒํ•œ ํ•„๋“œ๋งŒ ์ธํ„ฐ๋„ ํ…Œ์ด๋ธ”์— ๋งคํ•‘ํ•  ๋•Œ ์‚ฌ์šฉ๋ชจ๋“  ํ•ƒ๋ฅด๋ฅผ ํฌํ•จํ•œ ์ „์ฒด ํ…Œ์ด๋ธ” ์กฐํšŒํ•  ๋•Œ ์‚ฌ์šฉ  INTO CORRESPONDING FIELDS OF TABLE์˜ ์ž์„ธํ•œ ์„ค๋ช…INTO TABLE์˜ ์ž์„ธํ•œ ์„ค๋ช… ์˜ˆ์ œINTO TABLE ์˜ˆ์ œDATA: lt_sflight TYPE TABLE OF sflight.SELECT * INTO TABLE lt_sflight FROM sflig.. 2024. 7. 10.
728x90
๋ฐ˜์‘ํ˜•