Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8914

Using the same screen to display the data in ALV and clicking back button to go to the selection screen directly from final screen

$
0
0

Hello Experts,

 

Could someone help me on the below issue?

 

My requirement is to display the data in ALV report and my screen number is '0101'. I need to diaplay 2 buttons in the ALV with the name (Approve and Reject).

 

After collecting the data in 'I_FINAL' internal table, am populating into the ALV screen '0101'. When I click on Approve button in the screen,  I need to delete the corresponding line from the 'I_FINAL' internal table and display the rest of the data in to the same screen '0101' and before populating the remaining entries in '0101' screen I am calling the below methods

 

data: ws_obj1            TYPE REF TO cl_gui_custom_container,
         ws_obj2            TYPE REF TO cl_gui_alv_grid.

 

CALL METHOD ws_obj2->refresh_table_display.

CALL METHOD ws_obj1->free.

 

to refresh the objects. Each time when I click approve the corresponding line is getting deleted successfully from final internal table and the data is being populated in same screen '0101' after refreshing the container and grid. But when I click on back button, instead of going to selection screen the data is being displayed in the same screen.

 

For example: If I click the approve button 3 times, 3 entries are getting deleted from final internal table and the container and grid will be refreshed 3 times and then the final data is getting displayed. In this scenario I need to click the back button 3 times to go back to selection screen. Till then if I click back button, report will display the same screen.

 

There is no issue when I use "LEAVE PROGRAM" statement when clicking on back button.

 

The issue occurs when I use the below statments

'CALL SELECTION-SCREEN 1000'. and

'LEAVE TO SCREEN 0'

When using 'CALL SELECTION-SCREEN 1000', the program is going to selection screen and again if I press back from there, it is going back to same '0101' screen.


Viewing all articles
Browse latest Browse all 8914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>