‎2009 Mar 09 5:26 AM
Hi Experts,
I have a screen 9000 from which I want to display a "list output". I have set a pf-status for 9000.
In PAI of 9000 I written like
leave TO LIST-PROCESSING AND RETURN TO SCREEN 9000.
write : / 'hai'.
leave screen.
The list output comes correctly, but when I press Back button it didn't go to 9000 screen. Moreover in the status bar I am able to see the fuction code of 9000's Back button. But 9000's PAI also don't get triggered. How can I handle this situation. Can I handle user command of list processing screen.
Thanks and regards,
Venkat.
‎2009 Mar 09 5:52 AM
Hi,
>
> Hi Experts,
> I have a screen 9000 from which I want to display a "list output". I have set a pf-status for 9000.
> In PAI of 9000 I written like
>
> leave TO LIST-PROCESSING AND RETURN TO SCREEN 9000.
> write : / 'hai'.
> leave screen.
>
> The list output comes correctly, but when I press Back button it didn't go to 9000 screen. Moreover in the status bar I am able to see the fuction code of 9000's Back button. But 9000's PAI also don't get triggered. How can I handle this situation. Can I handle user command of list processing screen.
>
> Thanks and regards,
> Venkat.
As per your requirement follow code:-
In PAI:-
LEAVE TO LIST-PROCESSING.
WRITE : / 'HELLO'.
"other write statements......
Now in PAI, include code when user click BACK button:-
MODULE user_command.
CASE sy-ucomm.
WHEN 'BACK'.
SET SCREEN '9000'.
LEAVE SCREEN.
ENDCASE.
ENDMODULE.
Hope this helps you.
Regards,
Tarun
‎2009 Mar 09 10:18 AM
Hi, In PAI, include code when user click BACK button:-
MODULE user_command.
CASE sy-ucomm.
WHEN 'BACK'.
leave to screen 900.
ENDCASE.
ENDMODULE.
‎2009 Mar 09 3:54 PM
Hi Venkat
try this code.
In this you need to call a screen 100 that contains a PUSH BUTTON with fcode 'PUSH'.
When you push this button it will trigger LEAVE TO LIST-PROCESSING.
Now the list is displayed.If you press back on thes list it will take you bavk to screen 100.
REPORT zscreen.
CALL SCREEN 100.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'PUSH'.
LEAVE TO LIST-PROCESSING .
WRITE : / 'hai'.
WHEN 'BACK'.
LEAVE TO SCREEN 100.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUTHope this will help you.
Regards
Hareesh Menon
‎2009 Mar 09 4:06 PM
You haven't wrote anything in your code to handle the back functionality. So, you need to create a Case for your Back button as well. As specified by Hareesh, I think in your case:
When 'PUSH'.
Leave to screen 0. "this will bring you to your first screen
Kuntal
Edited by: Kuntal Nandi on Mar 9, 2009 11:06 AM
Edited by: Kuntal Nandi on Mar 9, 2009 11:08 AM
‎2009 Mar 11 10:28 AM
hi
try this
in SE51
process before output.
module status_8000.
loop with control control.
module fill_table_control.
endloop.
process after input.
loop with control control.
module read_table_control.
endloop.
module status_8000 output.
set pf-status 'STATUS'.
set titlebar 'TITLE'.
endmodule. " STATUS_8000 OUTPUT
double click of status it will take u to SE41 Menupainter, in the StandardToolbar tab enter BACK for back button and double click on BACK to assign the Function Type : E (Exit Command) save and activate it.
module user_command_8000 input.
case sy-ucomm.
when 'BACK'.
leave program.
OR u can also try this
data : wk_answer.
when 'BACK'.
call function 'POPUP_TO_CONFIRM_STEP'
exporting
defaultoption = 'Y'
textline1 = 'Do you wish to exit'(004)
textline2 = 'Confirm?'(005)
titel = 'Exit Processing'(006)
start_column = 25
start_row = 6
cancel_display = 'X'
importing
answer = wk_answer.
case wk_answer.
when 'J'.
leave program.
endcase.
endcase.
endmodule. " USER_COMMAND_8000 INPUT
Regards