11-05-2007 7:39 AM
hi plz tell differences b/w the difference b/w intialization and default..
11-05-2007 8:40 AM
Hi
Initialization comes BEFORE default ( i meen before4 selection screen default,if that what you meant ).
Regards
Yossi
11-05-2007 10:14 AM
Hi,
If u want give some input to selection fields.
Initialization event triggers before the selection screen is displayed.
It is not only the parameters default value
which are required/accessed/controlled
in initialization event.
2. In a program there are so many variables,
the values of these variables
can be set in intiailization event.
3. Such values sometimes cannot be hardcoded.
They may be requried to fetch from database
or do some calculations,
(which is not possible while declaration
data and parameters)
4. Sometimes, some variant can also be imported
for selection screen.
5.This event is invoked directly after LOAD-OF-PROGRAM and before the selection screen processing of any existing standard selection screen.
This gives you the one-time opportunity to initialize the input fields of the selection screen, including those defined in the logical database linked with the program.
When run in background, values initialized in initialization event are considered.
For eg: if you want to initialize like this:
carrid-sign = 'I'.
carrid-option = 'EQ'.
carrid-low = 'AA'.
carrid-high = 'LH'.
APPEND carrid TO carrid.
You cannot achieve this by giving 'default' or 'value' at selection-screen.
11-06-2007 3:42 PM
Hi,
tables sflight.
select-options s_fldate for sflight-fldate default '20030101' to
'20031231' option bt sign i.
*initialization.
*clear s_fldate[].
*s_fldate-low = '20060101'.
*s_fldate-high = '20061231'.
*s_fldate-option = 'BT'.
*s_fldate-sign = 'I'.
*append s_fldate.
start-of-selection.
select single * from sflight into sflight where fldate in s_fldate.
write:/ sflight-fldate.
Note: remove the comment for initialization, and execute, found the difference!
Try this,
KC