Sometimes we have specific requirements while designing a selection screen. We may have to place more than one Parameter (or Select Option or Radio Button). This can be easily done by using the selection screen BEGIN OF LINE / END OF LINE statements.
The following code extract will help you in designing such a selection screen.
*** Start of Code ***
DATA: l_field TYPE char10,
l_pos TYPE char4.
SELECTION-SCREEN BEGIN OF BLOCK out WITH FRAME TITLE text-s01.
* Line 1
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(15) text-010 FOR FIELD p_field1.
PARAMETERS: p_field1 LIKE l_field.
SELECTION-SCREEN COMMENT 45(15) text-011 FOR FIELD p_pos11.
PARAMETERS: p_pos11 LIKE l_pos.
SELECTION-SCREEN COMMENT 75(15) text-012 FOR FIELD p_pos12.
PARAMETERS: p_pos12 LIKE l_pos.
SELECTION-SCREEN END OF LINE.
*** End of Code ***
Output:
Instead of Parameters, you can easily have other elements like Radio Buttons or Select Options. The important thing here is that you need to keep the correct spacing and position or else you can get a selection screen generation error during activating the code, even if your code is syntactically correct.