Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Why Selection Screen over and Screens?

former_member207873
Participant
0 Kudos

Hello Experts,

When everything that can be achieved through selection screens can be achieved through screens, in what scenario do we generally use selection screens. I also need a clarification on the point which i got from an authorized source that says , "Unlike general screens selection screens can be used as a data interface of a program when it is called by the SUBMIT statement." Can it be achieved though screens as well?

Regards,

Sam.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Sam ,

Even though we can use screens for all requirement we use selection screen as they are

simple in declaration & easy to handle it.

Screens are used mainly in Module Pool programming.Its upto developer comfort level.

Most of them are not comfortable in designing screens so mostly prefer Selection screens.

The SUBMIT statement accesses an executable program rep. The executable program is executed as described under Calling Executable Reports. If the called program contains a syntax error, an exception is raised that cannot be handled. It cannot be used to call Module pool programs.

10 REPLIES 10

Former Member
0 Kudos

Hi Sam,

Selection Screen is used to obtain input form the users. The Selection Screen is generated only when there is a PARAMETERS statement in the report.

The Screens are used for displaying the output to the user such as list of information.

Example:

Suppose you want to display the states belonging to a particular country, then in the selection screen you provide a dropdown list for selecting the country that the user is interested in. After selecting the country, on executing, on the next screen (which is also called as output screen) the states belonging to selected country will be populated along with State ID, State Name, etc in the list format.

Former Member
0 Kudos

Hi Sam ,

Even though we can use screens for all requirement we use selection screen as they are

simple in declaration & easy to handle it.

Screens are used mainly in Module Pool programming.Its upto developer comfort level.

Most of them are not comfortable in designing screens so mostly prefer Selection screens.

The SUBMIT statement accesses an executable program rep. The executable program is executed as described under Calling Executable Reports. If the called program contains a syntax error, an exception is raised that cannot be handled. It cannot be used to call Module pool programs.

karun_prabhu
Active Contributor
0 Kudos

Hi Sam Pot,

     Selection screen is present in report programs. You cannot edit this using screen painter.

     User gives required input(s) via selection-screen and views the output.

     Normal screens are used in module pool programs.

     Here user is expected to give inputs over many screens to perform some transaction.    

     Regards.

Former Member
0 Kudos

Selection screens let a coder get the user inputs with minimal programming effort.

It is in use because it is a time-saver, and when selection screen is not good enough, you revert to screens.

By just writing a line (parameters or select-options), you get a selection screen.(without opening screen painter and PBO PAI modules).

former_member184569
Active Contributor
0 Kudos

The main advantage of a selection screen is the simply ease with which we can create one.

Just take an example where you need a screen having three input parameters.

For screen, you need to create a screen using Se51, create the input output fields in the layout with the corresponding text fields one by one. Make all the initial preparations like Setting GUI using menu painter 'SE41', give title to the screen, etc in the PBO. And code some basic actions, like exiting the screen in the PAI.

Now when we use the selection screen.

Paramters p_para1 type vbeln,

                   p_para2  type bukrs,

                   p_para3 type budat.

And provide the selection texts for these parameters.

Its done, Rest everything is done by the system. We dont have to do anything in the PBO and PAI to get it working. At the same time, SAP has provided event blocks like at selection screen , at selection screen output, if you want to make enhancements to the standard PBO and PAI .

And the complication in implementing the features in select-options with screen, I guess I need not mention.

Definitely, I am glad that SAP has provided the option of selection screen. And will move to creating screen only when I need to implement more complicated functionality. 

Former Member
0 Kudos

SELECT-OPTIONS: To declare an internal table that is also linked to input fields on a selection screen

HIGH

LOW

SIGN

OPTION

We have Inclusion and Exclusion dynamically.

You can * input to selection-options

You can use patterns

Well designed by default

Can the above features be achieved by Screen fields just by declaration.

To achieve all the above features for screen fields code should be static and you can give only one single input.

You can find a lot of differences if you work more on select-options.


former_member207873
Participant
0 Kudos

Hello All,

Can we have 4 or 5 selection screens in succession without much programming hectic? Is selection screen solely for the purpose of receiving inputs from user? What about calling one report from a push button in selection screen?

Regards,

Sam.

0 Kudos

You can call another report from a selection screen pushbutton


SELECTION-SCREEN :
   BEGIN OF LINE,
     PUSHBUTTON 5(10) text-010 USER-COMMAND cli1,
   END OF LINE.


AT SELECTION-SCREEN.
  

CASE sscrfields.
     WHEN 'CLI1'

          submit report1 and return.

endcase.

Now report 1 can have a totally new set of selection screen parameters. This can in turn call another report with a new selection screen.

Hope I have answered your query.

Former Member
0 Kudos

HI,

The simple reason for using selection screen is to reduce the coding effort.Also selection screen provides us the options to

1.enter multiple range of values.

2.including and excluding range of values.

Also the selection screen validations are easy.

AT-Selection screen event will make validation process easy.

these are the reasons for using selection screen over screen.

Thanks,

Dinesh.

Former Member
0 Kudos

Hi Sam-

SELECTION SCREEN

----------------------------------------------------------------------------------------------------

Advantages:

1. Selection screens provide automatic creation of PAI and PBO modules.

2. STATUS used in the menu of the program were automatically provided WITH FUNCTIONALITIES.

3. Less programming efforts.

4. Can be easily maintained when there is a sudden change on parameters, select-options and etc..

Disadvantages:

1. When one of your requirement/goal is to modify one of the parameters on the screen or if the task is to add a subscreen when the user clicks a button. Since the screen is automatically generated, you cannot just modify the generated screen. Why? When you modify it, have it activated, and then you forgot to add a new parameter like.. P_INPUT TYPE i, and you declared it again into the code, your changes on the SCREEN (the subscreen thing) will be lost. The change of parameters of the selection screen will reset the corresponding codes on modules (PBO and PAI) into new one neglecting your changes.

SCREENS

----------------------------------------------------------------------------------------------------

Advantage:

1. Very useful with subscreens (with SHOW and HIDE)

2. STATUS can be configured on which button should be displayed and/or disabled

Disadvantages:

1. Cannot be easily be maintained.

2. STATUS should be added manually on creation.

3. FUNCTIONALITIES of each button should be created on the modules.

4. when there is an addtion of parameter/s, you have to go to screen and manually create new one.

-Bert

Message was edited by: bert becher