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 and return

Former Member
0 Likes
1,863

Hi Guru's,

I am calling a zprogram using SUBMIT and Return. I am skipping the selection screen.

My problem is when i press back button on the called program screen it brings me back to selection screen of the called program . I want to cm back to the screen from where i have called the zprogram.

How can i achieve that?

Regards,

Nikhil

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,827

You have to handle the logic of back button.

In logic of back button you can write :

Leave to screen or Leave Program.

Press F1 on leave.

20 REPLIES 20
Read only

MarcinPciak
Active Contributor
0 Likes
1,827

Try using LEAVE PROGRAM statement when you press BACK .

Regards

Marcin

Read only

Former Member
0 Likes
1,827

SUBMIT PROGNAME WITH dbname EQ v_fln1

EXPORTING LIST TO MEMORY

AND RETURN.

Read only

Former Member
0 Likes
1,828

You have to handle the logic of back button.

In logic of back button you can write :

Leave to screen or Leave Program.

Press F1 on leave.

Read only

Former Member
0 Likes
1,827

Hi,

I don't seem to get this issue. Sorry if I am getting your question wrong.

Did you use this USING SELECTION-SCREEN?

Read only

Former Member
0 Likes
1,827

Hi,

Have you tried using LEAVE TO SCREEN 0.

Regards

Avinash

Read only

0 Likes
1,827

Yes i have tried everything thats mentioned above but none of this works.

Read only

0 Likes
1,827

Hi,

What is the code written after the SUBMIT Stmt??

Generally, the SUBMIT and RETURN will call the program and on BACK of the o/p of called prog, it continues to the next statemnt after SUBMIT.

Thanks,

Teja.

Read only

0 Likes
1,827

Hi teja,

My statement is as follows.

SUBMIT ZREPORT WITH SELECTION-TABLE ITAB AND RETURN.

So the report is displayed in ALV, when i press the back button on the ALV list it displays the selection screen.

I want to come back to the next statement after SUBMIT and the selection screen should be skipped when i press the back button.

Regards,

Nikhil

Read only

0 Likes
1,827

This message was moderated.

Read only

0 Likes
1,827

HI abapdev,

There's a selection associated with ZREPORT which is getting skipped because i am using my submit like that. Once i click back on the ZREPORT i want to skip the selection screen of ZREPORT.

I am not concerned about the ZMAIN output.

Regards,

Nikhil

Read only

0 Likes
1,827

Hi,

Please see the below code which i did..

calling program



TABLES : mara.

PARAMETERS: p_matnr LIKE mara-matnr.

DATA : itab LIKE mara OCCURS 0 WITH HEADER LINE.

SELECT * FROM mara INTO TABLE itab UP TO 100 ROWS.

SUBMIT zytr3 AND RETURN.

LOOP AT itab.
  WRITE :/ itab-matnr.
ENDLOOP.

called program



TABLES : mara.

PARAMETERS: p_matnr LIKE mara-matnr.

DATA : itab LIKE mara OCCURS 0 WITH HEADER LINE.

SELECT * FROM mara INTO TABLE itab UP TO 100 ROWS.

LOOP AT itab.
  WRITE :/ itab-matnr.
ENDLOOP.

first i will get the output of called program and then calling program and then selection screen of calling program.

Regards,

nagaraj

Read only

0 Likes
1,827

Your code is perfect.

But my problem is the called program is a dialog program and on the back button of that a code is already written. So i have to skip that code and have to come back to my calling screen.

Regards,

Nikhil.

Read only

0 Likes
1,827

Save Our Environment. Save Yourself.

Hi Nikhil,

I afraid... this is not possible.

The code is already existing in the called program and if you don't want that it means you have to change that called program.

And this will definitely have impact on the existing ZREPORT (ZREPORT might be run separately also).

- I'm not an environmentalist. I'm an Earth warrior.

Read only

0 Likes
1,827

if the first program has an transaction.

try

leave to TRANSACTION 'ZRR'.

Remove return from submit statement

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,827

Hello KSD,

Where does the OP write LEAVE TO TRANSACTION after SUBMIT AND RETURN ? Please enlighten us.

BR,

Suhas

Read only

0 Likes
1,827

When he clicks the back button of the second program.

Keshu

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,827

So he has to change the code of the "called" program Which is easy if this is a custom code

I doubt the OP has to live with this functionality else go for a CALL TRANSACTION(if it is a standard code), whatsay guys ??

BR,

Suhas

Read only

0 Likes
1,827

He also passes a selection set.

call transaction also will do.

But if its a standard code ... its hard.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,827

You modified your answer in time, good job

Read only

0 Likes
1,827

Bulls Eye )))))