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: 

ALV grid update issue

former_member213975
Active Participant
0 Kudos

Hi experts,

please help me with writing ALV report for testing purpose:

When user push the button "Planetypes" the program call screen 0100 with table It_planetypes:

CALL METHOD r_alv_grid->set_table_for_first_display
    EXPORTING
      i_structure_name = 'SAPLANE'
     CHANGING
       it_outtab = it_planetypes.

when user double click on the table the program puts the table it_sflight in the same container of screen 0100

      CALL METHOD r_alv_grid->set_table_for_first_display
          EXPORTING
            i_structure_name = 'SFLIGHT'
           CHANGING
             it_outtab = it_sflight.
     

The problem is that when user push "Back" and then " Planetypes" again the program call screen 100 with table it_sflight (shold be it_planetypes). It looks like I missed statement to clear outtab but I am not sure. Could you please help me to fix this problem.

Regards, Maria

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Maria,

If you are creating the object r_alv_grid on 'Planetypes' button click, then on the 'BACK' button click : free the grid and clear it out using CLEAR r_alv_grid.

Regards,

Sonal

4 REPLIES 4

Former Member
0 Kudos

Hi Maria,

If you are creating the object r_alv_grid on 'Planetypes' button click, then on the 'BACK' button click : free the grid and clear it out using CLEAR r_alv_grid.

Regards,

Sonal

former_member205060
Active Participant
0 Kudos

Hi Maria,

I am not able to see your complete code. I hope you need to check the following things:-

1.  You need to refresh the ALV data on the screen.

2. Your first ALV is being called by push button in that case at "Back" you need to put leave to screen 0.

3.Check the double click event is cleared or not. Kindly debugg the program code.

Regards,

Rahul Singh

Former Member
0 Kudos

Hi Maria,

Could you please provide the code, so that we could investigate the issue.

Otherwise debug the functionality on back and push button and see whether  data is getting cleared or not and check which ALV is getting called after push button is pressed(after aback).

former_member213975
Active Participant
0 Kudos

Thank you all for the replies,

the problem was solved by adding code before creating the container.

IF r_container is not INITIAL.
    call method r_container->free.
  ENDIF.

Regards, Maria