10-07-2008 2:03 PM
Dear All:
I'm working with a ECC6 system, which was upgraded from a 4.6C.
Concerning to 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.
This means that LOAD-OF-PROGRAM should be executed only once.
But I have different behaviour. In my system is executed at every PBO.
I have this test code:
REPORT ztest .
PARAMETERS: p_gjahr TYPE gjahr.
LOAD-OF-PROGRAM.
BREAK-POINT.
START-OF-SELECTION.
WRITE:/ 'Hello'.
When I run this program, the break-point is triggered. This is correct.
After that, I press F8, to skip the break-point, and F8 to launch the report.
The system shows 'Hello'.
But when I press back, the break-point located in load-of-program is triggered again, which is incorrect.
Has someone faced the same problem?
Thanks in advance.
10-07-2008 2:13 PM
When I run this program, the break-point is triggered. This is correct.
After that, I press F8, to skip the break-point, and F8 to launch the report.
The system shows 'Hello'.
But when I press back, the break-point located in load-of-program is triggered again, which is incorrect.
No, which is not Incorrect. It is correct. Even if you try to put the INITIALIZATION event and put a break-point system will go it both the time as it went in the LOAD-OF-PROGRAM.
That means when you come back from the List to selection screen, system will load the program using the LOAD-OF-PROGRAM and that's why all your global data is being cleared everytime your run the program from the selection screen.
Regards,
Naimesh Patel
10-07-2008 2:13 PM
When I run this program, the break-point is triggered. This is correct.
After that, I press F8, to skip the break-point, and F8 to launch the report.
The system shows 'Hello'.
But when I press back, the break-point located in load-of-program is triggered again, which is incorrect.
No, which is not Incorrect. It is correct. Even if you try to put the INITIALIZATION event and put a break-point system will go it both the time as it went in the LOAD-OF-PROGRAM.
That means when you come back from the List to selection screen, system will load the program using the LOAD-OF-PROGRAM and that's why all your global data is being cleared everytime your run the program from the selection screen.
Regards,
Naimesh Patel
10-07-2008 2:27 PM
Hi
I've tired this program and it's the same behavior in both release: 4.6C and 6.00
PARAMETERS: P1 TYPE T001-BUKRS DEFAULT '1000'.
INITIALIZATION.
BREAK-POINT.
LOAD-OF-PROGRAM.
BREAK-POINT.
START-OF-SELECTION.
WRITE P1.
Both events INITIALIZATION and LOAD-OF-PROGRAM are triggered again after backing from abap list: I suppose the event LOAD-OF-PROGRAM is triggered again because the report is set in an internal mode again
Max
11-20-2008 11:22 AM
I close the Thread.
While in modul pool LOAD-OF-PROGRAM is executed only once, when the program is loaded, in a report LOAD-OF-PROGRAM is executed at every PBO, i.e. every time the selection screen is displayed.