06-27-2011 11:24 AM
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?
06-27-2011 12:04 PM
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.
06-27-2011 12:04 PM
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.
06-27-2011 1: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
06-27-2011 1: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'.
06-27-2011 1: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
06-27-2011 1:52 PM
Have you set your defined status in PBO like:
SET PF-STATUS 'STATUS_100' EXCLUDING exctab.
Regards,
Christian
Edited by: christian goerke on Jun 27, 2011 2:52 PM
06-27-2011 2:21 PM