Application Development and Automation 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: 
Read only

selection screen values

Former Member
0 Likes
639

Hi

I have a requirement, on the selection screen i have to pre-fill the values.....Can somebody tell me how it can be done....

useful solutions will be rewarded

5 REPLIES 5
Read only

Former Member
0 Likes
606

Hi,

1st method

U can use DEFAULT Addition for every selection screen element ur using in the program.

2nd Method

After displaying selection screen set all values to selction screen fields and save it as variant.

U have to click on save button to save it as variant.

Read only

Former Member
0 Likes
606

Hi Peter,

For Parameters :

1. By giving default you can fill the values .

2 By initalization also you can fill the selection screen parameters.

for example in the selection screen u have a filled to enter date there by default u want to display some default date as todays date then

parameters:

p_date like sy-datum default sy-datum.

but initialization is a event which triggers even before the selection screen comes so if u want some calculations to be performed then u will write there and get the value and u will display it in selection scren.

ex:

if u want to displays two days back date as default

then

parameters:

p_date like sy-datum.

initilization.

p_date = sy-datum - 2.

Rewards,

Madhavi

Read only

0 Likes
606

The above solutions will work fine if the screen fields are loaded with one specific value every time you enter the program.

There are two other options to load selection screen values.

INITIALIZATION and LOAD-OF-PROGRAM.

In both of these "section" you can write code to fill in any of the fields.

Paramaters being a single value field can be loaded with parmname = <your value>.

Selection-options are ranges and can also be loaded here by filling the range.

This is an example


INITIALIZATION.
  CLEAR: r_cred_action, r_cred_action[].
  CLEAR: r_lot_action,  r_lot_action[].

  r_cred_action = 'IEQ'.
  r_cred_action-low = '02'.
  APPEND r_cred_action.
  r_cred_action-low = '05'.
  APPEND r_cred_action.
  r_cred_action-low = '06'.
  APPEND r_cred_action.

  r_lot_action = 'IEQ'.
  r_lot_action-low = '02'.
  APPEND r_lot_action.
  r_lot_action-low = '03'.
  APPEND r_lot_action.
  r_lot_action-low = '04'.
  APPEND r_lot_action.
  r_lot_action-low = '05'.
  APPEND r_lot_action.
  r_lot_action-low = '06'.
  APPEND r_lot_action.
  r_lot_action-low = '07'.
  APPEND r_lot_action.

Read only

Former Member
0 Likes
606

Hai Johny Valitino,


parameters: p1 type i,
                  p2 type i,
                  p3 type i,
                  p4 type i.

initialization.

p1 = 1.

p2 = 2.

p3 = 3.

p4 = 4. 

then it will display in screen.

Regards.

Eshwar.

Read only

Former Member
0 Likes
606

You can do in the INITIALIZATION event of your program.



parameters: p_param1 type i.

INITIALIZATION.
  p_param1 = 25.

You can do it by using DEFAULT addition.



parameters: p_param1 type i default 25.

Hope this helps.

Thanks,

Balaji