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: 

how to make custom container empty

former_member185116
Active Participant
0 Kudos

helo all,

i am displaying my ALV output in Custom container...

i have an application tool bar button "REFRESH" when i click this i need to make the custom container empty(i.e no data should be displayed)..

which method do i need to use.....

thanks in advance....

8 REPLIES 8

rajeshkothamasu
Active Participant
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Vinay,

I think use of method REFRESH_TABLE_DISPLAY solves your problem.

Regards,

Chakradhar.

rajeshkothamasu
Active Participant
0 Kudos

This message was moderated.

Tomas_Buryanek
Active Contributor
0 Kudos

o_alv->free( ).               "ALV inside container

o_container->free( ).

EDIT: or better just hide content of container, free method is destructor...

o_alv->set_visible           "for cl_gui_alv_grid

-- Tomas --

0 Kudos

hi tomas,

o_alv->set_visible           "for cl_gui_alv_grid

is working fine by hiding the whole container.....

o_alv->free( ).               "ALV inside container

o_container->free( ).

is giving shortdump when i execute the report for second time....

0 Kudos

Yeah, there might be problem using destructor (free method). It depends on where you use constructor for objects, whether you clear reference variables (o_alv..) etc..

-- Tomas --

venuarun
Active Participant
0 Kudos

Hi Vinay

*Destructor

       CALL METHOD go_custom_container->free.

*Send Buffered Automation Queue to Frontend

       CALL METHOD cl_gui_cfw=>flush.


Regards

Arun VS

AnoopMayamkote
Participant
0 Kudos

       CALL METHOD go_custom_container->free.

       CALL METHOD cl_gui_cfw=>flush. otherwise use

   

       REFRESH_TABLE_DISPLAY