‎2008 Feb 07 10:27 PM
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
‎2008 Feb 07 11:42 PM
‎2008 Feb 08 1:06 AM
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.
‎2008 Feb 08 1:30 AM
Hello
Check this
REPORT demo_sel_screen_parameters_spa .
PARAMETERS test(16) TYPE c MEMORY ID rid.
It works .
Praveen
‎2008 Feb 08 1:42 AM
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
‎2008 Feb 08 2:25 AM
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.
‎2008 Feb 08 2:58 AM
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.