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: 

Frm ALV am calling scrn, if click cancel in scrn ALV appear,BACK nt working

Former Member
0 Kudos

Dear All,

I created one ALV Report and provided buttons in tool bar. when user clicks button, which ever line selected in ALV, it has to appear in the new POPUP screen '1100' with table control view.

In Popup screen, If user clicks cancel, ALV page has appeared without refresh.

Now issue - if i click BACK (Standard) in ALV, its going to screen 1100. But it has to go selection screen page.

Note : when executing report, ALV back button is working fine.But once called screen 1100, then came back to ALV again. now back button is not working.

where should i correct.

Please give the solution for this issue.

Regards

leo.

1 ACCEPTED SOLUTION

former_member184578
Active Contributor
0 Kudos

Hi.,

That is right..!! UR order is ., selection screen -> ALV -> Screen 1100., now at screen 1100 when u press back it will go to ALV only.,

i think in ur PAI for 1100 u wrote:

if sy-ucomm = 'BACK'.

set screen 0.

leave screen.

else if sy-ucomm = 'CANCEL'.

set screen 0.

leave screen.

endif.

so it is happening like tat.

Now when u press back if u want to go to selection screen.,

create a transaction for ur report., let say ZPOPUP. ( hope u know how to create a tcode., go to se93 and create tcode for ur program)

now

in PAI of 1100 screen.,

if sy-ucomm = 'BACK'.

call transaction 'ZPOPUP'. " or leave to transaction ...

else if sy-ucomm = 'CANCEL'.

set screen 0.

leave screen.

endif.

hope this helps u.,

reply if u need some more clarification.,

Thanks & Regards

Kiran

7 REPLIES 7

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

How did you call your screen 1100?

When the user clicks 'Cancel' in screen 1100, what is the code that returns to the ALV grid?

former_member184578
Active Contributor
0 Kudos

Hi.,

That is right..!! UR order is ., selection screen -> ALV -> Screen 1100., now at screen 1100 when u press back it will go to ALV only.,

i think in ur PAI for 1100 u wrote:

if sy-ucomm = 'BACK'.

set screen 0.

leave screen.

else if sy-ucomm = 'CANCEL'.

set screen 0.

leave screen.

endif.

so it is happening like tat.

Now when u press back if u want to go to selection screen.,

create a transaction for ur report., let say ZPOPUP. ( hope u know how to create a tcode., go to se93 and create tcode for ur program)

now

in PAI of 1100 screen.,

if sy-ucomm = 'BACK'.

call transaction 'ZPOPUP'. " or leave to transaction ...

else if sy-ucomm = 'CANCEL'.

set screen 0.

leave screen.

endif.

hope this helps u.,

reply if u need some more clarification.,

Thanks & Regards

Kiran

0 Kudos

Exact solution. very very thanks.

0 Kudos

Hi All,

Am facing one more issue in this thread.

In POPUP screen 1100, If user clicks cancal, it reached ALV. thats working fine.

Now client says new requirement :

In Popup screen 1100, If user did any changes and clicks cancel, one more POPUP alert has to appear ( yes or no ).

If user clicks YES, then same 1100 POPUP screen has to appear.

Else user clicks NO, then ALV screen has to appear.

Code for Cancel Button

************************************************************************************

IF sy-ucomm = 'CANCEL'.

DATA: pfd_alert TYPE char1.

CALL FUNCTION 'POPUP_TO_CONFIRM'

EXPORTING

titlebar = ' CANCEL'

text_question = 'Do you want to save the changes?.'

text_button_1 = 'Yes'

icon_button_1 = ' '

text_button_2 = 'No'

icon_button_2 = ' '

default_button = '1'

display_cancel_button = ''

start_column = 25

start_row = 6

IMPORTING

answer = pfd_alert

EXCEPTIONS

text_not_found = 1

OTHERS = 2

.

IF sy-subrc <> 0.

ENDIF.

IF pfd_alert EQ '1'.

MESSAGE e019 WITH 'Test Go to screen 1100'.

ELSE.

MESSAGE e019 WITH 'Test Go to ALVscreen'.

SET SCREEN 0.

LEAVE SCREEN.

ENDIF.

************************************************************************************

thanks & regards

chessleo.

Edited by: chessleo on Apr 27, 2011 4:00 PM

Former Member
0 Kudos

Hi Chessleo,

The problem may be in the ok-code of the ALV tool bar button. Once you click the button, you are calling all the pop up screen. Now the solution is, clear the okcode immediately after calling the pop up screen 1100.

Hope this is helpful.

Cheers,

Vivek.

Former Member
0 Kudos

New Requirement in same thread. Kindly provide solution.

Former Member
0 Kudos

Working fine...

Edited by: chessleo on Apr 27, 2011 4:34 PM