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

Screen flow not working

Former Member
0 Likes
851

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.

5 REPLIES 5
Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
808

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

Read only

Former Member
0 Likes
808

Hi, In PAI, include code when user click BACK button:-

MODULE user_command.

CASE sy-ucomm.

WHEN 'BACK'.

leave to screen 900.

ENDCASE.

ENDMODULE.

Read only

Former Member
0 Likes
808

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  INPUT

Hope this will help you.

Regards

Hareesh Menon

Read only

former_member376453
Contributor
0 Likes
808

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

Read only

Former Member
0 Likes
808

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