Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Pop up message

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

*

*

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

Former Member
0 Kudos

Thank you so much for all your help.