While developing a program, I need to show a pop screen. Normally, I do this way.
CALL SCREEN 200 STARTING AT 2 2.
However, I have a problem on how to trigger this small "x" button at the upper right of the screen like this one below.
Since I was puzzled how it was done, I did some research and testing, I found the solution which I will detailed below. This are simple steps to implement such functionality in sap dialog programming.
STEPS:
1. Set your pop up screen as a modal dialog box. Never select it as a normal. For you to set it, go to SE80 then select screen from the nodes at the left part. Once done, click on the attribute tab and there you will see the screen type of the screen.
2. Create a PF-STATUS which is Dialog Box type.
3. Then inside this status, there are two default command. One for the ok/continue and one for the exit/cancel command. So I used here the cancel command for the "x" button.
4. In the PAI of your pop up screen, catch the sy-ucomm. In this example I used CANCEL.After that, activate and run your program. Be sure to put a debug point in the PAI so that when you hit the small "x" button, it will stop into your PAI.
I hope I share again a simple tip to everyone on how to trigger the small exit button in a pop up screen using sap dialog programming. For any comments and suggestions, you may leave it below and I am happy to hear from you.
Enjoy... :)
CALL SCREEN 200 STARTING AT 2 2.
However, I have a problem on how to trigger this small "x" button at the upper right of the screen like this one below.
Since I was puzzled how it was done, I did some research and testing, I found the solution which I will detailed below. This are simple steps to implement such functionality in sap dialog programming.
STEPS:
1. Set your pop up screen as a modal dialog box. Never select it as a normal. For you to set it, go to SE80 then select screen from the nodes at the left part. Once done, click on the attribute tab and there you will see the screen type of the screen.
2. Create a PF-STATUS which is Dialog Box type.
3. Then inside this status, there are two default command. One for the ok/continue and one for the exit/cancel command. So I used here the cancel command for the "x" button.
4. In the PAI of your pop up screen, catch the sy-ucomm. In this example I used CANCEL.After that, activate and run your program. Be sure to put a debug point in the PAI so that when you hit the small "x" button, it will stop into your PAI.
I hope I share again a simple tip to everyone on how to trigger the small exit button in a pop up screen using sap dialog programming. For any comments and suggestions, you may leave it below and I am happy to hear from you.
Enjoy... :)
No comments:
Post a Comment