10-29-2010 3:07 PM
Hey guys,
I've got a rather stupid question, but I just can't find the answer on the net.
I've got the following code:
CREATE OBJECT gr_alvgrid_info
EXPORTING
i_parent = gr_ccont_info.
FREE gr_alvgrid_info.
IF gr_alvgrid_info IS INITIAL.
WRITE 'initial'.
ENDIF.
But my code never goes inside the IF-structure, is there a way to check weither my Object is
many thanks <removed by moderator>.
Tom
Edited by: Thomas Zloch on Oct 29, 2010 5:27 PM - please do not offer ...
10-29-2010 3:12 PM
You must "destroy" the object, there probably is a method in the class you're referencing for that. What is the data type of gr_alvgrid_info ?
10-29-2010 3:12 PM
You must "destroy" the object, there probably is a method in the class you're referencing for that. What is the data type of gr_alvgrid_info ?
10-29-2010 3:20 PM
Thanks Pedro, stupid of me that I didn't thought about that directly
Edited by: Tom Verstocken on Oct 29, 2010 4:22 PM
10-29-2010 3:21 PM
Hi,
Use clear statement inplace of free so that u can clear the instance.
CREATE OBJECT gr_alvgrid_info
EXPORTING
i_parent = gr_ccont_info.
CLEAR gr_alvgrid_info.
Now control will go inside IF statement.
IF gr_alvgrid_info IS INITIAL.
WRITE 'initial'.
ENDIF
Regards,
Sheelesh