LEAVE TO SCREEN 0 does not work in selection screen

LEAVE TO SCREEN 0 does not work in selection screen
Rate this post

Yesterday we discovered a very popular problem by chance. After selection screen we were calling a dialog screen and then with ‘BACK’ button we tried to come back to selection screen. However the program goes to an empty list screen without any element. Soon after with an investigation i have found out that selection screen involves a list screen element which is SKIP n command. I guess this command is misused on behalf of SELECTION-SCREEN SKIP n command.
Therefore there is two alternative to solve this issue.

  1. Convert SKIP n command to SELECTION-SCREEN SKIP n.
  2. Use LEAVE LIST-PROCESSING command for returning selection-screen

Below code simulates this problem and shows what to do.

 

You may also like