Application Development 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: 

Problem in SUBMIT AND RETURN statment

Former Member
0 Kudos

Hi,

I have the problem of after using the SUBMIT (the standard program) AND RETURN statment in my zprogram i am not able to continue my program execution automatically.

After the standard program execution i needs to press the BACK button to come to my zprogram excution. Could u please help me to avoid pressing this BACK button eventhough i have used SUBMIT AND RETURN statment?

(After the execution of the submitted program it should automatically continue the execution of my zprogram without expecting the pressing of BACK button)

Thanks & Regards,

Navaneeth

13 REPLIES 13

Former Member
0 Kudos

Hi,

If there is any Output genrated and displayed to list in the called program then you need to manually press back to camoe back to your program.

If there is not ouput generated then the Program automatically comes back to program and executes from where the control has been left. For this you need to use the RETURN statement in SUBMIT.

submit (raldb-report) using selection-set raldb-variant
                                  with selection-table selection_table
                                  AND RETURN.

Edited by: avinash kodarapu on Jan 2, 2009 5:45 PM

Former Member
0 Kudos

hi,

donnot use select via selection screen in submit insted use with opion in submit as

submit zprogram with s_kunnr in s_kuunr and return.

this will solve your problem.

thanks,

anupama.

0 Kudos

Hi,

Actually i am calling a standard transaction in CRM to change the category. So after changing the category i wanted to come back to my zprogram... is it not possible?

I have used SUBMIT WITH parameters.... AND RETURN only.

Regards,

Navaneeth

0 Kudos

If control has been passed to the submitted program, meaning that you are doing something within that transaction via a screen, then there is no way to get back to your program without having some user interaction, such as hitting the "Back" button. If I understand you correctly, you are doing a transaction in CRM and have to do some interaction, then in this case, you must trigger the end of that interaction, by clicking the "back" button.

Are you really using SUBMIT for a CRM transaction?

Regards,

Rich Heilman

0 Kudos

hi,

try with submit zprogram with s_kunnr in s_kunnr to spool print_option.

thanks,

anupama.

0 Kudos

Hi,

Actually the CRM transaction which i am calling will change the category of the product and list the old category and the new assigned category. I dont want to see this list also.

I Just wanted to come back to my program after the standard program execution without pressing the BACK button.

I tries SUBMIT .... AND RETURN EXPORTING LIST TO MEMORY statment also.

Could u pls help me?

Regards,

Navaneeth

0 Kudos

You have tried using the EXPORT LIST TO MEMORY and it still throws a list display? That doesn't sound right....

Regards,

Rich Heilman

0 Kudos

Hi,

I am still not getting the output expected. Could u pls help?

The output of the standard transaction is like a LOG display.

Regards,

Navaneeth....

0 Kudos

Hi,

Actually the standard output is in GRID display for displaying the log. Not a list display.

Regards,

Navaneeth

RichHeilman
Developer Advocate
Developer Advocate

If you do not care about the output of the submitted program, and you do not wish to show the output nor the selection screen of the submitted program, then you may bypass them like this.

SUBMIT zReport AND RETURN 
           EXPORTING LIST TO MEMORY.

Regards,

Rich Heilman

0 Kudos

This Works as expected..Thank you

Former Member
0 Kudos

Hi,

could you please let me know the what kind of result is given by

the standard program.

If suppose the standard program is giving any basic list then the list will be appeared and you need to

press the back button.

Submit and return will work only when there is no interuption in executing your standard program i.e. your std. program should execute with out generating any kind of output.

Regards,

Phani.

Former Member
0 Kudos

Hi Navaneeth,

Go through the below document and sample code

report zrich_0001.

data: begin of itab occurs 0,

datum type sy-datum,

end of itab.

ranges: r_datum for sy-datum.

  • create some data in ITAB

itab-datum = sy-datum.

do 10 times.

itab-datum = itab-datum + 1.

append itab.

enddo.

  • Build the range

clear r_datum. refresh r_datum.

loop at itab.

r_datum-sign = 'I'.

r_datum-option = 'EQ'.

r_datum-low = itab-datum.

append r_datum.

endloop.

submit zreport

with s_datum in r_datum

and return.

1.Without selection screen appearance

DATA:

rspar TYPE TABLE OF rsparams,

wa_rspar LIKE LINE OF rspar.

passing all selection-screen values through rspar table .check the structure RSPARAMS.

SUBMIT demo_program_submit_rep1

WITH SELECTION-TABLE rspar

AND RETURN EXPORTING LIST TO MEMORY.

2.Using Variant created for the called program.

SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN

USING SELECTION-SET 'VAR1'

AND RETURN.

SUBMIT demo_program_submit_rep1

USING SELECTION-SET 'VAR1'

AND RETURN EXPORTING LIST TO MEMORY.

3.

Once you call the standard program from your program using those above statements, the table in

the standard report which is being displayed..same needs to be define in your program.

Then use following program to read the memory in the calling program

LIST_FROM_MEMORY

WRITE_LIST

DISPLAY_LIST

Regards

Sreeni