메뉴 건너뛰기

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
번호 제목 글쓴이 날짜 조회 수
447 Five Different "User Types" D.Y.Kim 2007.07.20 4779
446 T_CODE [9] BlackBean 2007.05.29 4302
445 FOR ALL ENTRIES IN 구문 사용시 select 필드 선택시 주의사항. [7] 나침반친구 2007.03.13 17044
444 변수 선언과 관련된 TIP [5] 나침반친구 2007.03.05 4674
443 SELECT statement D.Y.Kim 2007.07.20 23648
442 data [2] sapjoy 2006.12.03 16723
441 What Are Lock Objects ? D.Y.Kim 2007.07.20 7687
440 ABAP/4 Optimization Techniques [1] sapjoy 2007.06.30 4894
» CHECK - special for reports with logical databases [5] sapjoy 2006.12.02 4846
438 제가 모은 팁들입니다. [62] file 풍운사랑 2007.09.07 5541
437 Image를 화면에 보여주는 방법 [1] 정두영 2007.08.30 6020
436 설명이 비교적 자세하고 원리를 알수 있는 효과적인 ABAP코딩 문서.doc [13] file 박영신 2007.07.26 4041
435 일자에 포멧에 맞게 자동으로 처리하는 프로그램 [1] 박종갑 2007.07.13 3741
434 System Administration Made Easy - Performace file 박진만 2007.06.26 2985
433 excel macro SAP HELP sapjoy 2007.06.04 4442
432 ABAP DOCUMENT [2] sapjoy 2007.02.11 4479
431 ABAP 문법 2nd [8] file 아일락 2007.08.20 3914
430 평가영역 에서 자재 평가는 불일치성 합니다(이전전기시 에러) [1] sapjoy 2007.07.03 7872
429 텍스트파일 다운받을때 유니코드 문제 해결 [8] file 솔로몬 2007.06.28 13805
428 너무도 당연해서 가끔 잊곤하는 공기와 같은 존재 'F1' key [5] 백혜정 2007.09.19 4034