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 Default Values

Former Member
0 Likes
6,832

Hi,

The selection screen can have the default values by using the parameter ID. To be the parameter ID value to defaulted we normally add the entry in User Profile>Own data>paramters with Parameter ID and the value.

I would like to know is there any other way to achieve the same, it could be parameter or select-options.

With Regards,

Azhar

6 REPLIES 6
Read only

Former Member
0 Likes
4,074

Please rephrase your question..

Read only

Former Member
0 Likes
4,074

Hi,

If the value to be defaulted is independant of any conditions, use can use the DEFAULT addition to the selection screen fields decalarations.

If the value is dependant on certain criteria,

You can use the INITIALIZATION event to derive the values and assign it to parameter or select-option.

Read only

Former Member
0 Likes
4,074

Hello

Check this

REPORT demo_sel_screen_parameters_spa .

PARAMETERS test(16) TYPE c MEMORY ID rid.

It works .

Praveen

Read only

Former Member
0 Likes
4,074

In my experience, it is better not to use the DEFAULT addition for selection screen parameters. Usually, this will eventually result in a change to the default value when business circumstances change.

You can aviod this if you simply use a variant to maintain all your default values.

Regards

Kurt

Read only

Former Member
0 Likes
4,074

For Parameter u can use DEFAULT keyword

eg. PARAMETERS: p_matnr TYPE mara-matnr DEFAULT 'B1200'.

For select option

As u might be knowing select options creates an intenal table, so if u want to have some default values then u can use the following code in the INITIALIZATION event:

DATA: v_matnr TYPE mara-matnr.

INITIALIZATION.

SELECT-OPTIONS: s_matnr FOR v_matnr.

s_matnr-low = 'BT100'.

s_matnr-high = 'BT900'.

append s_matnr.

This will give default values in the selection screen for select-options.

Read only

Former Member
0 Likes
4,074

hi Azhar, another method other than parameter ID, is like this:

There is a standard option for this. On the Web Application Designer general settings there is an option called "Reset Variables to Default Values" which will achieve what you are after. No code needed in user exits.hope this helps u.

cheers,

Hema.