2005 Jun 08 8:41 AM
HI all,
When i am calling another screen from my report program to display the result. I am Able to display the result on the intended screen but when i click on back the back button it is returing to the list screen first and than next to the selection screen.
I dont want to get the list screen in between but only the selection screen should be displayed when i click on the back button.
How to avoid the display of the list screen.
Thanks in advance.
Regards
Satish.
2005 Jun 08 8:46 AM
Hi Satish,
I you don't need to keep what the user has entered on the selection screen, then you can use LEAVE TO TRANSACTION ...
You just need to attach a transaction code to your report.
Cheers,
Brad
2005 Jun 08 8:55 AM
user entered value also can be retained (with little bit restriction) with the addition of
<b>MEMORY ID pid</b> to the paramters and select-options .
Regards
Raja
2005 Jun 08 9:03 AM
Hi,
CASE sy-ucomm.
WHEN 'BACK'.
SET SCREEN 0.
ENDCASE.
Or U can give LEAVE TO SCREEN 0.
2005 Jun 08 9:37 AM
hi,
I have the same code on my result screen and when i click the back button it comes to the list screen.
So this case wont work.
Please do suggest some other methods of doing it.
Regards
Satish.
2005 Jun 08 9:49 AM
Hi,
Could u plz give the part of code where u get this problem. Need to know whether u r calling a transaction?
Try this
MODULE user_command_9100 INPUT.
CASE sy-ucomm.
WHEN 'EXIT' OR 'CANC'.
LEAVE. " to SCREEN 0.
WHEN 'BACK'.
SET SCREEN '0'.
LEAVE SCREEN.
This leaves the program but you may need to re-call the
transaction to go back to the original screen
WHEN OTHERS.
ENDCASE.
ENDMODULE. " USER_COMMAND_9100 INPUT
Message was edited by: Judith Jessie Selvi
2005 Jun 08 10:37 AM
Hi Satish,
Have the leave to screen 0 immediately after your CALL SCREEN (or CALL TRANSACTION) statement.
Something like this -
parameters: p_test.
write 'Test'.
at line-selection.
call screen 100.
leave to screen 0.
module pai_screen_100.
if sy-ucomm eq 'BACK'.
leave to screen 0.
endif.
endmodule.
Regards,
Anand Mandalika.
2005 Jun 08 11:02 AM
2005 Jun 08 11:09 AM
Hi Vijay,
Did that work for you ? Because before I gave my reply, I checked that out too. <b>sy-lsind</b> seems to have significance only when we deal with the secondary lists.
Regards,
Anand Mandalika.
2005 Jun 08 11:17 AM
hi anand,
thanks for pointing out, i should have read the question properly b4 answering. sy-lsind has no relevance when other screens are called. it will be 0(basic list) unless secondary lists are called. Sorry for the confusion.
Rgds..Vijay
2005 Jun 08 11:40 AM
Try to Submit (Report name) via selection-screen in the pai event for back function code.
Rehan.
2005 Jun 08 11:52 AM
Hi Rehan,
I think that is not a nice way to deal with the solution. SUBMIT will create another internal session and cause the program to be re-loaded into the memory.
Regards,
Anand Mandalika.