Navigating SAP ABAP: Deep Dive into Selection Screens, Parameters, and Select-Options for Effective Input Management
Welcome back everyone, we were discussing about types of internal table till our last blog. For previous concepts kindly follow the previous blogs. From today on we are going to start with Selection screen.
Selection Screen :-
-
Selection Screen is also known as Input Screen.
-
With the help of selection screen user provides a input to the program.
What is the Screen Number of Selection Screen ?
→Every Selection Screen or Input Screen always has the number 1000 (It is the standard selection screen).
How to Find the screen number ?
-
Step 1 :- Click on Environment.
-
Step 2 :- Click on status.
-
you can find the screen number in the status.
Input to the Program :-
There are 2 ways to provide the input to the program.
- Parameters
- Select-Options
1. Parameters :-
-
Select-Options are used to pass the single input.
-
The various parameters variations are as follows :-
- PARAMETERS<p> ……….. DEFAULT <f> …
- PARAMETERS<p> ……….. OBLIGATORY …
- PARAMETERS<p> ……….. AS CHECKBOX …
- PARAMETERS<p> ……….. RADIOBUTTON GROUP <radi> …
2. Select-Options :-
- Select-options are used to pass a range of inputs.
- The various Select-Options variations are as follows :-
-
SELECT-OPTIONS <seltab> FOR <f> …. DEFAULT <g>[TO <h>]
-
SELECT-OPTIONS <seltab> FOR <f> …. NO-EXTENSION
-
SELECT-OPTIONS <seltab> FOR <f> …. NO INTERVALS
-
SELECT-OPTIONS <seltab> FOR <f> …. OBLIGATORY
-
Practical Implementation Of Parameters :-
Requirement :- Create a Program and take a single input.
-
Step 1 :- Go to ABAP Editor (SE38) and create a executable program.
-
Give a parameter name and activate the program.
-
Step 2 :- Click Goto → Text Elements → Selection text → provide a manual or default name of your parameter → click on activate.
How to give a default value to the parameters?
Ans :- Suppose, the Customer Says, I want a default value 1 on the selection screen when I execute the program.
-
When You will execute the above code, you will see a default value 1 on selection screen.
How we can make a parameter mandatory ?
That means, we must feel some data in the field on the selection screen before we execute the program.
Ans :-
-
Now, execute the program, and don’t enter any input into the order number and try to execute it → you see a error message at the below of screen.
How to Create a radio button ?
-
We have created three radio buttons of same group above, now to text elements and give some name for it, so that it should have some meaning full names.
-
You can also mark radio button on selection screen as default true.
-
In the above program, I have marked the second parameter as default, Now execute the program.
- We can see the second parameter is marked as true.
How to create a checkbox using Parameters :-
-
let’s create two checkboxes.
-
Activate the program and give some meaningful name to these checkboxes from selection texts.
-
Now execute the program → you will see two checkboxes on the selection screen.
Practical Implementation Of Select-Options :-
1. How to create a select-options?
-
Activate the program and give a meaningful description for the above text in selection text and execute the program.
Note :- In select option we have range of input from low to high.
How to create a select option with only low field ?
-
No intervals is used to achieve this requirement.
-
Execute the program.
-
We can also remove the extension sign from above.
-
Execute the program.
-
So, this is how we can represent a select option as a parameter.
So, this is enough for today.
In the next blog we will see some more features.
Thanx alot for being a part of this wonderful journey.
Comments
Post a Comment