SAP ABAP
Other, , Prof. Pete Moxon
Updated On 02 Feb, 19
Other, , Prof. Pete Moxon
Updated On 02 Feb, 19
4.1 ( 11 )
SAP ABAP Select Option fields - LOW and HIGH fields
httpsacademy.saptraininghq.comcoursesap-abap-programming-for-beginners-online-training
You use the statement [SELECT-optionS seltab FOR f.] to declare a selection table in the program that is linked to the f column of a database table, or to an internal f field in the program. A selection table is an internal table object of the standard table type that has a standard key and a header line. Selection tables are used to store complex selections using a standardized procedure. They can be used in several ways. Their main purpose is to directly translate the selection criteria into database selections using the WHERE addition in Open SQL statements.
Structure of Selection Tables
The row type of a selection table is a structure that consists of four components sign, option, low , and high. Each row of a selection table that contains values represents a sub-condition for the complete selection criterion. Description of the individual components
· sign
The data type of sign is c with length 1. The contents of signdetermine for each row whether the result of the row condition is to be included in or excluded from the resulting set of all rows. Possible values are I and E.
-- I stands for "inclusive" (inclusion criterion -- operators are not inverted)
-- E stands for "exclusive" (exclusion criterion - operators are inverted)
· option
The data type of option is C with length 2. option contains the selection operator. The following operators are available
-- If high is empty, you can use EQ, NE, GT, LE, LT, CP and NP. These operators are the same as those that are used for logical expressions. Yet operators CP and NP do not have the full functional scope they have in normal logical expressions. They are only allowed if wildcards ( or + ) are used in the input fields. If wildcards are entered on the selection screen, the system automatically uses the operator CP. The escape character is defined as #.
-- If high is filled, you can use BT (BeTween) and NB (Not Between). These operators correspond to BETWEEN and NOT BETWEEN that are used to check if a field belongs to a range. You cannot use wildcard characters.
· low
The data type of low is the same as the column type of the database table, to which the selection criterion is linked.
-- If high is empty, the contents of low define a single field comparison. In combination with the operator in option, it specifies a condition for the database selection.
-- If high is filled, the contents of low and high specify the upper and lower limits for a range. In combination with the operator in option, the range specifies a condition for the database selection.
· high
The data type of high is the same as the column type of the database table, to which the selection criterion is linked. The contents of high specify the upper limit for a range selection.
If the selection table contains more than one row, the system applies the following rules when creating the complete selection criterion
1. Form the union of sets defined on the rows that have sign field equal to I (inclusion).
2. Subtract the union of sets defined on the rows that have sign field equal to E (exclusion).
3. If the selection table consists only of rows in which the sign field equals E, the system selects all data outside the set specified in the rows.
httphelp.sap.comsaphelp_nw04shelpdataen9fdba71f35c111d1829f0000e829fbfeframeset.htm
Websites and Profiles
SAP Training Courses httpwww.saptraininghq.com
SAP Academy Courses httpacademy.saptraininghq.com
SAP Training on Twitter httpstwitter.competermoxon
SAP Training on Google + httpsplus.google.comu0+PeteMoxon
STHQ on Linked-In httpuk.linkedin.cominpetermoxon
STHQ on YouTube httpwww.youtube.comuserpcmoxon
More SAP Resources
SAP site httpwww.sap.com
SAP community netwrok httpscn.sap.com
About SAP httpen.wikipedia.orgwikiSAP_AG
About ABAP httpen.wikipedia.orgwikiABAP
Various YouTube channels on SAP
SAP InnoJam httpswww.youtube.comchannelUCbkywtePppACE646Kw8wSUg
SAP on YouTube httpswww.youtube.comchannelUCVnIv2xF2wyMMCSKv1qF3pA
SAP TV on YouTube httpswww.youtube.comchannelUCy4kQ_03bhe5PQZVJvCkTKA
SAP SCN on YouTube httpswww.youtube.comchannelUC3We5qK8jkxH8yBc0SugKEQ
httpwww.w3schools.comsqlsql_primarykey.asp
Sam
Sep 12, 2018
Excellent course helped me understand topic that i couldn't while attendinfg my college.
Dembe
March 29, 2019
Great course. Thank you very much.