Skip to Content
author's profile photo Former Member
Former Member

Unable to exit or go back from a program

I am unable to exit or go back on a program after it's executed. I would need to use the "/n" to exit out of the program. Why and how can I fix this? Thanks.

NewSession.JPG (18.2 kB)
Add comment
10|10000 characters needed characters exceeded

5 Answers

  • Best Answer
    Posted on Feb 22, 2016 at 08:59 PM

    Delete your GUI status and copy GUI status from a demo program. You are clearly missing functions for all the navigation buttons, so no wonder they are not working. Just look at any ALV program that does work.

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 21, 2016 at 04:08 PM

    Hello Shawn,

    Go to GUI status of the screen and check whether Function code is assigned to BACK icon, if it is assigned, check whether it is active.

    If the function code is black then it means it is active, if it is red it means it is inactive. Click on function code icon and activate them.

    Regards,

    Thanga

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Shawn,

      There is no function codes available for any ICON in your GUI.

      If your report is an ALV report? If yes, copy the GUI status of standard ALV output to your GUI status.

      If it is other than ALV, then assign a Function code to BACK icon and write an action for that fucntion code in your Z* program under PAI.

      Regards,

      Thanga

  • Posted on Feb 22, 2016 at 03:41 PM

    Then the problem might be a missing (or non triggered) user-command. Try debugging and see where you end up in the code. Normally you should see a case (or if) command that deals with sy-ucomm (or the ok-code that you can find on the bottom of the element list of the screen).

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 23, 2016 at 06:07 AM

    Hi,

    if you are using custom GUI status then you have to define functionality for the buttons in USER-COMMAND event or you can copy the GUI status from demo programs provided by SAP i.e

    copy PF status 'STANDARD' of program SAPLSALV to your program using SE41 (menu painter).

    thanks!!

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 20, 2016 at 08:46 AM

    IF it is customized program , assign fcodes to the BACK AND EXIT ICON and put condition.

    DATA : ucomm type sy_ucomm.

    ucomm = sy-ucomm .

    IF sy-ucomm = 'EXIT' OR

    sy-ucomm = 'BACK'.

    Leave Program.

    Endif.

    Add comment
    10|10000 characters needed characters exceeded