04-11-2013 10:21 PM
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
04-12-2013 3:29 AM
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
04-12-2013 3:29 AM
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
04-12-2013 4:35 AM
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
04-12-2013 6:24 AM
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).
04-12-2013 8:48 AM
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