‎2007 May 09 4:10 PM
Hi friends, this is the first time I post a question.
Nowadays I deal with the dialog programming. I have four screens: 0100, 0101, 0102, 0103..
And this screens have 'save' and 'back' pushbuttons on them.
I control the flow of screens at the screen '1000' (selection-screen), however, whenever I clicked on the Back button pf the screens and come back to screen 1000, and want to open another screen it is not possible, the code window is opened.
Here pEntry, pCar etc are radiobuttons defined from Parameter keyword:
data:OK_CODE TYPE sy-UCOMM, saveokcode TYPE sy-UCOMM.
if pEntry eq 'X'.
CAll SCREEN 0100.
ELSEIF pcar eq 'X'.
call SCREEN 0101.
ELSEIF pCarexit eq 'X'.
CALL SCREEN 0103.
ELSEIF pDriver eq 'X'.
call SCREEN 0104.
endif.
All the screens have the following format:
MODULE USER_COMMAND_0100 INPUT.
saveokcode = OK_CODE.
CASE saveokcode.
WHEN 'SAVE'.
PERFORM SAVE_DATA.
WHEN 'BACK'.
call SELECTION-SCREEN 1000.
LEAVE PROGRAM.
endcase.
When I clicked on back button on one of the screens, the second time I cannot use the radio button, it directs to the code window.
Should ı CLEAR the ok_code?
Thanks for your answers.
‎2007 May 09 4:16 PM
Welcome to SDN!
This should help you:
WHEN 'BACK'.
SET SCREEN 0.
LEAVE SCREEN.
This should bring you back to the selection screen and should let you select options again.
Hope this helps.
Sudha
‎2007 May 09 4:16 PM
Welcome to SDN!
This should help you:
WHEN 'BACK'.
SET SCREEN 0.
LEAVE SCREEN.
This should bring you back to the selection screen and should let you select options again.
Hope this helps.
Sudha
‎2007 May 09 4:42 PM
thanks for your help.
the mainly it is ok but, not I at once it goes back to the screen 0. I can go at twice. At first the radio buttons are not displayed and after second F3 I can go to the screen 0.And the radios are also displayed at the second time.Also It does not go the code window.Here is ok.
Thanks.
‎2007 May 09 5:07 PM
Have you tried debugging to see what happens when BACK is pressed the first time, and why it doesnt work?
It might have to do with the ok_code clearing, as Rich suggested.
Sudha
‎2007 May 09 4:17 PM
‎2007 May 10 6:45 AM
Hii
you are using this piece of code
call SELECTION-SCREEN 1000.
LEAVE PROGRAM.
instead of using leave program use leave screen.
leave program will take you back to the code as it leaves the entire program
‎2007 May 10 1:33 PM
"Set screen 0.
Leave program."
This contributed to solve the problem and it is now ok..
Thanks.