0% found this document useful (0 votes)
3K views4 pages

SAP ABAP TUTORIALS - Selection Screen - Radiobutton, Checkbox Using Parameter Statement

The document discusses using parameters in ABAP to create selection screens with radio buttons, checkboxes, and default values. It provides examples of how to: 1) Make parameters mandatory using the OBLIGATORY keyword. 2) Set default values for parameters using the DEFAULT keyword. 3) Create radio buttons using the RADIOBUTTON keyword and ensure only one can be selected from a group. 4) Create checkboxes using the CHECKBOX keyword and allow multiple selections.

Uploaded by

vara421
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3K views4 pages

SAP ABAP TUTORIALS - Selection Screen - Radiobutton, Checkbox Using Parameter Statement

The document discusses using parameters in ABAP to create selection screens with radio buttons, checkboxes, and default values. It provides examples of how to: 1) Make parameters mandatory using the OBLIGATORY keyword. 2) Set default values for parameters using the DEFAULT keyword. 3) Create radio buttons using the RADIOBUTTON keyword and ensure only one can be selected from a group. 4) Create checkboxes using the CHECKBOX keyword and allow multiple selections.

Uploaded by

vara421
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

7/3/2014 SAP ABAP TUTORIALS: Selection screen : radiobutton , checkbox using parameter statement

http://abaptopics.blogspot.in/2014/07/selection-screen-radiobutton-checkbox.html 1/5
Wednesday, 2 July 2014
Selection screen : radiobutton , checkbox using parameter
statement
Making parameter as Mandatory field (Required field) :
To make a parameter field mandatory or required field , we have to use the
obligatory keyword.
REPORT ZTEST_PARAMETER.
PARAMETERS : p_matnr TYPE mara-matnr OBLIGATORY.
Output :



For mandatory parameters , a tick mark will appear at the input field as
shown in the figure above . If the field is blank , the user cannot execute
(F8) the program to come out of selection screen instead the user can only
use standard toolbar buttons Exit , Back or Cancel .
Default values for parameter :
The user can assign default value to a parameter by using default keyword
and after that passing the default value . The user can change the value
anytime if it is required .
REPORT ZTEST_PARAMETER.
PARAMETERS : p_matnr TYPE mara-matnr DEFAULT '100000000000',
P_DATE TYPE SY-DATUM DEFAULT SY-DATUM,
P_NUM TYPE I DEFAULT 100.
Output :

I am a SAP Professional with core
experience in ABAP programming
especially in Object Oriented
ABAP. I also prov ide online
trainings , classroom trainings on
weekends and also work as a
freelancer .
Contact :
[email protected]
https://www.facebook.com/roush
ankumsingh
Phone : +919573445833
Location : Hyderabad , India
Contact Me
Object Oriented ALV ( OO ALV )
TUTORIALS
Roushan Kumar
google.com/+RoushanKumarSAP
SAP ABAP Professional , Trainer
and Freelancer
46 followers
Follow
Google+ Badge
Roushan Kumar
46 have me in
circles
View
all
Add to circles
Google+ Followers
1

More

Next Blog Create Blog

Sign In
7/3/2014 SAP ABAP TUTORIALS: Selection screen : radiobutton , checkbox using parameter statement
http://abaptopics.blogspot.in/2014/07/selection-screen-radiobutton-checkbox.html 2/5





Radio Buttons :
The users can create radio buttons with the help of PARAMETERS statement.
Syntax :
Parameter <parameter_name> radiobutton group
<radiobutton_group_name>.
Parameter : rad1 radiobutton group r1 default X,
rad2 radiobutton group r1.
Now with the help of above statement , rad1 and rad1 two radio buttons will
be created . Both are of type char and length 1 and both are assigned to
radiobutton group r1.
NB :
1.Every Radiobutton group will have atleast two radio buttons.
2.Default clause is used to assign the default value to a radio button.
3.By default , the first radio button of a Radiobutton group is selected.
4.If a radio button is selected , its value will be equal to X , if deselected its
value will be equal to (space / blank).
5.Only one of the many radio button of a particular radiobutton group will
be selected at a time.
Now please refer to the following source codes :

Program 1 :
PARAMETERS : rad1 RADIOBUTTON GROUP r1 DEFAULT 'X',
rad2 RADIOBUTTON GROUP r1,
rad3 RADIOBUTTON GROUP r1.
Output :
2014 (55)
July (1)
Selection screen : radiobutton ,
checkbox using pa...
June (14)
May (26)
April (9)
March (3)
February (2)
2013 (5)
2012 (2)
Blog Archive
HOME
Pages
7/3/2014 SAP ABAP TUTORIALS: Selection screen : radiobutton , checkbox using parameter statement
http://abaptopics.blogspot.in/2014/07/selection-screen-radiobutton-checkbox.html 3/5








Program 2 :
SELECTION-SCREEN : BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) text-001 FOR FIELD rad1.
PARAMETERS : rad1 RADIOBUTTON GROUP r1 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 34(20) text-002 FOR FIELD rad2.
PARAMETERS : rad2 RADIOBUTTON GROUP r1.
SELECTION-SCREEN COMMENT 69(20) text-003 FOR FIELD rad3.
PARAMETERS : rad3 RADIOBUTTON GROUP r1.
SELECTION-SCREEN : END OF LINE.
Output :

Program 3 :
PARAMETERS : rad1 RADIOBUTTON GROUP r1 DEFAULT 'X',
rad2 RADIOBUTTON GROUP r1,
rad3 RADIOBUTTON GROUP r1.
IF rad1 = 'X'.
WRITE : / 'First radiobutton is selected'.
ELSEIF rad2 = 'X'.
WRITE : / 'Second radiobutton is selected'.
ELSEIF rad3 = 'X'.
WRITE : / 'Third radiobutton is selected'.
ENDIF.
Output :
7/3/2014 SAP ABAP TUTORIALS: Selection screen : radiobutton , checkbox using parameter statement
http://abaptopics.blogspot.in/2014/07/selection-screen-radiobutton-checkbox.html 4/5
Older Post Home
Posted by Roushan Kumar at 06:28


Checkboxes :
The users can create checkboxes with the help of PARAMETERS statement.
Syntax :
Parameter <parameter_name> as checkbox.
PARAMETERS : ch1 as CHECKBOX.
Ch1 is the parameter name , one checkbox is created with name ch1 .
Ch1 will be of type char and length 1.
NB :
1.Similar to radio button if a checkbox is selected , its value will be equal to
X , if deselected its value will be equal to (space / blank).
2.You can select multiple checkbox at the same time but only one of the
many radio buttons of a particular radiobutton group will be selected at a
time .


+1 Recommend this on Google
Enter your comment...
Comment as:
Google Account
Publish

Preview
No comments:
Post a Comment

You might also like