2007 Apr 30 12:52 PM
Hi,
can anyone give me in points the Diff betw Load-of-program and Initialisation events?
Useful answers wil b rewarded.
Thanx in advance!
2007 Apr 30 12:56 PM
Hi
Check this link -
http://www.sap-img.com/abap/events-related-to-reporting.htm
1. Intialization:
This is the first event will be trigerred among all the events. In this event you will assigning values to variables.
For eg: if you want to display comments on the selection -screen.
v1 = 'HAI'. and write this variable in the at selection screen then HAI will be displayed in the selection screen.
Reward points if useful..
Regards
Nilesh
2007 Apr 30 12:54 PM
Initialization is an event which will trigger before screen and carries the default values to the screen.
Load-of-program works like an event(Driver program) which controls the flow sequence of all events
2007 Apr 30 12:55 PM
Hi Pavitra
Hi Jag
It seems not so much difference. But INITIALIZATION block is peculiar to executables.
<b>INITIALIZATION:</b> Only occurs in executable programs. The ABAP runtime environment triggers the INITIALIZATION event before the selection screen is processed, at which point the corresponding event block is processed.
<b>LOAD-OF-PROGRAM:</b> When an ABAP program is loaded in an internal session, the runtime environment triggers the LOAD-OF-PROGRAM event, and the corresponding event block is executed.
just refer this link also
Regards
Rk
2007 Apr 30 12:56 PM
Hi
Check this link -
http://www.sap-img.com/abap/events-related-to-reporting.htm
1. Intialization:
This is the first event will be trigerred among all the events. In this event you will assigning values to variables.
For eg: if you want to display comments on the selection -screen.
v1 = 'HAI'. and write this variable in the at selection screen then HAI will be displayed in the selection screen.
Reward points if useful..
Regards
Nilesh
2007 Apr 30 1:00 PM
Hi Pavatra,
Intialization event trigger before the selection screen display. it will display values on the selection screen. (what u specified in the intialization event).
Load of program is event it will control sequence of all events.
Rgds,
P.Naganjana Reddy
2007 Apr 30 1:04 PM
Hi,
The purpose of load of program is to load the program into system memory so that it can be execute the program and also this is the first event in the program. After executing this event only other events is executed. Other events are
Initialization
start-of-selection
get
end-of-selection
etc all other events are triggered.
The purpose of Initialization:
1 . In initialization 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.
Don't forget ot reward if useful.
Regards,
Varun.
2007 Apr 30 1:06 PM
<b>INITIALIZATION</b>: Only occurs in executable programs. The ABAP runtime environment triggers the INITIALIZATION event before the selection screen is processed, at which point the corresponding event block is processed.
<b>LOAD-OF-PROGRAM</b>: When an ABAP program is loaded in an internal session, the runtime environment triggers the LOAD-OF-PROGRAM event, and the corresponding event block is executed.
**********************************
The Load-of-program event is absolutely necessary for setting the state of an Object Services based transaction. You must initialize the OO Transaction Model at this event. Initialization is too late.
----
LOAD-OF-PROGRAM *
----
load-of-program.
cl_os_system=>init_and_set_modes(
i_external_commit = oscon_false
i_update_mode = oscon_dmode_update_task_sync ).
2007 Apr 30 1:08 PM
hello,
It seems not so much difference. But INITIALIZATION block is peculiar to executables.
INITIALIZATION: Only occurs in executable programs. The ABAP runtime environment triggers the INITIALIZATION event before the selection screen is processed, at which point the corresponding event block is processed.
LOAD-OF-PROGRAM: When an ABAP program is loaded in an internal session, the runtime environment triggers the LOAD-OF-PROGRAM event, and the corresponding event block is executed.
The Load-of-program event is absolutely necessary for setting the state of an Object Services based transaction. You must initialize the OO Transaction Model at this event. Initialization is too late.
*----------------------------------------------------------------------*
* LOAD-OF-PROGRAM *
*----------------------------------------------------------------------*
load-of-program.
cl_os_system=>init_and_set_modes(
i_external_commit = oscon_false
i_update_mode = oscon_dmode_update_task_sync ).
Regards
Vasanth
2007 Apr 30 1:12 PM
hi
good
Event LOAD-OF-PROGRAM (a kind of program constructor, always triggered when a program is loaded into memory).
Initialization Event->
This event occurs before the standard selection screen is called. During this event block, the input fields of the standard selection screen can only be initialized once after the program has been started. If an executable program declares a standard selection screen the same program will be automatically called again by the system once the selection screen has been executed (see SUBMIT). This triggers the INITIALIZATION event again. It is important to note however that the initialization of parameters or selection criteria will not have an effect because at this point the value of the AT SELECTION-SCREEN OUTPUT is assigned using the previous user inputs. Only the remaining global fields which were set during INITIALIZATION are initialized during each program run.
thanks
mrutyun^