메뉴 건너뛰기

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
번호 제목 글쓴이 날짜 조회 수
247 BAPI LIST 입니다. 참고하세요. [24] file 노름마치 2007.12.10 4964
246 새로운 Session을 생성하는 방법 [7] 양키 2013.07.17 4961
245 ALV 색상 번호와 사용 목적 꿀단지 2011.10.11 4960
244 MM 이동유형 분류표 적어봅니다. [14] file 양키 2009.08.14 4949
243 ALV autorefresh 입니다. [13] eclipse 2008.01.15 4941
242 SCN에 올라온 ADT Tutorials Link 입니다. [4] Wise 멘토 2012.10.12 4903
241 STABLE SORT [3] sapjoy 2009.03.03 4902
240 ABAP/4 Optimization Techniques [1] sapjoy 2007.06.30 4894
239 기안문내용 암호화되있죠?? 그거 가져오려면 "Read_Text" [2] file 양키 2009.08.14 4890
238 [TIP] (기초) 화면에 Sap Key 값이 안보일때 해결방안 [3] file 촌놈악마 2010.06.01 4877
237 한방에 로그오프하기 [9] 김지성 2009.01.02 4864
236 WIN XP SP2에서 SAP SHOW NOTES 보이게 하기 [1] Wise 멘토 2008.11.25 4859
235 만약에 스탠다드 테이블을 update 하는 경우라면 다음과 같이... [3] sapjoy 2006.12.12 4858
» CHECK - special for reports with logical databases [5] sapjoy 2006.12.02 4846
233 Implementing BADI for the transactions VL02 & MM02 [4] file 노름마치 2009.07.10 4840
232 BAPI_MESSAGE_GETDETAIL 작업결과에 대한 메세지는 이렇게도 보여줄수 있겠군요 [1] 노름마치 2007.12.10 4822
231 백그라운드로 프로그램 실행하기 [5] file 아밥뽀 2014.09.21 4821
230 프로그램 tip활용문서 [11] file 가보자 2007.04.12 4817
229 스크린에서 리스트 박스의 값을 동적으로 생성하는 tip [1] sapjoy 2007.11.30 4805
228 ALV에서 현재 선택된 ROW 반환하기 명신용 2007.04.03 4799