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 get rid of the loop in ALV output from At selection screen event?

Former Member
0 Kudos

I have several push buttons on a selection screen.

Clikc on a button, then it pops up an editable ALV report. (This gets triggered AT SELECTION SCREEN event.). REUSE_ALV_GRID_DISPLAY_LVC..

On the ALV output, I enabled F4 for a couple of fields. Once I click on the F4 button, ONF4 method gets triggerd and a pop up appears with custom search helps.

choose a line and it fills the cell.

Upto this it works fine.

Now I click on the BACK button at the ALV output, it takes me to the selection screen. I click on the button again, it show the editable ALV. Now when I click on the F4 button, the pop up comes up twice and the cell gets filled from the second pop - up.

How to control this?

Probably I am not refreshing something?

(I am using REUSE_ALV_GRID_DISPLAY_LVC and tooks ome code for ONF4 event from BCALV_*DATATYPES (forgot the exact name) program.)

Thanks,

Ven

4 REPLIES 4

Former Member
0 Kudos

Hi,

Yes - You are not refreshing the grid.

Best Option Debug and find out - place a break before when it is looping.

other options:

you can refresh the grid before calling the second pop up:

1) check for

CALL METHOD w_pop_alv->refresh_protocol.

2) check for perform

PERFORM refresh_grid USING w_grid.

Thanks,

Sreeni.

0 Kudos

Hi Sreeni,

What is inside this PRFORM>

What does the pop up method do?

0 Kudos

Hi,

FORM refresh_grid USING pw_grid TYPE REF TO cl_gui_alv_grid.

*Work area

DATA : wal_stable TYPE lvc_s_stbl.

CHECK NOT pw_grid IS INITIAL.

wal_stable-col = c_check.

wal_stable-row = c_check.

*Method to refresh grid

CALL METHOD pw_grid->refresh_table_display

EXPORTING

is_stable = wal_stable

i_soft_refresh = c_check

EXCEPTIONS

finished = 1

OTHERS = 2.

ENDFORM. " refresh_grid

Thanks,

Sree.

Former Member
0 Kudos

Passed a flag and verified if it is initial.