‎2007 Apr 11 8:16 PM
Hi Experts,
I developed a Basic Report.
So,
1- When the user press the F3 or EXIT or BACK, the user has to go back to the selection screen and the Parameters shuld b blank, How to achieve this?
Actually, I hv written like,
Case sy-ucomm.
when 'EXIT'.
SUBMIT sy-repid via selection-screen.
when 'PF03'.
SUBMIT sy-repid via selection-screen.
endcase.
but NOT working!
ThanQ.
‎2007 Apr 11 8:24 PM
ARe you outputing a list display? Like is there WRITE statements in your program? If so, there is no need to code the F3 back and exit buttoms.
If you want to get rid of the values on the screen when hitting back from the list display use the statement FREE MEMORY.
parameters: p_check type c.
start-of-selection.
write:/ p_check.
Free Memory.Regards,
Rich Heilman
‎2007 Apr 11 8:18 PM
Hi,
Please try this.
Case sy-ucomm.
when 'EXIT'.
SUBMIT (sy-repid) via selection-screen and return.
when 'PF03'.
SUBMIT (sy-repid) via selection-screen and return.
endcase.
Regards,
Ferry Lianto
‎2007 Apr 11 8:25 PM
Hi Ferry,
No, It did not worked out!
Here the earlier programmer used the GET and SET PARA IDs! Does makes any difference?
ThanQ.
‎2007 Apr 11 8:24 PM
ARe you outputing a list display? Like is there WRITE statements in your program? If so, there is no need to code the F3 back and exit buttoms.
If you want to get rid of the values on the screen when hitting back from the list display use the statement FREE MEMORY.
parameters: p_check type c.
start-of-selection.
write:/ p_check.
Free Memory.Regards,
Rich Heilman
‎2007 Apr 11 8:30 PM
Hi Rich,
Yes, I am displaying basic report by using the WRITE statements.
Yes, I am getting back by F3 or exit or back.
What is p_check? I mean, I need to define a parameter for this purpose or Just u hv given example.
Can I use directly FREE MEMORY statement, just after start-of-selection?
ThanQ.
‎2007 Apr 11 8:32 PM
‎2007 Apr 11 8:40 PM
‎2007 Apr 11 8:44 PM
Hi Rich,
Any idea for Drop Down for a FISCAL YEAR parameter in Selection Screen?
As I hv many years number, Its cumbersome to use VRM Type pools and its corresponding FM?
So, Is there any alternative idea?
ThanQ.
‎2007 Apr 11 8:25 PM
Hi Srinivas,
I think it works if you use the 'RETURN' in your code.
case sy-ucomm.
when 'EXIT'.
submit sy-repid via selection-screen and return
when 'PF03'.
submit sy-repid via selection-screen and return.
endcase.
Hope this helps.
Thanks,
Srinivasa
‎2007 Apr 11 8:26 PM
I would suggest using something like
leave to transaction sy-tcode instead of SUBMIT sy-repid.
Each time you SUBMIT it opens another internal session & if the User keeps going back & forth, it might even lead to maxing out the no of internal sessions.
~Suresh
‎2007 Apr 11 8:28 PM
Hi,
Please try this with open and close brackets.
Case sy-ucomm.
when 'EXIT'.
SUBMIT (sy-repid) via selection-screen and return.
when 'PF03'.
SUBMIT (sy-repid) via selection-screen and return.
endcase.
Regards,
Ferry Lianto
‎2007 Apr 11 8:29 PM
Hi,
Check the syntax
SUBMIT <rep> [AND RETURN] [VIA SELECTION-SCREEN]
[USING SELECTION-SET <var>]
[WITH <sel> <criterion>]
[WITH FREE SELECTIONS <freesel>]
[WITH SELECTION-TABLE <rspar>]
[LINE-SIZE <width>]
[LINE-COUNT <length>].
Calls the program <rep>. If you omit the AND RETURN addition, the current program is terminated. Otherwise, the data from the current program is retained, and processing returns to the calling program when <rep> has finished running. The other additions control the selection screen and set attributes of the default list in the called program.
Regards,
Bhaskar