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 REPORT statement issue in abap

sanjana_lingras
Active Participant
0 Likes
1,405


Hi Experts,

I am facing issue while doing SUBMIT REPORT statement.

Below are the details for the Issue:

1. We want to execute another report ZTEST2 from one report , so we have written code in report ZTEST1 as below:

                      SUBMIT ZTEST2 AND RETURN.

2. It goes to ZTEST2 successfully but when we execute ZTEST2 and click on BACK buttton , it directly goes to ZTEST1 selection screen.

Instead we want to go ZTEST2 program's selection screen. As this back button is standard ALV button is there any way we can handle this without creating new PF-STATUS.

Regards,

Sanjana

1 ACCEPTED SOLUTION
Read only

satyabrata_sahoo3
Contributor
0 Likes
1,370

Exclude the 'AND RETURN' statement. Use ' SUBMIT  ZTEST2 VIA SELECTION-SCREEN'.

Regards,

Satya


Hi Experts,

I am facing issue while doing SUBMIT REPORT statement.

Below are the details for the Issue:

1. We want to execute another report ZTEST2 from one report , so we have written code in report ZTEST1 as below:

                      SUBMIT ZTEST2 AND RETURN.

2. It goes to ZTEST2 successfully but when we execute ZTEST2 and click on BACK buttton , it directly goes to ZTEST1 selection screen.

Instead we want to go ZTEST2 program's selection screen. As this back button is standard ALV button is there any way we can handle this without creating new PF-STATUS.

Regards,

Sanjana

7 REPLIES 7
Read only

Former Member
0 Likes
1,370

Hi Sanjana,

I don't think you can. My suggestion is to use a parameter ID, like this:

counter = 0.

set parameter id 'counter'

do.

SUBMIT ZTEST2 AND RETURN.

get parameter id 'counter'

if counter >= 2.

     exit.

enddo.


so you'll resubmit every time your counter < 2


And inside ZTEST2 at:

initialization.

     add 1 to counter.    

     set parameter id 'counter'


start-of-selection

     counter = 0.

     set parameter id 'counter'


so if you execute you reset the counter and your program will resubmit

in ztest 2 after executing you'll press back and resubmit will present the selection screen. If you press back now, counter is 2 and program will leave the DO instruction.


regards,

Edgar

Read only

0 Likes
1,370

Hi Edgar,

We do not want to make any changes in ZTEST2 , is it possible to do anything in calling program only.

Regards,

Sanjana

Read only

0 Likes
1,370

That's very limiting.

It depends, there are some things you can do if you ztest2 does something that is traceable.

Without any more info I suggest to check time-lapse between submit calls. If it's inferior to 2 seconds I'd suppose user want's to leave.

mind you the syntax is wrong:

do.

g_initial = get time.

SUBMIT ZTEST2 AND RETURN.

g_final = get time.

if g_final - g_initial <= 2.

     exit.

endif.

enddo.


For the user is in most cases transparent, only if he remains a lot of time in selection screen he'll remain there.


regards,

Edgar

Read only

satyabrata_sahoo3
Contributor
0 Likes
1,371

Exclude the 'AND RETURN' statement. Use ' SUBMIT  ZTEST2 VIA SELECTION-SCREEN'.

Regards,

Satya

Read only

0 Likes
1,370

Well, I agree. I was assuming there's some logic yet for processing in first report :). Maybe there isn't.

Read only

0 Likes
1,370

Hi Satyabrata,

This worked

Regards,

Sanjana

Read only

narendar_naidu
Active Participant
0 Likes
1,370

hi,

Use SUBMIT <program name> via selection screen....this will take u to selection screen of the prog first

and when u press back it will return back again to the called selection screen.

regards,