๐Ÿ–ฅ๏ธ SELECTION SCREEN

ํ™์˜ˆ๋ฆผยท2023๋…„ 7์›” 13์ผ
0

SAP ABAP(๊ฐœํŽธ์ค‘...)

๋ชฉ๋ก ๋ณด๊ธฐ
28/55
post-thumbnail
post-custom-banner

SELECT-OPTIONS : ... FOR ~.

๋ชจ์–‘

  • ์ž๋™ ์ƒ์„ฑ๋˜๋Š” 1000๋ฒˆ ์Šคํฌ๋ฆฐ์ด๋‹ค.
  • SO๋Š” ๊ฐ’์„ ์ž…๋ ฅํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ ๋ฌด์‹œํ•œ๋‹ค.
    • PA๋Š” ๊ฐ’์„ ์ž…๋ ฅํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ ๊ณต๋ฐฑ์ด ํ• ๋‹น๋œ๋‹ค.

๊ตฌ์กฐ

  • SO(Select-options)๋Š” ์ธํ„ฐ๋„ํ…Œ์ด๋ธ”์˜ ํ•œ ์ข…๋ฅ˜์ด๋‹ค.
    • WorkArea(ํ—ค๋”)๋ฅผ ์ด๋ฏธ ๊ฐ€์ง€๊ณ  ์žˆ์–ด์„œ ํ•„๋“œ ๋ณ€๊ฒฝ์ด ๋ถˆ๊ฐ€ํ•˜๋‹ค.
    • ํ—ค๋”๊ฐ€ ์žˆ๋Š” ๊ฒฝ์šฐ : ๋Œ€๊ด„ํ˜ธ 2๊ฐœ๋ฅผ ๋ถ™์—ฌ ITAB์˜ ๋ชธํ†ต์„ ๋“ค์—ฌ๋‹ค๋ณธ๋‹ค.
  • BREAK-POINT ์ž…๋ ฅ ํ›„ Direct Processing(F8)-Execute(F8) ์œผ๋กœ ์ฝ”๋“œ๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ๋””๋ฒ„๊น…ํ™”๋ฉด์—์„œ ์…€๋ ‰ํŠธ์˜ต์…˜์ฆˆ์˜ ํ•„๋“œ๊ตฌ์กฐ์ธ SIGN OPTION LOW HIGH ๋ฅผ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

SO์˜ ํ•„๋“œ : SIGN, OPTION, LOW, HIGH

์‹ค๋ฌด์—์„œ ์ง์ ‘ ์ž…๋ ฅํ•ด์•ผํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žฆ๋‹ค. SIGN์— ๋ฌด์—‡์ด ๋“ค์–ด๊ฐ€๋Š”์ง€ ์™ธ์›Œ๋‘์ž.

  • SIGN : ํฌํ•จ/์ œ์™ธ ์—ฌ๋ถ€ ์„ค์ •. ๊ธธ์ด 1๊ธ€์ž. I(Include) ๋˜๋Š” E(Exclude)๊ฐ€ ์ž๋™ ์ž…๋ ฅ๋œ๋‹ค.
  • OPTION : EQ, NE, BW ๋“ฑ์˜ ์—ฐ์‚ฐ์„ ํ‘œ์‹œํ•œ๋‹ค.
  • LOW HIGH : ์กฐ๊ฑด ๋ฒ”์œ„๋ฅผ ํ‘œ์‹œํ•œ๋‹ค.

๋‹ค์ค‘์กฐ๊ฑด(Multiple Selection)์‹œ SO์˜ ๋ฐ์ดํ„ฐ ๋ณ€ํ™”

  • ์‹คํ–‰ (Direct Processing(F8)-Execute(F8) )์‹œ ์…€๋ ‰ํŠธ์˜ต์…˜์ฆˆ์˜ ๋ฐ์ดํ„ฐ์— 2์ค„์ด ์ž…๋ ฅ๋จ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

์ƒ์„ฑ ๋ฌธ๋ฒ•

  • ์Šคํฌ๋ฆฐ ์ƒ์„ฑ ์‹œ, TYPE์ด ์•„๋‹Œ FOR๋กœ ๊ตฌ์กฐ๋ฅผ ์„ ์–ธํ•œ๋‹ค.
  • ์Šคํฌ๋ฆฐ : ํ•ญ์ƒ ๊ธ€๋กœ๋ฒŒ ์˜ค๋ธŒ์ ํŠธ๋กœ ์ƒ์„ฑ๋œ๋‹ค.
    • ๋”ฐ๋ผ์„œ ๋„ค์ด๋ฐ๋ฃฐ์—์„œ g๋ฅผ ์ƒ๋žตํ•œ๋‹ค.
    • SELECT-OPTIONS = so_ + ์˜๋ฏธ์žˆ๋Š” ์ด๋ฆ„
    • ์ด๋ฆ„์€ 8์ž๋ฆฌ๋ฏธ๋งŒ์œผ๋กœ ๊ฐ€๋Šฅํ•˜๋‹ค.
      • ex) so_carrid (X) / so_carr (O)
  • ์ฐธ์กฐํ•  ํ…Œ์ด๋ธ”/์ŠคํŠธ๋Ÿญ์ฒ˜๋Š” ๋ฐ˜๋“œ์‹œ ๊ธ€๋กœ๋ฒŒ๋กœ ์„ ์–ธ๋˜์–ด์•ผ ํ•œ๋‹ค.
    • DATA : gs_โ– โ– โ–  TYPE <ํ…Œ์ด๋ธ”๋ช…>. ๋Œ€์‹  TABLES : <ํ…Œ์ด๋ธ”๋ช…>. ๊ตฌ๋ฌธ์„ ์‚ฌ์šฉํ•œ๋‹ค.
      • ํ•ด๋‹น ํ…Œ์ด๋ธ”์„ ์ฐธ์กฐํ•œ ๊ธ€๋กœ๋ฒŒ ์ŠคํŠธ๋Ÿญ์ฒ˜๊ฐ€ ๋œ๋‹ค.
      • TABLES : โ– โ– โ– ๋Š” SELECT-OPTIONS๋ฅผ ์„ ์–ธํ•  ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ๊ธ€๋กœ๋ฒŒ์ŠคํŠธ๋Ÿญ์ฒ˜์—๋งŒ ์‚ฌ์šฉํ•œ๋‹ค.
      • ์ฝ”๋“œ ๊ฐ€๋…์„ฑ๋ฅผ ์œ„ํ•ด.
TABLES : <์ฐธ์กฐํ• ํ…Œ์ด๋ธ”๋ช…>.

SELECTION-SCREEN BEGIN OF BLOCK <๋ธ”๋ก๋ช…>.
    SELECT-OPTIONS : <์Šคํฌ๋ฆฐ์˜ต์…˜๋ช… so_โ– โ– โ– > FOR <์ฐธ์กฐํ• ๊ธ€๋กœ๋ฒŒ์ŠคํŠธ๋Ÿญ์ฒ˜-ํ•„๋“œ>
SELECTION-SCREEN END OF BLOCK <๋ธ”๋ก๋ช…>.

์‹คํ–‰


WIHT FRAME TITLE TEXT ~.

WITH FRAME

  • WITH FRAME : ๋ธ”๋ก์˜ ํ…Œ๋‘๋ฆฌ๋ฅผ ๋งŒ๋“ ๋‹ค.
    • ์ค‘์ฒฉ ๊ฐ€๋Šฅ : ๋ธ”๋ก ์•ˆ์— ๋ธ”๋ก ๋งŒ๋“ค๊ธฐ ๊ฐ€๋Šฅํ•˜๋‹ค.

TITLE TEXT

  • TITLE : ์ œ๋ชฉ ๊ณต๊ฐ„ ์„ค์ •

  • TEXT-T01 : ์ œ๋ชฉ๋ช… ์„ค์ •. TEXT ELEMENTS - TEXT SYMBOLS์˜ ๋ชฉ๋ก ์ค‘ T01 ์‚ฌ์šฉ

    • Text Symbols
      • Sym
        : ํ…์ŠคํŠธ ์‹ฌ๋ณผ์„ ์˜๋ฏธ. ์†Œ์Šค์ฝ”๋“œ์— ์ž…๋ ฅํ•  ์ฝ”๋“œ. 3๊ธ€์ž๊นŒ์ง€ ๊ฐ€๋Šฅ.
      • Text
        : ์ž์„ธํ•œ ์„ค๋ช…์„ ์ ๋Š”๋‹ค.
      • Max
        : ํ…์ŠคํŠธ์˜ ์ž๋ฆฌ์ˆ˜. 100 ์ž…๋ ฅํ•˜๊ธฐ (์‹ค๋ฌด์—์„œ ํƒ€ ์–ธ์–ด๋กœ ๋ณ€๊ฒฝ๋  ๋•Œ๋ฅผ ๊ณ ๋ คํ•จ)
    • Selection Texts
      • ์Šคํฌ๋ฆฐ์—์„œ ํ‘œ์‹œ๋  ํ•„๋“œ๋ช… ์„ค์ •
      • ์ฝ”๋“œ๋ฅผ ํ™œ์„ฑํ™” ํ•œ ํ›„ ๋‹ค์‹œ Text Elements์ฐฝ์„ ์—ด์–ด์•ผ ์ž…๋ ฅ ๊ฐ€๋Šฅํ•˜๋‹ค.
  • ํ™œ์„ฑํ™”(Active) ์ง„ํ–‰

SKIP

SELECTION-SCREEN SKIP <์ˆซ์ž>.
  • ๋นˆ ๊ณต๊ฐ„์„ ๋งŒ๋“ ๋‹ค.

ULINE

SELECTION-SCREEN  ULINE.
  • ๋ถ„๋ฆฌ์„ ์„ ๊ธ‹๋Š”๋‹ค.

์™„์„ฑ ๋ฐ ์‹คํ–‰๋œ ํ™”๋ฉด

TABLES : <์ฐธ์กฐํ• ํ…Œ์ด๋ธ”๋ช…>.

SELECTION-SCREEN BEGIN OF BLOCK <๋ธ”๋ก๋ช…> WITH FRAME TITLE TEXT-<ํ…์ŠคํŠธ ์—˜๋ ˆ๋ฉ˜์ธ ๋ช…>.
    SELECT-OPTIONS : <์Šคํฌ๋ฆฐ์˜ต์…˜๋ช… so_โ– โ– โ– > FOR <์ฐธ์กฐํ• ๊ธ€๋กœ๋ฒŒ์ŠคํŠธ๋Ÿญ์ฒ˜-ํ•„๋“œ>
SELECTION-SCREEN END OF BLOCK <๋ธ”๋ก๋ช…>.

์—ฌ๋Ÿฌ๊ฐ€์ง€ ์˜ต์…˜๋“ค

  • ๋‹ค ํ•จ๊ป˜ ์ž…๋ ฅ ๊ฐ€๋Šฅํ•˜๋‹ค.

DEFALUT (cf.์ƒ์ˆ˜์„ ์–ธ)

  • DEFALUT : ์…€๋ ‰ํŠธ์˜ต์…˜ ์„ ์–ธ ์‹œ ๊ธฐ๋ณธ๊ฐ’ ์„ค์ •
    • TYPE ์„ ์–ธ ์‹œ ๊ธฐ๋ณธ๊ฐ’์„ค์ •์€ VALUE ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
  • ์ƒ์ˆ˜๋ฅผ ์„ ์–ธํ•ด ์ ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.
    • ์ƒ์ˆ˜ ์„ ์–ธ์ด๋ฏ€๋กœ VLAUE ์‚ฌ์šฉ

OBLIGATORY

  • OBLIGATORY : ํ•„์ˆ˜ ์ž…๋ ฅ

NO INTERVALS

  • NO INTERVALS : ๋ฒ”์œ„ ์„ค์ • ์ค‘ ์ตœ๋Œ€๊ฐ’(High๊ฐ’) ์ƒ๋žต
    • ์ตœ์†Œ๊ฐ’(low๊ฐ’)๊ณผ ์ตœ๋Œ€๊ฐ’(high๊ฐ’)์„ ๋ฐ”๊ฟ” ์ž…๋ ฅํ•˜๋ฉด ๊ฒฝ๊ณ ๊ฐ€ ๋œฌ๋‹ค.

NO-EXTENSION

  • NO-EXTENSION : ๋‹ค์ค‘์„ ํƒ(Multiple Selection) ์•„์ด์ฝ˜ ์ƒ๋žต

LOWER CASE

  • LOWER CASE : ์†Œ๋ฌธ์ž ์ž…๋ ฅ ๊ฐ€๋Šฅ.

์ฝ”๋“œ ์ž‘์„ฑ

  • ๊ฐ’์„ ๋„ฃ์ง€ ์•Š์œผ๋ฉด SELECT-OPTIONS๋Š” ๋ฌด์‹œ๋œ๋‹ค.

์…€๋ ‰ํŠธ์˜ต์…˜์ฆˆ 2๊ฐœ ์„ค์ •ํ•˜๊ธฐ

  • ์ฝ”๋“œ ์ถ”๊ฐ€
    1. SELECTION OPTIONS
    2. WHERE ์กฐ๊ฑด๋ฌธ
SELECT-OPTIONS : <Selection Texts> FOR <๊ธ€๋กœ๋ฒŒ์ŠคํŠธ๋Ÿญ์ฒ˜ - ํ•„๋“œ>
WHERE ~~
  AND <ํ•„๋“œ> IN <Selection Texts>

์‹ค์Šต ๋ฌธ์ œ

1)

๋ฌธ์ œ

ํ’€์ด

TABLES : zc5t2500012, zc5t2500013.

SELECTION-SCREEN BEGIN OF BLOCK bl2.
    SELECT-OPTIONS : so_matnr FOR zc5t2500012-matnr OBLIGATORY NO INTERVALS,
                     so_ekgrp FOR zc5t2500013-ekgrp NO-EXTENSION.
SELECTION-SCREEN END OF BLOCK bl2.

2)

๋ฌธ์ œ

ํ’€์ด

* 0713 ์‹ค์Šต๋ฌธ์ œ 2 *
* 1)
TABLES : scarr, spfli.

SELECTION-SCREEN BEGIN OF BLOCK bl3 WITH FRAME TITLE TEXT-t03.
    SELECT-OPTIONS : so_carr   FOR scarr-carrid,
                     so_conn   FOR spfli-connid,
                     so_canam  FOR scarr-carrname,
                     so_cityf  FOR spfli-cityfrom,
                     so_cityt  FOR spfli-cityto,
                     so_fltm   FOR spfli-fltime,
                     so_curr   FOR scarr-currcode,
                     so_url    FOR scarr-url.
SELECTION-SCREEN END OF BLOCK bl3.
* 2)
DATA : BEGIN OF gs_fli,
        carrid   TYPE scarr-carrid,
        connid   TYPE spfli-connid,
        carrname TYPE scarr-carrname,
        cityfrom TYPE spfli-cityfrom,
        cityto   TYPE spfli-cityto,
        fltime   TYPE spfli-fltime,
        currcode TYPE scarr-currcode,
        url      TYPE scarr-url,
       END OF gs_fli,

       gt_fli   LIKE TABLE OF gs_fli.

CLEAR   : gs_fli.
REFRESH : gt_fli.

SELECT a~carrid a~carrname a~currcode a~url
       b~connid b~cityfrom b~cityto b~fltime
  INTO CORRESPONDING FIELDS OF TABLE gt_fli
  FROM scarr AS a
 INNER
  JOIN spfli AS b
    ON a~carrid = b~carrid
 WHERE a~carrid   IN so_carr
   AND b~connid   IN so_conn
   AND a~carrname IN so_canam
   AND b~cityfrom IN so_cityf
   AND b~cityto   IN so_cityt
   AND b~fltime   IN so_fltm
   AND a~currcode IN so_curr
   AND a~url      IN so_url.

  IF sy-subrc <> 0.
    WRITE : 'Data not found.'.

    else.
      cl_demo_output=>display( gt_fli ).

  ENDIF.

3)

๋ฌธ์ œ

  • SFLIGHT ํ…Œ์ด๋ธ”์„ ์ฐธ์กฐํ•ด ์•„๋ž˜์™€ ๊ฐ™์€ ์Šคํฌ๋ฆฐ์„ ๋งŒ๋“ค์–ด๋ผ.

ํ’€์ด

TABLES : sflight.

CONSTANTS : gc_carrid(2)  value 'DL',
            gc_planetype(10) value '747-400'.


SELECTION-SCREEN BEGIN OF BLOCK bl4 WITH FRAME TITLE TEXT-t01.
    SELECT-OPTIONS : so_carr   FOR sflight-carrid     DEFAULT gc_carr,
                     so_conn   FOR sflight-connid     NO INTERVALS,
                     so_fldt   FOR sflight-fldate     NO-EXTENSION,
                     so_curr   FOR sflight-currency   NO INTERVALS NO-EXTENSION,
                     so_fltp   FOR sflight-planetype  NO INTERVALS NO-EXTENSION
                                                      DEFAULT gc_fltp.
SELECTION-SCREEN END OF BLOCK bl4.
profile
SYNC 3๊ธฐ 5๋ฐ˜ 2023.07 - 2023.12
post-custom-banner

0๊ฐœ์˜ ๋Œ“๊ธ€