2007 Jan 31 5:44 AM
Hello Guys...
I have Created a program using Selection-Screen 1000. and Screen 2000.
At Selection-Screen I have written code
Start-of-selection.
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK'.
LEAVE PROGRAM.
end case.
and At the user-command of Screen 2000.
I have written Follow code.
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK'.
LEAVE PROGRAM.
when 'CANCEL'.
LEAVE PROGRAM.
when 'ADD'.
Perform Add_New_Row.
when 'REMOVE'.
Perform DELETE_Row.
when 'SAVE'.
Perform SAVE_DATA.
when 'EXIT'.
LEAVE PROGRAM.
endcase.
...................................................
My Problem is that I am not able to come out from program through back button..
Follow is like that..
at Selection Screen user provide some input on that basis screen 2000 Call.
but when i press back button on screen 2000 Selection screen 1000 appear.
and my Problem is that when i press back button on selection-screen on 1000.
it's goes to screen 2000.
I know, it's little thing I am missing, Let me know ..what was that..
Cheers......
Swati...
2007 Jan 31 6:02 AM
what u have written in PAI of 1000 screen
try this
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
Reward if useful.
Hello Guys...
I have Created a program using Selection-Screen 1000. and Screen 2000.
At Selection-Screen I have written code
Start-of-selection.
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK'.
LEAVE PROGRAM.
end case.
and At the user-command of Screen 2000.
I have written Follow code.
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK'.
LEAVE PROGRAM.
when 'CANCEL'.
LEAVE PROGRAM.
when 'ADD'.
Perform Add_New_Row.
when 'REMOVE'.
Perform DELETE_Row.
when 'SAVE'.
Perform SAVE_DATA.
when 'EXIT'.
LEAVE PROGRAM.
endcase.
...................................................
My Problem is that I am not able to come out from program through back button..
Follow is like that..
at Selection Screen user provide some input on that basis screen 2000 Call.
but when i press back button on screen 2000 Selection screen 1000 appear.
and my Problem is that when i press back button on selection-screen on 1000.
it's goes to screen 2000.
I know, it's little thing I am missing, Let me know ..what was that..
Cheers......
Swati...
2007 Jan 31 5:48 AM
Hi,
I think the problem is when you press back it goes to the event AT SELECTION-SCREEN and there you have call to screen 2000. Check in debug mode if this is happening. If this is the case then handle the function code for BACK at this event AT SELECTION-SCREEN and put LEAVE TO SCREEN 0.
Regards,
Sesh
2007 Jan 31 5:51 AM
2007 Jan 31 5:53 AM
if you are coding like this
At Selection-Screen I have written code
Start-of-selection.
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK'.
LEAVE PROGRAM.
end case.
then i want to know start-of-selection is an event also why you are coding it after at selection-screen.
you code like this.
At Selection-Screen I have written code
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK'.
LEAVE PROGRAM.
end case.
Start-of-selection.
regards
shiba dutta
2007 Jan 31 5:55 AM
Hello Guys...
Previous code I have given is modify by this but same problem..
I have dubug the program and trace it. it's will not goes on Selection Screen
on Each back button the event occurs which is user-command 2000.
I have Created a program using Selection-Screen 1000. and Screen 2000.
At Selection-Screen I have written code
Start-of-selection.
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK'.
LEAVE PROGRAM.
end case.
and At the user-command of Screen 2000.
I have written Follow code.
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK'.
CALL SELECTION-SCREEN '1000'.
EXIT.
when 'CANCEL'.
LEAVE PROGRAM.
when 'ADD'.
Perform Add_New_Row.
when 'REMOVE'.
Perform DELETE_Row.
when 'SAVE'.
Perform SAVE_DATA.
when 'EXIT'.
LEAVE PROGRAM.
endcase.
...................................................
My Problem is that I am not able to come out from program through back button..
Follow is like that..
at Selection Screen user provide some input on that basis screen 2000 Call.
but when i press back button on screen 2000 Selection screen 1000 appear.
and my Problem is that when i press back button on selection-screen on 1000.
it's goes to screen 2000.
I know, it's little thing I am missing, Let me know ..what was that..
Cheers......
Swati...
2007 Jan 31 6:01 AM
Swati,
How are you calling screen 2000.... can you please provide that part of the code?
2007 Jan 31 6:00 AM
Hello Shiba,
I have try that also but That event is not triggering. at each back button only event user-Command at 2000 is trigger. Please cehck my 2 mail regarding the same..
At each back button on scrren 1000 and 2000 only and only event user-Command at 2000 is trigger.
Regards
Swati..
2007 Jan 31 6:02 AM
what u have written in PAI of 1000 screen
try this
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
Reward if useful.
2007 Jan 31 6:04 AM
Hello Sustain
I am calling Screen 2000 at Start of Selection Event. for u r referance code is there..
.........................................................
Start-of-selection.
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK'.
LEAVE PROGRAM.
endcase.
Screen from Here only
call screen 2000.
2007 Jan 31 6:05 AM
Swati,
Remove the below code from the START-OF-SELECTION event:
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK'.
LEAVE PROGRAM.
endcase.
and check if it works.
Susanth
2007 Jan 31 6:10 AM
Hi,
This:
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK'.
LEAVE PROGRAM.
endcase.
is not required in your code. Since, screen 1000 is the standard selection screen no., you dont hav to code for it, it will come out the program when you press back.
Regards
Subramanian
2007 Jan 31 6:17 AM
Swati,
In the PAI event for BACK ok-code put a condition for screen no as
IF sy-dynnr = '2000'.
LEAVE PROGRAM.
ENDIF.
2007 Jan 31 6:27 AM
Hello Susthain.
Thanks Problem is solved.. with leave to screen 0..
Point are Rewarded to you.
Regards
Swati..
2007 Jan 31 6:30 AM
2007 Jan 31 6:31 AM
sorry swati i am not reading properly your requirement. i think you have given start-of-selection at that place as i told earlier.
from your query what i can under stand in your report program you are calling screen 2000. if it is correct then no need to create screen 1000 for that because it will automatically create that.
and for screen 2000 dont code at user-command write the code at PAI of 2000.
and there in back use set screen 0. leave screen command.
please clarify me if i am wrong.
regards
shiba dutta
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |