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

GUI STATUS BACK BUTTON

Former Member
0 Likes
3,189

Hi Experts,

Just want to seek your help in my problem. I have a program with gui status, I've already done already to all gui except to the BACK BUTTON. Everytime I hit this I just return on my previous screen. Is it possible that everytime I hit back button I will return to my selection-screen. I've already used LEAVE TO SCREEN 0, LEAVE TO LIST-PROCESSING, LEAVE LIST-PROCESSING and LEAVE SCREEN but nothings happen. By the way, I just used write statement for my output. Thanks so much.

Regards,

-Anna

Edited by: ascapilos on Feb 4, 2011 7:43 AM

6 REPLIES 6
Read only

Former Member
0 Likes
1,758

hi,

How many screens are there in your program. as you said that you have just used a write statement means that you have only one screen that is your selection screen.

leave to screen 0 works and it takes you to your selection screen.

where have to written the code for Back Button.

you write the code in the event At user command for report and module pool in PAI of the screen.

check for sy-ucomm vale and then write your code.

Read only

Former Member
0 Likes
1,758

Try directly calling your program on the press of back button.

FOr eg


If sy-ucomm eq'BACK'

    CALL TRANSACTION 'ZXXXX'

endif.

Read only

syed_ibrahim5
Active Participant
0 Likes
1,758

hi anna,

if your gui status is a customized status then try changing the function code of the back button to any other name like 'BCAK' or something and then write coding for that.

with regards,

syed

Read only

Former Member
0 Likes
1,758

Hi Experts,

What I did is this:

WHEN c_back.

LEAVE TO SCREEN 0.

Where c_back is declared as c_back(4) VALUE 'BACK'

This is inside the case statement since I also have other button. The declaration is inside the at user-command.

But still nothings happen. Thanks so much.

Regards,

-Anna

Edited by: ascapilos on Feb 4, 2011 9:57 AM

Read only

0 Likes
1,758

Hi,

To my understanding, you have used a selection screen and then had normal WRITE stmt for output.

Ex:

Screen 100 has Sel Screen and calls screen 101.

In Screen logic of 101.

case sy-ucomm.

when 'BACK'.

call transaction

when 'EXEC'.

Write : 'Hai'.

leave to list-processing.

endcase.

This takes you to the output screen on execution & here the clicking the BACK button, your GUI status code case... endcase will not be triggered. On clicking BACK, you will return to the previous calling Screen.

If you need the initial selection screen (100) to be displayed on clicking BACK, then code as :

leave to list-processing and return to screen 100.

Regards,

Satish

  • Kindly mark it, if u found it useful

Edited by: satish kanteti on Feb 4, 2011 2:43 PM

Read only

0 Likes
1,758

Try to call to scrreen:

For eg:

  CASE sy-ucomm.
WHEN 'ADD_A'.
CALL SCREEN 9001.