Application Development and Automation 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: 
Read only

ALV OO closing problem

Former Member
0 Likes
1,217

Hi,

I have a ALVgrid in a dialog box...

everything there works fine until I save my changes done there... the next time I call this screen (all objects will be deleted and recreated) and click buttons on top of the ALV (add row, delete row,...) the screen closes (the ALV Object is still there but the window just closes...)

I debugged a lil bit and the first time I call the ALV eveything is fine, the second time the ALV Buttons trigger the USER_COMMAND form from the screen

can anyone help me?

maybe it's a problem of the screen instead of the ALV :-?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,170

Hi Sebastin,

You should call the method <b>refresh_table_display</b>.

This is a method in the class cl_gui_alv_grid.

This may help .

Thanks and Regards,

Kunal.

Hi

Perhaps it's better if you give us your code...

Max

8 REPLIES 8
Read only

Former Member
0 Likes
1,170

Hi

Perhaps it's better if you give us your code...

Max

Read only

Former Member
0 Likes
1,171

Hi Sebastin,

You should call the method <b>refresh_table_display</b>.

This is a method in the class cl_gui_alv_grid.

This may help .

Thanks and Regards,

Kunal.

Read only

Former Member
0 Likes
1,170

hi,

you need to call the method <b>REFRESH_TABLE_DISPLAY</b> in your pai.

regards

vijay

Read only

0 Likes
1,170

vijay, that doesn't work... 😕

think a refresh would only make sense if I would not recreate the ALV, but I do...

@Max: maybe you can specify the part of the coding you want to see... there is a lot of stuff this screen is in...

Read only

0 Likes
1,170

Hi,

ok, can you show your user_command event implementation.

Regards

vijay

Read only

0 Likes
1,170

this is the relevant coding for the dialog box (perform in user_command)...

FORM HANDLE_ACTIONS USING P_OKCODE P_DYNNR.

DATA: OKCODE(10) TYPE C,

ANSWER(1) TYPE C,

ADDRNUM TYPE SPOP-VARVALUE1.

OKCODE = P_OKCODE.

IF OKCODE ).

create ALV routines are normal... they delete the AlV and the recreate it, since I use this routines for several ALVs...

Read only

0 Likes
1,170

Hi,

are you clearing the container,grid etc..

<b> CALL METHOD G_GRID1->FREE.

CALL METHOD G_CUSTOM_CONTAINER1->FREE.

CALL METHOD CL_GUI_CFW=>FLUSH.

CLEAR G_CUSTOM_CONTAINER1.

CLEAR G_GRID1.</b>

before calling next alv.

Regards

vijay

Read only

0 Likes
1,170

ok solved this now...

problem was a recreate at the wrong time... my ALVs get created and deleted on screen changes and one statement was set wrong...

but don't know why such an "error" occurs then...

anyway, thank you all for your help