Monday 6 June 2016

Selection Screens

Selection Screens


Parameters

  • Syntax
             PARAMETERS <parm>[(<length>)] <type> [<decimals>].
  1. Creates a parameter <parm>. The additions length, type, and decimals are the same as for DATA.  
  2. Cannot have type F.
  3. Comments on the left side of the input fields can be changed using Selection Texts.
Other additions: 

  1. DEFAULT <f> - can be either a literal or a field name. Default values transported before INITIALIZATION. Therefore, default can be only fields which are already filled when the user starts the program (e.g. SY-...);
  2. NO-DISPLAY - hides parameter. To hide a parameter only under certain conditions declare it without NO-DISPLAY suppress its display by using MODIFY SCREEN. 
  3. LOWER CASE - allows accept lower case. Cannot be used if a parameter references a dictionary fields which has its own attributes;
  4. OBLIGATORY : Making field input as mandatory.
  5. AS CHECKBOX - creates a checkbox (type C(1)). Cannot have TYPE|LIKE addition. Valid values are ' ' and 'X'.Using LIKE to refer to an ABAP/4 Dictionary field of type CHAR of length 1 and valid values 'X' and ' ' (defined in the field's domain) automatically creates a checkbox on the selection screen;  
  6. RADIOBUTTON GROUP <radi> - creates a radio button and assigns it to the group <radi> (length of the <radi> cannot be > 4). Can have LIKE referring to C(1). Valid values are ' ' and 'X'. If no DEFAULT addition exists then first radio button in group will be 'X';
  7. MEMORY ID <pid> - uses a default value from the global SAP memory (SPA/GPA parameters). <pid> can be up to 3 characters long and must not be enclosed in quotation marks. You use the global SAP memory to pass values retained beyond transaction limits between programs. This memory is available to a user for the entire duration of a terminal session and any parallel sessions use the same memory. The SAP memory is thus more comprehensive than the transaction-bound Data Clusters in ABAP/4 memory. See the TPARA table ("Directory of Memory IDs") for all system Memory IDs. Parameters can be set user specific in the user's master records with the name <pid>. See also SET/GET PARAMETER.
  8. MATCHCODE OBJECT <mobj> - assigns matchcode object from Data Dictionary to the parameter. <mobj> should be 4 characters long and must not be enclosed in quotation marks. ·         . If you use this option, the possible entries pushbutton ->appears after the input field of the parameter (? not always). When the user presses this button, the effect is to perform a matchcode selection for the input field.
  9. MODIF ID <key> - assigns the parameter to a modification group. <key> should be 3 characters long and must not be enclosed in quotation marks. The MODIF ID option always assigns <key> to the column SCREEN-GROUP1 of the internal table SCREEN. Parameters assigned to a modification group can be processed as an entire group with the LOOP AT SCREEN/MODIFY SCREEN statements during the AT SELECTION-SCREEN OUTPUT event;
a



                     

RANGES

  • Syntax :
            RANGES <range> FOR <f>. 
  • This is a short form of
             DATA: BEGIN OF <range> OCCURS 10, 
                               SIGN(1), 
                             OPTION(2), 
                             LOW LIKE <f>, 
                             HIGH LIKE <f>, 
                         END OF <range>.
  • Creates a selection table <range> which refers to the column of database field <f> or to an internal field <f>. The <range> has the same structure as Selection Options internal table, but the are not part of the selection screen and are not linked to a database table. 

Selection Options

  • Syntax:
            SELECT-OPTIONS <selopt> FOR <fgt>.
  1. Creates a selection table <selopt> for the column <f> of a database table or for an internal field <seltab>.
  2. The database table must be declared with TABLES.
  3. The <selopt> name can be up to 8 characters. 
  4. Cannot have type F.
  5. Comments on the left side of the input fields can be changed using Selection Texts.
  6. The <selopt> has the same format as RANGE tables  
Additions the same as for PARAMETERS:
  1. NO-DISPLAY
  2. LOWER CASE
  3. OBLIGATORY
  4. MEMORY ID <pid> 
  5. MATCHCODE OBJECT <mobj> 
  6. MODIF ID <key>

Specific additions:
  1. DEFAULT <f1> [TO <f2>] [OPTION <option>] [SIGN <sign>] - fills 1st line of <selopt> with default value or interval (if both <f1> and <f2>). <f1> and <f2> can be either a literal or a field name. Default values transported before INITIALIZATION. Therefore, default can be only fields which are already filled when the user starts the program (e.g. SY-...).  
  2. <option>:  single values - EQ, NE, GE, GT, LE, LT, CP, or NP. The default value is EQ;  
  3. Intervals - BT or NB. The default value is BT. 
  4. <sign> = I|E (Incllude|Exclude). The default value is I; 
  5. NO-EXTENSION - forbids multiple selection(); 
  6. NO INTERVALS - hides TO-field (but an interval is still can be selected using the  button.Use the function module SELECT_OPTIONS_RESTRICT to completely forbid intervals); 
  7. NO DATABASE SELECTION - if a logical database is attached to the report program and a selection criterion is connected to a database table, which is also part of the logical database, and if that database table is designated for a dynamic selection, the system transfers the corresponding selection criteria to the logical database. The logical database does not read lines from the database table that do not meet these selection criteria. If you want the logical database to read these lines anyway, for example, when you use the selection criteria for other purposes than limiting database accesses, use the NO DATABASE SELECTION. 


     

No comments:

Post a Comment