‎2007 Sep 19 5:08 AM
Hi all,
What is the Object's lifetime in a program? How long does an object exists in a program?
‎2007 Sep 19 5:09 AM
Lifetime of an object is limited only till the execution of the program.
<b>Local objects</b> - Scope & lifetime limited within the subroutine.
<b>Global Objects</b> - Scope limited within the program or across programs, if imported/exported. Lifetime is till program termination.
‎2007 Sep 19 5:09 AM
Lifetime of an object is limited only till the execution of the program.
<b>Local objects</b> - Scope & lifetime limited within the subroutine.
<b>Global Objects</b> - Scope limited within the program or across programs, if imported/exported. Lifetime is till program termination.
‎2007 Sep 19 5:12 AM
Is there any way avilable to initialize an object before the termination of a program?
‎2007 Sep 19 5:18 AM
You can initialize object at any point in the program.
Depending on the location of decalration... Say Subroutine, FM, Top Include, the scope & lifetime would be decided.
But eventually the object wont be available after program termination.
‎2007 Sep 19 5:19 AM
uSE FREE MEMORY TO INITIALIZE THE OBJECT, OR CLEAR, REFRESH, DELETE.
‎2007 Sep 19 5:19 AM
If you IMPORT or EXPORT the variable from the program, the lifetime of that object will be till SAP Session is terminated.