‎2006 Apr 13 9:28 AM
Hi All
We can assign default values to the parameters or select options using default addition or we can initialize the same in Initialization event
Can anybody plz tell me whatz the difference between two cases and when to use which alternative
Thanks in Advance
and plz tell me how to close the thread
‎2006 Apr 13 9:38 AM
Hi,
adding to above you cannot give default values for select options like include, exclude, between , equal options that can be done only with initialization event.
dynamic defaults can be done in initialization , you cannot default in selection screen with dynamic values as stated above.
Regards
vijay
‎2006 Apr 13 9:34 AM
hi,
When u use default value for the parameter it is contants.
but when use initialize in inilize event value u specify is dynamically generated.
eg :-
initialize.
para1 = sy-datum + 7.
select something from table into itab
para2 = itab1-key1.
feel free to ask any question.
mark helpfull answers
Regards
manoj
Message was edited by: Manoj Gupta
‎2006 Apr 13 9:38 AM
Hi,
adding to above you cannot give default values for select options like include, exclude, between , equal options that can be done only with initialization event.
dynamic defaults can be done in initialization , you cannot default in selection screen with dynamic values as stated above.
Regards
vijay
‎2006 Apr 13 9:47 AM
Hey vijay
we can assign default values to sign (I,E), option (LT,GT..)fields of select options using
select-options fnane for <ref> default sign..option..
and you said we cannot default in selection screen with dynamic values .. i din get what exactly u r trying to say.. coz we can assign default values in selection screen also
‎2006 Apr 13 9:53 AM
Hi nikita,
Check the Amit answer for dynamic values .if you want to assign certian data from data base to selection screen then you need to go for initialization.
regards
vijay
‎2006 Apr 13 9:53 AM
Nikita,
Unless you append the I,E, LT, GT values, it will not be reflected in the SELECT-OPTIONS, right and you cannot use the append option it the DEFAULT setting.
If you have process something before you arrive at a value that cannot be done in DEFAULT, where as you can do that in INITIALIZATION.
Regards,
Ravi
Note : Please mark the helpful answers
‎2006 Apr 13 10:04 AM
ya Ravi u r right
but that will be the case if i want to add more than one record to the selection table
But if i just wann give single record than that i can do using default addition without using Initialization Event
Isnt it??
‎2006 Apr 13 10:08 AM
Nikita,
Yes that is the case even if you have append one record to the SELECT OPTIONS, Unless you append it, that same will NOT be considered, and you cannot APPEND while defaulting, right?
Regards,
Ravi
Note : Please mark the helpful answers
‎2006 Apr 13 10:18 AM
I will try this first
Anyways Thanks a lot for your responses and
plz tell me how to close the thread
‎2006 Apr 13 9:41 AM
Hi nikita,
1. good question.
2. when we use default,
we have to HARDCODE the value in the program.
3. but suppose, u want to
pick some field from database,
and show it as default,
then,
DEFAULT won't work.
(bcos we have to write code for getting data first)
4. In such cases, we use INITIALIZATION event.
5. Other wise there is no difference.
regards,
amit m.
‎2006 Apr 13 10:01 AM
HI
GOOD
PARAMETERS
Declares parameters for a selection screen.
Syntax
PARAMETERS <p>[(<length>)] [TYPE <type>|LIKE <obj>] [DECIMALS <d>]
[DEFAULT <f>]
[MEMORY ID <pid>]
[LOWER CASE]
[OBLIGATORY]
[VALUE CHECK]
[AS CHECKBOX]
[RADIOBUTTON GROUP <radi>]
[NO-DISPLAY]
[MODIF ID <key>].
SELECT-OPTIONS
Declares selection criteria for a selection screen.
Syntax
SELECT-OPTIONS <sel> FOR <f>
[DEFAULT <g> [to <h>] [OPTION <op>] SIGN <s>]
[MEMORY ID <pid>]
[LOWER CASE]
[OBLIGATORY]
[NO-DISPLAY]
[MODIF ID <key>]
[NO-EXTENSION]
[NO INTERVALS]
[NO DATABASE SELECTION].
THIS IS THE WAY TO PASS THE VARIOUS PARAMTERS IN SELECT-OPTIONS AND PARAMTER STATEMENTS, AND YOU CAN USE THEM AS PER YOUR REQUIREMENTS
THANKS
MRUTYUNJAYA TRIPATHY
‎2006 Apr 13 10:20 AM
Nikita,
You can click on the stars on the left side of the screen, and by clicking "Solved Problem" you close the thread.
Please mark all the helpful answers.
Regards,
Ravi
‎2006 Apr 13 10:29 AM
Thanks to All
for your quick responses
I got the funda
Thanks Once again