Lesson 15 – Taking Simple Inputs from Users

Lesson 15 – Taking Simple Inputs from Users


In order to take input from users, we will use PARAMETERS option in SAP.


Parameters – Parameters are nothing but the simple text boxes used to take single input from the users. If user has to provide single value then we will use parameter.


Syntax – Parameters : <parameter name> type <data type>.


Example – Parameters : p_num1 type i,
p_num2 type i.

Data : v_total type i.

v_total = p_num1 + p_num2.

write : ‘The value of v_total is -‘, v_total.



Selection Screen – User Input screen is called as SELECTION SCREEN. This is the place where we will take necessary inputs from the users for further processing.



Selection Text – Selection Texts are the hard coded text like constants which will appear in the reports or outputs as an when required.



Menu Path – GOTO >> Text Elements >> Selection Texts.


Step 1 – Enter text for relevant parameter.
Step 2 – SAVE & Activate it.
Step 3 – Back (F3)



Parameter Options –


1) Obligatory – Obligatory means compulsory in simple terms without entering which you cannot go ahead.


Syntax – Parameters : <parameter name> type <data type>.


Example – Parameters : p_num1 type i obligatory.



2) Default – If some parameter is set as default, it will be selected by default when the program loads. Default option is used for radio buttons and check boxes.


Example is shown below with Check box and radio buttons.



3) Checkbox – Checkbox is used to provide the tick box and get the single or multiple inputs as TICK from the users.


Syntax – Parameters : <parameter name> as checkbox default ‘X’,
<parameter name> as checkbox.


Example – Parameters : c_rb1 as checkbox default ‘X’,
c_rb2 as checkbox.



4) Radiobuttons – Radio buttons are used to get the single input from the user. Radio buttons are used in group. Difference between check box and radio buttons are check box can be selected as multiple whereas radio buttons only one can be selected at a time from the group.


Syntax – Parameters : <parameter name> as radiobutton group <group name> default ‘X’,
<parameter name> as radiobutton group <group name>.


Example – p_rb1 as radiobutton group rg,
p_rb2 as radiobutton group rg default ‘X’.


5) No-display – It is used only with parameter as integer variable. That parameter will get
invisible from the selection screen.


Syntax – Parameters : <parameter name> type <data type> no-display.


Example – Parameters : p_cb type i no-display.



NOTE : There is one more option to take simple input in SAP called SELECT-OPTIONS which we will discuss in detail after few more lessons.

Add a Comment

Your email address will not be published. Required fields are marked *