‎2006 Jun 15 4:25 AM
Hi ,
I am using a push button in screen.
What should i do to click event for it.
I want a popup message when i click that button.
How should i proceed.
Regrds,
Priya
‎2006 Jun 15 4:32 AM
Priya,
I am assuming you are talking about DIALOG pprogramming.
In the PAI event of the screen, you will have to handle all the function codes. You can assign a function code to the button in the screen editor.
In the PAI.
CASE SY-UCOMM.
WHEN 'PUSH'.
MESSAGE XXXXXXXX
Or call a POPUP function to display a POP UP.
Regards,
Ravi
‎2006 Jun 15 4:37 AM
Hi
In the PAI event, you will check which button has been clicked. If the 'next' button is clicked,
display the message.
Rgds,
Jothi.
‎2006 Jun 15 4:56 AM
Hi Priya,
1.
Check this event under Screen Flow Logic .
<b>PROCESS AFTER INPUT.</b>
MODULE USER_COMMAND_1000.
MODULE user_command_1000 INPUT.
okcode = sy-ucomm.
CLEAR sy-ucomm.
CASE okcode.
WHEN 'CHANGE'.
Call Function module
<b>POPUP_TO_CONFORM</b> or
<b>POPUP_DISPLAY_MESSAGE</b>
ENDCASE.
I hope that it helps u .
<b>Thanks,
Venkat.O</b>
‎2006 Jun 15 5:17 AM
Hi Priya,
I believe that your are using Dialog programming,
1. While creating the button you might have given a function code to that button. Am I right ???
2. Now what ever you do on the screen with the UI elements, the corresponding function code would be captured in the PAI event ( Process After Input) in the system variable sy-ucomm.
3. Now create a module like MODULE_GET_FCODE under the event PROCESS AFTER INPUT.
4. Now check for the sy-ucomm ( This variable will hold the function code of the UI element that you had clicked)
5. Using this variable, you can call FM's like POPUP_TO_CONFIRM etc.,, or else you can handle you own process here.
Hope this clears.
Regs,
Venkat Ramanan
Message was edited by: Venkat Ramanan Natarajan
‎2006 Jun 15 6:11 AM
Hi Priya,
a) If u r talking about push button on selection-screen,
1)SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 33(10) pushy USER-COMMAND DISPLAY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
2) INITIALIZATION.
PUSHY = 'DISPLAY'.
3) AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN 'DISPLAY'.
Display Message.
ENDCASE.
b) If u r talking about Module pool programming,
1) U would have created a push button on the screen and function code attached to it say it is 'DISPLAY'.
2) In the PAI event
MODULE user_command_xxx INPUT.
CASE sy-ucomm.
WHEN 'DISPLAY'.
Display error message.
ENDCASE.
Hope it will help u in some way. Thank u,
‎2006 Jun 15 6:31 AM
Hi,
DAta wans type C.
In the PAI.
CASE SY-UCOMM.
WHEN 'PUSH'.
Call the Function Module...
Call function 'POPUP_TO_CONFIRM_STEP'
EXPORTING
textline1 = 'Your Message'
titel = 'FINAL'
cancel_display = ' '
IMPORTING
answer = wans.
if wans = 'J'.
PERFORM get_remarks.
ELSE.
LEAVE TO SCREEN 0.
ENDIF.
Hope it would solve your purpose...
Kindly reward the points...