We can help. Together we learn....

Multiple Elements in a Selection Screen Line

by Biswa | Sunday, November 09, 2008 in |

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.

2 comments:

  1. Sudhu on November 11, 2008 at 10:04 AM

    wow!! thanks. This was a pressing requirement in one of the Tools we are developing. Although I knew it would be something like that, I had neither tried it, not explored yet. Your blog made it easy

     
  2. Biswa on November 11, 2008 at 10:14 AM

    @Sudhu - Good to know that it helped you. Let us know if you have any other queries..

     

Categories