Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SUBMIT?

Former Member
0 Likes
1,425

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.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,261

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

11 REPLIES 11
Read only

Former Member
0 Likes
1,261

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

Read only

0 Likes
1,261

Hi Ferry,

No, It did not worked out!

Here the earlier programmer used the GET and SET PARA IDs! Does makes any difference?

ThanQ.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,262

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

Read only

0 Likes
1,261

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.

Read only

0 Likes
1,261

Just an example, after writing your list display, simply use the FREE MEMORY statement. That's it. No need to re-call the program.

Regards,

Rich HEilman

Read only

0 Likes
1,261

Yes Rich, Its worked out.

ThanQ very much!

ThanQ to all.

Read only

0 Likes
1,261

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.

Read only

Former Member
0 Likes
1,261

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

Read only

suresh_datti
Active Contributor
0 Likes
1,261

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

Read only

Former Member
0 Likes
1,261

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

Read only

Former Member
0 Likes
1,261

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