Skip to Content
avatar image
Former Member

back exit cancel buttons not working

Hello Experts,

I made one screen and maintained gui status for that screen.

In the Status of the screen I had assigned back,exit and cancel buttons to the respective functions:

back exit and canc

But while executing the report these buttons are not working. I am able to click these buttons but nothing is happening.

What should I do to make gui-status work?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Jun 27, 2011 at 11:04 AM

    Hi,

    you need to define a module to process these.

    " MODULE EXIT at exit command " in the PAI.

    there check the function code and do desired function.

    EG:

    CASE SY_UCOMM

    WHEN 'BACK'

    LEAVE TO SCREEN 0.

    WHEN 'EXIT'.

    .................

    endcase.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 27, 2011 at 12:21 PM

    Hey In the Module USER_COMMAND

    wrtie the below mentioned code.

    CASE sy-ucomm.

    When 'BACK' or 'EXIT' or 'CANCEL'.

    Leave to screen 0.

    Endcase.

    If you assigned the Exit code 'E' for these Function Codes then write the below mentioned code.

    Module USER_COMMAND At Exit-Command.

    CASE sy-ucomm.

    When 'BACK' or 'EXIT' or 'CANCEL'.

    Leave to screen 0.

    Endcase.

    Hope you understand...

    Regards,

    Bhargav

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 27, 2011 at 12:23 PM

    Hi,

    At exit-command will work only if the screen has got mandatory fields. If your screen does not contain any mandatory fields, then normal code will work.

    Try this code in PAI of that screen within a module.

    case sy-ucomm.
        when 'Back'.
           leave to screen 0.
        when 'EXIT'.
           leave program.

    .......

    If your screen contains any mandatory fields write the same code as:

    module screen AT EXIT-COMMAND.

    and inside this module write the same code as given above

    Before the code, just in the function keys which you have set in the PF Status. In the exit function key, give the function type as 'E'.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 27, 2011 at 12:32 PM

    Hi,

    you need to write code in PAI , inorder to handle these buttons .

    Case sy-ucomm.

    when ' BACK' or 'CANC' or 'EXIT'.

    leave to screen zero.

    endcase.

    You need to define Module exit_test at exit command incase you have any mandatory field on that screen

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 27, 2011 at 01:21 PM

    THANK YOU.

    SOLVED

    Add comment
    10|10000 characters needed characters exceeded