04-25-2011 3:54 PM
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.
04-26-2011 5:08 AM
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
04-25-2011 7:38 PM
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?
04-26-2011 5:08 AM
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
04-26-2011 7:01 AM
04-27-2011 11:27 AM
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
04-26-2011 5:23 AM
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.
04-27-2011 11:34 AM
04-27-2011 3:29 PM