본문 바로가기

SAP/ABAP

[Search Help] Seach Help 기본 동작 원리 이해 하기 1/3

작성일: 2024년 5월 13일

목적: Search Help의 작동 원리 이해 및 전체 프로그램 돌아가는 거 이해하기

 

1. SELECT-SCREEN과 LIST BOX

 

1) SELECT-SCREEN 호출 시 나오는 화면 -> 선택하여 값을 불러오는 화면이 나옴 -

2) PARAMETER는 단일 값을 불러오는 것. -> select-screen 상 검색어 하나하나 임

3) PARAMETER 상 'AS LISTBOT VISIBLE LENGTH NN'이  있고 없고의 차이점 -> list box로 조회가능한지 여

 

 

[소스코드]

*&---------------------------------------------------------------------*
*& Report ZTEST_SEARCH2
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZTEST_SEARCH2.

SELECTION-SCREEN BEGIN OF BLOCK part6 WITH FRAME TITLE text-005.
PARAMETERS p_mandt TYPE spfli-mandt  .
PARAMETERS p_carr TYPE spfli-carrid  .
PARAMETERS p_connid TYPE spfli-connid  .
PARAMETERS p_cofr TYPE spfli-countryfr  .
PARAMETERS p_cityfr TYPE spfli-cityfrom  .
PARAMETERS p_airpfr TYPE spfli-airpfrom  .
PARAMETERS p_coto TYPE spfli-countryto  .
PARAMETERS p_airpto TYPE spfli-airpto  .
PARAMETERS p_fltime TYPE spfli-fltime .
PARAMETERS p_depti TYPE spfli-deptime .
PARAMETERS p_arrti TYPE spfli-arrtime  .
PARAMETERS p_dista TYPE spfli-distance  .
PARAMETERS p_distid TYPE spfli-distid  .
PARAMETERS p_fltype TYPE spfli-fltype .
PARAMETERS p_period TYPE spfli-period  .
SELECTION-SCREEN END OF BLOCK part6.

SELECTION-SCREEN BEGIN OF BLOCK part7 WITH FRAME TITLE text-005.
PARAMETERS p_carr1 TYPE spfli-carrid  AS LISTBOX VISIBLE LENGTH 20.
PARAMETERS p_conn1 TYPE spfli-connid  AS LISTBOX VISIBLE LENGTH 20.
PARAMETERS p_cofr1 TYPE spfli-countryfr  AS LISTBOX VISIBLE LENGTH 20.
PARAMETERS p_city1 TYPE spfli-cityfrom  AS LISTBOX VISIBLE LENGTH 20.
PARAMETERS p_airp1 TYPE spfli-airpfrom  AS LISTBOX VISIBLE LENGTH 20.
PARAMETERS p_coto1 TYPE spfli-countryto  AS LISTBOX VISIBLE LENGTH 20.
PARAMETERS p_airp2 TYPE spfli-airpto  AS LISTBOX VISIBLE LENGTH 20.
PARAMETERS p_flti1 TYPE spfli-fltime AS LISTBOX VISIBLE LENGTH 20.
PARAMETERS p_dept1 TYPE spfli-deptime  AS LISTBOX VISIBLE LENGTH 20.
PARAMETERS p_arrt1 TYPE spfli-arrtime  AS LISTBOX VISIBLE LENGTH 20.
PARAMETERS p_dist1 TYPE spfli-distance  AS LISTBOX VISIBLE LENGTH 20.
PARAMETERS p_dist2 TYPE spfli-distid  AS LISTBOX VISIBLE LENGTH 20.
PARAMETERS p_flty1 TYPE spfli-fltype AS LISTBOX VISIBLE LENGTH 20.
PARAMETERS p_peri1 TYPE spfli-period  AS LISTBOX VISIBLE LENGTH 20.
SELECTION-SCREEN END OF BLOCK part7.

 

[출력화면]

 

 

 

2. SEARCH HELP와 CHECK TABLE