Application Development and Automation 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: 
Read only

Difference between Initialization and Load-of-Program

Former Member
0 Likes
804

Hi All!

Could anybody tell me what exactly is the difference between Load-of-program and initialization using a sample program?

Thanks in advance...

Jag.

3 REPLIES 3
Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
506

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.

Regards

*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

Read only

thomas_jung
Developer Advocate
Developer Advocate
0 Likes
506

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 ).

Read only

0 Likes
506

Hi Thomas and Serder,

thanks for your replies...they were quite helpful for me.

regards,

Jag