2012 Oct 26 4:45 AM
It was working fine earlier. For some reason, now it is giving dump. How to avoid this ?
MODULE user_command_0101 INPUT.
CASE ok_code.
WHEN 'RETURN'(042).
LEAVE TO SCREEN 0.
WHEN 'OVERVIEW'.
*****Free the Overview screen GRID before calling the Overview screen 100
CALL METHOD go_grid1->free.
CALL METHOD go_custom_container1->free.
CLEAR go_custom_container1.
IF go_grid3 IS BOUND.
*-------Free the detailed screen GRID, before calling the detailed screen 103
CALL METHOD go_grid3->free. <<<<<<<<<<<<<<<<<<<<<<<<DUMPING here
CALL METHOD go_custom_container3->free.
CLEAR go_custom_container3.
ENDIF. " IF go_grid3 IS BOUND.
In debugging, I saw the below values:
GO_GRID3 {O:55*\CLASS=CL_GUI_ALV_GRID}
GO_CUSTOM_CONTAINER3 {O:INITIAL}
It was working fine earlier. For some reason, now it is giving dump. How to avoid this ?
MODULE user_command_0101 INPUT.
CASE ok_code.
WHEN 'RETURN'(042).
LEAVE TO SCREEN 0.
WHEN 'OVERVIEW'.
*****Free the Overview screen GRID before calling the Overview screen 100
CALL METHOD go_grid1->free.
CALL METHOD go_custom_container1->free.
CLEAR go_custom_container1.
IF go_grid3 IS BOUND.
*-------Free the detailed screen GRID, before calling the detailed screen 103
CALL METHOD go_grid3->free. <<<<<<<<<<<<<<<<<<<<<<<<DUMPING here
CALL METHOD go_custom_container3->free.
CLEAR go_custom_container3.
ENDIF. " IF go_grid3 IS BOUND.
In debugging, I saw the below values:
GO_GRID3 {O:55*\CLASS=CL_GUI_ALV_GRID}
GO_CUSTOM_CONTAINER3 {O:INITIAL}
2012 Oct 26 8:12 AM
Are you sure that the dump occurs because of
GO_GRID3? It seems as if the dump occurs because of
GO_CUSTOM_CONTAINER3 because this is not bound.
To avoid the dump only call FREE if GO_CUSTOM_CONTAINER3 is bound.
Regards,
Stefan
2012 Oct 26 9:08 AM
Hi ,
Yes looks like dump is because of GO_CUSTOM_CONTAINER3 as it is initial . but still , if the dump comes .please write down what it says.
2012 Oct 26 9:19 AM
Hello,
if you have an object reference variable which does not refer to an object (e. g. no object created or cleared the variable) you can not call any (instance) method of this object - because there is no object.
To avoid this you can follow these strategies:
Hope this is helpful.
Regards,
Stefan
2012 Oct 26 5:11 PM
Hello Sam,
What is the parent container for go_grid3?, I am getting the feeling that the parent container is
go_custom_container1 and hence the dump.
If so, it would dump at that point.This is due to the fact that you are freeing the custom container go_custom_container1 in the frontend, thereby freeing the dependent ALV control automatically in the front end.
This is a typical issue when freeing controls out of sequence . When you use the method Control->free( ) you are sending a message to the SAP GUI to free the custom control at the frontend.
Thanks,
Venkat
2012 Oct 26 8:24 PM
Also,
If the parent container is go_custom_container3 then it would still dump because the container was free'd before the method call
CALL METHOD go_grid3->free
, or the container was never intialized at the frontend in the PBO cycle.
Thanks,
Venkat.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |