‎2008 Apr 20 7:19 AM
what is the use of Initialization event and what we need to declare in Initialization event.
Plz answer quickly with an example,urgently needed?Points will be awarded undoubedly.
‎2008 Apr 20 7:58 AM
Hi,
Initialization is nothing but when the program starts to run the INITIALIZATION event 'll be called first... i.e, before start of selection this event 'll be called..... In initialization event u can initialize the variable values.
for eg:
SELECT-OPTIONS: A1 FOR MARA-MATNR.
INITIALIZATION.
A1-LOW = '100'.
A1-HIGH = '1000'.
APPEND A1.
Thanks,
Arunprasad.P
Reward if useful.
‎2008 Apr 20 7:58 AM
Hi,
Initialization is nothing but when the program starts to run the INITIALIZATION event 'll be called first... i.e, before start of selection this event 'll be called..... In initialization event u can initialize the variable values.
for eg:
SELECT-OPTIONS: A1 FOR MARA-MATNR.
INITIALIZATION.
A1-LOW = '100'.
A1-HIGH = '1000'.
APPEND A1.
Thanks,
Arunprasad.P
Reward if useful.
‎2008 Apr 20 5:13 PM
Hi ajaya moharana,
INITIALIZATION:It is triggered before the standard selection screen is displayed.
You can use it, for example, to initialize the input fields of the standard selection screen. This is the only possible way to change the default values of parameters or selection criteria defined in logical databases. To change a selection criterion, you must fill at least the components <seltab>-SIGN,
<seltab>-OPTION, and <seltab>-LOW of the selection table <seltab>, otherwise it remains undefined.
To fill normal selection screen fields u can use You can use AT SELECTION-SCREEN OUTPUT event as well.
Ex:
I hope that it helps u .
Regards,
Venkat.O
PARAMETERS DATUM TYPE SY-DATUM DEFAULT SY-DATUM.
INITIALIZATION.
datum = sy-datum.
‎2008 Apr 21 4:30 AM
Hi,
In many cases you need to calculate the value and then put it in selection criteria. For example, say, you are accepting date from user and you need to fill in the default value for lower range as sy-datum ? 30 days and sy-datum for higher range. In this case you are calculating lower range and then filling the criteria. This can be done in INITIALIZATION event. Piece of code to do the above task would look like the following:
Tables: Sflight.
Select-options: fldate1 for sflight-fldate.
INITIALIZATION.
Data: date1 like SY-DATUM.
Date1 = sy-datum ? 30.
Fldate1-low = date1.
Fldate1-high = sy-datum.
Append fldate1.
Here appending is required because fldate1 is int? table
This event is triggered when you execute your program for the first time i.e., before selection screen is displayed.
Pls. reward if useful....
‎2008 Apr 21 7:06 AM
Hi,
To initalise the values to the selection screen parameters.
Selection-screen : p_matnr like matnr.
initialization.
P_matnr = '10290'.
when you execute the report the parameter value will be automatically 10290
is assigned.
otherwise you can do manipulations too.
Selection-screen : p_date like sy-datum.
initialization.
P_matnr = sy-datum - 10.
This will dynamically validates the sytem date by difference with
10 to the parameter.
Regards,
Madhavi