Search this site

Monday, December 27, 2010

Blocking Selection Screen

•Example
– SELECTION-SCREEN BEGIN OF BLOCK rad1 WITH FRAME TITLE text-002.
PARAMETERS vendor RADIOBUTTON GROUP gr1.
PARAMETERS customer RADIOBUTTON GROUP gr1.
PARAMETERS material RADIOBUTTON GROUP gr1.
SELECTION-SCREEN END OF BLOCK rad1.

Positioning in the Selection Screen

• To position the next parameter or comment on the selection screen, the
POSITION option is used.
• Syntax
– SELECTION-SCREEN POSITION .
• For , you can specify a number, POS_LOW, or POS_HIGH.
• To create a logical block of elements on the selection screen, mark the
beginning of the block with the BEGIN OF BLOCK option of the
SELECTION-SCREEN statement, then define the individual elements and
mark the end of the block with the END OF BLOCK option as shown below:
– SELECTION-SCREEN BEGIN OF BLOCK
[WITH FRAME]
[NO INTERVALS].
SELECTION-SCREEN END OF BLOCK .
• Blocks can be nested.

Elements on a Single Line

• To position a set of parameters or comments on a single line on the selection
screen, the elements are declared in a block enclosed by the following two
statements:
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN END OF LINE.
Example
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(10) text-001. “ Text Symbol for Title
PARAMETERS: p1(3), p2(5), p3(1).
SELECTION-SCREEN END OF LINE.

Specifying Blank Lines

• To produce blank lines, the SKIP option is used.
Syntax
– SELECTION-SCREEN SKIP [].
• To underline a line or part of a line, the ULINE option is
used.
Syntax
– SELECTION-SCREEN ULINE [[/]]
• To write text on the selection screen, the COMMENT option
is used
Syntax
– SELECTION-SCREEN COMMENT [/]
[FOR FIELD ]

Selection screen 2


Sunday, December 26, 2010

Selection screen

• Parameters cannot have data type F. The data type F is not supported in
the Selection Screen
• To suppress the display use NO-DISPLAY option
PARAMTER P_TELNO NO-DISPLAY.
• To make a parameter a required input field, the OBLIGATORY option of the
PARAMETERS statement is used.

Example:
REPORT ztraining.
PARAMETERS: value TYPE i DEFAULT 100,
name LIKE sy-uname DEFAULT sy-uname ,
date LIKE sy-datum DEFAULT sy-datum.

• To define a checkbox for parameter input, the option AS CHECKBOX of the
PARAMETERS statement is used.
Syntax
PARAMETERS

...... AS CHECKBOX.

• To define groups of radio buttons for parameter input, the RADIOBUTTON GROUP
option of the PARAMETERS statement is used.
Syntax
PARAMETERS

...... RADIOBUTTON GROUP .

Example
PARAMETERS: yes AS CHECKBOX,
no AS CHECKBOX DEFAULT 'X'
• Selection option:
SELECT-OPTIONS Statement
SELECT-OPTIONS FOR
NO EXTENSION
OBLIGATORY
LOWER CASE
SELECT-OPTIONS allows specification of multiple values and ranges. This can only
be declared for fields within tables defined in the TABLES statement.
Example
SELECT-OPTIONS: s_kunnr FOR kna1-kunnr.



DATA Definitions

  • DATA Statement
DATA TYPE or LIKE VALUE DECIMALS
- All variables used within the ABAP/4 program must be declared with DATA
statements
- up to 30 characters in length, containing any characters other than
(, ), +, ., :
- Indicates the variable type

Example:
DATA: p_bukrs LIKE bkpf-bukrs.
DATA i_val TYPE i VALUE '99'.

  • TYPES Statement
TYPES TYPE or LIKE DECIMALS
SAP allows the creation of new user defined data types. And this does not
create a variable, BUT just a new type that can be used in creating a variable.

Example :
TYPES : cc LIKE bkpf-bukrs
DATA : c_cc TYPE cc.

Create view

1. Go to SE11. Choose 'views' option and click create.
2. Choose DB View
3. Save it in a Development class
4. In the Table column, enter the Table name on which you want to create view.
5. In the 'View Fileds' tab, enter the Table name and field nams in the respective columns and then save the view.
6. Check it and then generate the View.
7. Select 'Display Data' option from the Utilities menu and check whether the data has been loaded or not.