2009 Dec 02 1:31 AM
hy folks i'm trying to managing a back to selection-screen from an alv grid using the ok_code
CASE save_ok_code.
WHEN
fcode_back OR
fcode_esc.
CALL METHOD grid->free.
CALL METHOD tree1->free.
CALL METHOD g_custom_container->free.
call selection-screen 1000.
when others.
endcase.why the flow is like this.
AT SELECTION-SCREEN.
IF sy-ucomm = 'ONLI' or sy-ucomm = 'CRET'.
PERFORM acquisisci_rasn.
ENDIF.
START-OF-SELECTION.
* Initialization Drag and Drop
PERFORM init_dragdrop.
END-OF-SELECTION.
g_repid = sy-repid.
CALL SCREEN 100.....
the problem is that after backing to the selection-screen, if you excute again the program, is dumping, the container and the grid are not loaded.
what do i miss?
2009 Dec 02 5:21 AM
Hello,
I think there is some problem in your PBO logic.
AND clear the reference variable by using the Keyword FREE.
Hi Andre,
Write the Checks before you use any references.
eg.,
if tree1 is BOUND.
do your operations .
ELSE.
CREATE REFERENCES
ENDIF.
this may solve your problem
Regards.
Seema
2009 Dec 02 5:21 AM
Hello,
I think there is some problem in your PBO logic.
AND clear the reference variable by using the Keyword FREE.
2009 Dec 02 5:38 AM
Hello Andre,
Try the following:
CASE save_ok_code.
WHEN
fcode_back OR
fcode_esc.
CALL METHOD grid->free.
CALL METHOD tree1->free.
CALL METHOD g_custom_container->free.
CLEAR: grid, tree1, g_custom_container.
call selection-screen 1000.
when others.
endcase.
Note the line: CLEAR: grid, tree1, g_custom_container.
Regards,
George
2009 Dec 02 5:40 AM
This seems to be occuring because you are not handling exceptions while calling the free method.
Try to handle the exceptions as given in below code . Then the dump can be avoided
CALL METHOD cl_grid1->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
DO Nothing
ENDIF.
2009 Dec 02 5:53 AM
Hi,
Clear your save_ok_code
CASE save_ok_code.
WHEN
fcode_back OR
fcode_esc.
CALL METHOD grid->free.
CALL METHOD tree1->free.
CALL METHOD g_custom_container->free.
clear save_ok_code. "Add this
call selection-screen 1000.
when others.
endcase.
2009 Dec 17 10:21 AM
Hi Andre,
Write the Checks before you use any references.
eg.,
if tree1 is BOUND.
do your operations .
ELSE.
CREATE REFERENCES
ENDIF.
this may solve your problem
Regards.
Seema
2009 Dec 18 5:56 AM
2009 Dec 18 6:04 AM
2009 Dec 18 6:06 AM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |