2013 Dec 26 6:04 PM
Good Afternoon.
I have a program , and this program calls a screen .
When this screen appears I can not close.
I click the 'X' button to close but not close. Which attribute of the screen, should I change to fix this?
Thanks Gurus.
2013 Dec 26 10:27 PM
Hi Ronaldo,
Did you put a status bar and set status using "set pf-status 'GUI_STAT_NAME' " at PBO?
If yes ; determine at least one function code's type as 'Exit' and handle AT EXIT-COMMAND at PAI,
or write 'LEAVE TO SCREEN 0' or 'LEAVE PROGRAM' in response to one of your button's user command at PAI.
Take a look at :
Using GUI Statuses (SAP Library - ABAP Programming (BC-ABA))
Hope it helps..
2013 Dec 26 10:27 PM
Hi Ronaldo,
Did you put a status bar and set status using "set pf-status 'GUI_STAT_NAME' " at PBO?
If yes ; determine at least one function code's type as 'Exit' and handle AT EXIT-COMMAND at PAI,
or write 'LEAVE TO SCREEN 0' or 'LEAVE PROGRAM' in response to one of your button's user command at PAI.
Take a look at :
Using GUI Statuses (SAP Library - ABAP Programming (BC-ABA))
Hope it helps..
2013 Dec 27 3:06 AM
Hello Ronaldo.
If the screen type is Modal dialog,
you have to activate the GUI status for close icon and then code its business logic in PAI.
Regards.
2013 Dec 27 3:21 AM
Hi Ronaldo Aparecido,
When we use screen type as model dialog box, we need to use syntax like LEAVE TO SCREEN 0.
Instead of can you use below function module
POPUP_TO_CONFIRM.
Arivazhagan S
2013 Dec 27 4:10 AM
Hii Rronaldo,
You have to set and activate the PF-STATUS of the screen in PBO of the screen like BACK, EXIT and CANCEL button.
And when the button will be clicked , you have to code in PAI of the screen to come out of the screen.
Suppose you call screen 9000.
MODULE status_9000 OUTPUT.
SET PF-STATUS 'ZSTATUS'.
ENDMODULE.
double click the ZSTATUS and under Function Keys--->Standard Toolbar , Set the BACK EXIT and CANCEL button. As shown in pics
Now to come out of the screen, code in the PAI of that screen like below,.
MODULE user_command_9000 INPUT.
DATA ok_code TYPE sy-ucomm.
CASE ok_code.
WHEN 'BACK' OR 'CANCEL'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE.
Regards
Syed
2013 Dec 27 5:32 AM
Hi Ronaldo,
As I have understood, The close button is enabled but its function code is not defined for the screen which you want to close. Just define in the PAI:
MODULE USER_COMMAND_1000 INPUT.
CASE SY-UCOMM .
WHEN 'BACK' OR 'EXIT'.
LEAVE PROGRAM.
Regards
Purnand