Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

FREE Object

Former Member
0 Kudos

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 ...

1 ACCEPTED SOLUTION

PedroGuarita
Active Contributor
0 Kudos

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 ?

3 REPLIES 3

PedroGuarita
Active Contributor
0 Kudos

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 ?

0 Kudos

Thanks Pedro, stupid of me that I didn't thought about that directly

Edited by: Tom Verstocken on Oct 29, 2010 4:22 PM

Former Member
0 Kudos

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