02-19-2008 11:42 AM
hi to all,
Will you tell me the difference between "default" and "initialization" in report programming.
02-19-2008 11:47 AM
Hi,
in selection screen if u want the some defalut value to be passed with out any calculations or something else like that then we will use default.
for exampl in the slection screen u have a filed to ener date there by default u want to display some default date as todays date then
parameters:
p_date like sy-datum default sy-datum.
but initialization is a event which triggers even before the selection screen comes so if u want some calculations to be performed then u will write there and get the value and u will display it in selection scren.
ex:
if u want to displays two days back date as default
then
parameters:
p_date like sy-datum.
initilization.
p_date = sy-datum - 2.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 19, 2008 5:33 PM
02-19-2008 11:47 AM
Hi,
in selection screen if u want the some defalut value to be passed with out any calculations or something else like that then we will use default.
for exampl in the slection screen u have a filed to ener date there by default u want to display some default date as todays date then
parameters:
p_date like sy-datum default sy-datum.
but initialization is a event which triggers even before the selection screen comes so if u want some calculations to be performed then u will write there and get the value and u will display it in selection scren.
ex:
if u want to displays two days back date as default
then
parameters:
p_date like sy-datum.
initilization.
p_date = sy-datum - 2.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 19, 2008 5:33 PM
02-19-2008 11:49 AM
02-19-2008 11:49 AM
HI,
The INITIALIZATION event is processed exactly once in an executable program. You can supply default values to the selection screen fields of the logical database during this event.
You can use F1 Help (Technical help) to determine the names of the selection fields.
You can use the addition DEFAULT to supply additional report-specific default values to selection screen fields in a selection-option statement. The value sets are entered in the internal table during this event.
02-19-2008 11:50 AM
Hi,
Default is one of the slection screen statement used to default a value in a particular parameter in the selction screen.
Where as initialization is a event in reports where you can initilize values in all typesof fields in the selction screen.
for example you cannot initialize value into select option in selction screen using a default statement but you can intialize it by wariting a code in initialization event.
Thanks
Kiran.
02-19-2008 11:52 AM
Hi friend,
In selection screen if we want to give default values then we will use this default option and initialization event.
Here the difference is in initialization event we can give more than one value.we can append values to selection options internal table but using default we cannot do this.
<REMOVED BY MODERATOR>
Regards,
Swetha.
Edited by: Alvaro Tejada Galindo on Feb 19, 2008 5:35 PM