Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

difference between "default" and "initialization"

Former Member
0 Kudos

hi to all,

Will you tell me the difference between "default" and "initialization" in report programming.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos

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

0 Kudos

hi, thanq and my doubt was resolved.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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