메뉴 건너뛰기

SAP 한국 커뮤니티

CHECK - special for reports with logical databases

sapjoy 2006.12.02 18:57 조회 수 : 4846 추천:28

CHECK - special for reports with logical databases


Variants


1. CHECK sel.
2. CHECK SELECT-OPTIONS.

Variant 1
CHECK sel.

Effect
Checks the selection criterion requested by the statement SELECT-OPTIONS sel ... .

This statement is equivalent to f IN sel , if sel was defined by SELECT-OPTIONS sel FOR f and can be used anywhere in logical expressions

If the result of this check is negative, the processing in this event is terminated and the GET events for any subordinate database tables are not processed either.

This variant of the CHECK statement should be used only if the logical database for the corresponding table does not support dynamic selections (see CHECK SELECT-OPTIONS ), or SELECT-OPTIONS with the addition NO DATABASE SELECTION . Otherwise, the relevant record is not read from the database and made available to the program.

Variant 2
CHECK SELECT-OPTIONS.

Effect
Called only after a GET event.
This statement checks all the selections for SELECT-OPTIONS where the reference field after FOR belongs to the current table dbtab (specified after GET . However, this applies only if the logical database for dbtab does not support dynamic selections . Otherwise, the selections are passed directly to the logical database (with the exception: addition " NO DATABASE SELECTION " to SELECT-OPTIONS ).

This variant of the CHECK statement only makes sense if the logical database does not support dynamic selections for the corresponding table or SELECT-OPTIONS are defined with the addition " NO DATABASE SELECTION ".

You can determine from the ABAP/4 Development Workbench whether dynamic selections are defined and, if so, for which logical database tables by selecting Development -> Programming environ. -> Logical databases followed by Extras -> Dynamic selections .

Example
The logical database F1S of the demo flight reservation system contains the tables SPFLI with, and the table SFLIGHT without, dynamic selections.


TABLES:
  SPFLI, SFLIGHT.

SELECT-OPTIONS:
  SF_PRICE  FOR SFLIGHT-PRICE,
  SP_CARR   FOR SPFLI-CARRID,
  SP_FROM   FOR SPFLI-CITYFROM NO DATABASE SELECTION,
  SP_DEPT   FOR SPFLI-DEPTIME.


Since dynamic selections are defined with the table SPFLI , but not with the table SFLIGHT , the following procedure applies:


...
GET SFLIGHT.
  CHECK SELECT-OPTIONS.


This CHECK statement is equivalent to the following statement:


  CHECK SF_PRICE.


With


GET SPFLI.
  CHECK SELECT-OPTIONS.


the CHECK statement is equivalent to the following statement:


  CHECK SP_FROM.



Note
With CHECK SELECT-OPTIONS , fields from superior tables in the database hierarchy are not (!) checked.

Note
Runtime errors

CHECK_SELOPT_ILLEGAL_OPTION : Wrong " OPTION " in SELECT-OPTIONS or RANGES table
CHECK_SELOPT_ILLEGAL_SIGN : Wrong " SIGN " in SELECT-OPTIONS or RANGES table

Related CONTINUE , EXIT , REJECT , STOP

Index
?SAP AG 1996
번호 제목 글쓴이 날짜 조회 수
327 조회조건 동적으로 보이기 [5] 신종철™ 2007.08.20 4771
326 SAP API 제공 사이트 [1] sapjoy 2021.06.08 4771
325 Five Different "User Types" D.Y.Kim 2007.07.20 4779
324 ALV 중간 집계 하기 [3] 신종철 2007.08.10 4780
323 alv 메뉴만들기.. [9] 버즈즈 2008.01.04 4780
322 4.6에서 ALV 필드 변경 안될때 버퍼 지우는 방법 신종철 2007.08.10 4781
321 주민번호 체크 [3] 임선미 2007.10.23 4795
320 ALV에서 현재 선택된 ROW 반환하기 명신용 2007.04.03 4799
319 스크린에서 리스트 박스의 값을 동적으로 생성하는 tip [1] sapjoy 2007.11.30 4805
318 프로그램 tip활용문서 [11] file 가보자 2007.04.12 4817
317 백그라운드로 프로그램 실행하기 [5] file 아밥뽀 2014.09.21 4821
316 BAPI_MESSAGE_GETDETAIL 작업결과에 대한 메세지는 이렇게도 보여줄수 있겠군요 [1] 노름마치 2007.12.10 4822
315 Implementing BADI for the transactions VL02 & MM02 [4] file 노름마치 2009.07.10 4840
» CHECK - special for reports with logical databases [5] sapjoy 2006.12.02 4846
313 만약에 스탠다드 테이블을 update 하는 경우라면 다음과 같이... [3] sapjoy 2006.12.12 4858
312 WIN XP SP2에서 SAP SHOW NOTES 보이게 하기 [1] Wise 멘토 2008.11.25 4859
311 한방에 로그오프하기 [9] 김지성 2009.01.02 4863
310 [TIP] (기초) 화면에 Sap Key 값이 안보일때 해결방안 [3] file 촌놈악마 2010.06.01 4877
309 기안문내용 암호화되있죠?? 그거 가져오려면 "Read_Text" [2] file 양키 2009.08.14 4890
308 ABAP/4 Optimization Techniques [1] sapjoy 2007.06.30 4894