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

Regarding SUBMIT Statement

Former Member
0 Likes
845

Hi All,

I have issue with SUBMIT Statement.

I am submitting <b>Report2</b> from <b>Report1</b> but it is stopping at the selection screen of <b>REPORT2</b>.

Statement is written as below:

<b> SUBMIT REPORT2 VIA SELECTION-SCREEN

WITH SELECTION-TABLE RSPARM.</b>

As per my requirement i will <b>REPORT2's</b> selection screen from <b>RSPARM</b> in <b>Report1</b> and after submitting <b>Report2</b> it should process <b>Report2</b>.

Can anybody tell me why it is stopping at <b>Selection-Screen</b> of <b>Report2</b> and what can be the solution.

Also i have one more issue in <b>Report2</b> that is

<b>'i need to check if this is a batch run(sy-batch)'</b> if it is true i need to send email to some users.

How can i write the same condition. Can anybody give how to go about it!

Thanks in advance.

Thanks & Regards,

Deep.

7 REPLIES 7
Read only

Former Member
0 Likes
798

SUBMIT REPORT2 VIA SELECTION-SCREEN

WITH SELECTION-TABLE RSPARM

AND RETURN.

Read only

Former Member
0 Likes
798

hi,

take away the addition via selection-screen and that will help u.

use this additon instead ... WITH sel1 value1 WITH sel2 value2 ...

santhosh

Read only

Former Member
0 Likes
798

HI,

Add the bold one.

SUBMIT REPORT2 VIA SELECTION-SCREEN

WITH SELECTION-TABLE RSPARM <b>AND RETURN</b>

if you want to know the Report2 is a batch program, then make use a Function module BP_JOB_SELECT_SM37B to get the Job name, and read the table with your job name then you com eto know the result

Regards

Sudheer

Read only

0 Likes
798

Hi,

If we give AND RETURN option to existing SUBMIT it will come back to calling program na!

In our example if we submit REPORT2 from REPORT1 it will come back to REPORT1 na!

I don't want that to happen, My code just need to submit REPORT2 from REPORT1 and execute REPORT2 without coming back to REPORT1.

I should show output of REPOR2 only.

For second query what we exactly need to pass to know if it is a batch run[SY-BATCH]!

Thanks for those replies.

Thanks,

Deep.

Read only

0 Likes
798

Hi,

Any sujjestions!

Thanks,

Deep.

Read only

0 Likes
798

HI,

If u dont want to return to the REPORT1 back then no need of AND RETURN statement.

Read only

Former Member
0 Likes
798

Hi Deep,

Just a try. As far as your query goes it seems that you run report2 always from report1. So if the user runs the report: REPORT1 in back ground we know that sy-batch will be set to 'X', in this case must set a Flag some thing like GV_FLAG to 'X'.

And SAY: EXPORT gv_flag TO MEMORY ID ...

and in REPORT2, in the initialization event say

IMPORT gv_flag FROM MEMORY ID ...

and check if this flag is set and send a mail.

Please let me know if this solved your problem.

Regards,

Goutham.