07-13-2005 12:25 PM
Hi sap gurus. Could you please help me in my program. I'm trying to display a message box with a 'yes' and 'no' button on it. I would then have to check if the user click on the 'yes' button or on the 'no' button. Could you please help me in how to achieve this. Perhaps an article or a piece of code. Any help would do. Thanks in advance.
07-13-2005 12:28 PM
Hi Ferdinand,
maybe this helps:
data: answer TYPE c.
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
defaultoption = 'N'
textline1 = "Your question"
textline2 = "continue the question"
titel = ' '
start_column = 35
start_row = 6
IMPORTING
answer = answer.
IF answer EQ 'J' OR answer EQ 'Y'.
l_inact = ' '.
ELSEIF answer EQ 'N'.
l_inact = 'X'.
ELSEIF answer EQ 'A'.
EXIT.
ENDIF.
07-13-2005 12:28 PM
Hi Ferdinand,
maybe this helps:
data: answer TYPE c.
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
defaultoption = 'N'
textline1 = "Your question"
textline2 = "continue the question"
titel = ' '
start_column = 35
start_row = 6
IMPORTING
answer = answer.
IF answer EQ 'J' OR answer EQ 'Y'.
l_inact = ' '.
ELSEIF answer EQ 'N'.
l_inact = 'X'.
ELSEIF answer EQ 'A'.
EXIT.
ENDIF.
07-13-2005 12:39 PM
U can use
<b>POPUP_TO_CONFIRM</b>
ABAP Pop-out box for user confirmation
*
To pop-out a box for the user to confirm
*
Written by : SAP Basis, ABAP Programming and Other IMG Stuff
*
REPORT ZPOPUPCONFIRM.
DATA: X_ANS(1) TYPE C.
call function <b>'POPUP_TO_CONFIRM_STEP'</b>
exporting
DEFAULTOPTION = 'Y'
textline1 = 'Do you want to continue'
TEXTLINE2 = ' '
titel = 'Please Confirm'
START_COLUMN = 25
START_ROW = 6
CANCEL_DISPLAY = 'X'
IMPORTING
ANSWER = X_ANS.
WRITE: / X_ANS.
*-- End of Program
can also check this one
POPUP_TO_CONFIRM_STEP Create a dialog box in which you make a question whether the user wishes to perform the step.
POPUP_TO_CONFIRM_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point during an action.
POPUP_TO_CONFIRM_WITH_VALUE Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object.
POPUP_TO_DECIDE Provide user with several choices as radio buttons
POPUP_TO_DECIDE_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point via a diagnosis text.
POPUP_TO_DISPLAY_TEXT Create a dialog box in which you display a two line message
POPUP_TO_SELECT_MONTH Popup to choose a month
Message was edited by: Judith Jessie Selvi
07-13-2005 12:41 PM