Application Development and Automation 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: 
Read only

message

Former Member
0 Likes
1,337

i want to prompt a message with 'yes' and 'No'. if user wants to continue he can do..what is the provision for that.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,308

Hi,

Please take the help from this code :

DATA: header(30),

Question(30),

answer(20),

button1(10),

button2(10).

header = 'Confirm for Deletion'.

question = 'Do you want to Continue'.

button1 = 'Yes'.

button2 = 'No'.

CALL FUNCTION 'POPUP_TO_CONFIRM'

EXPORTING

TITLEBAR = header

TEXT_QUESTION = question

TEXT_BUTTON_1 = button1

TEXT_BUTTON_2 = button2

DEFAULT_BUTTON = '1'

IMPORTING

ANSWER = answer

EXCEPTIONS

TEXT_NOT_FOUND = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

if answer eq '1'.

continue................................

ENDIF.

Reward points, if helpful,

Sandeep Kaushik

8 REPLIES 8
Read only

amit_khare
Active Contributor
0 Likes
1,308

use POPUP_CONTINUE_YES_NO.

Regards,

Amit

Read only

Former Member
0 Likes
1,308

Hi,

Use popup messages to display it.

go to se37 , popup you will get the list of FMs.

Choose appropriate.

Reward if useful!

Read only

Former Member
0 Likes
1,309

Hi,

Please take the help from this code :

DATA: header(30),

Question(30),

answer(20),

button1(10),

button2(10).

header = 'Confirm for Deletion'.

question = 'Do you want to Continue'.

button1 = 'Yes'.

button2 = 'No'.

CALL FUNCTION 'POPUP_TO_CONFIRM'

EXPORTING

TITLEBAR = header

TEXT_QUESTION = question

TEXT_BUTTON_1 = button1

TEXT_BUTTON_2 = button2

DEFAULT_BUTTON = '1'

IMPORTING

ANSWER = answer

EXCEPTIONS

TEXT_NOT_FOUND = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

if answer eq '1'.

continue................................

ENDIF.

Reward points, if helpful,

Sandeep Kaushik

Read only

Former Member
0 Likes
1,308

AFAIK this is not possible.

you got 5 messag types in SAP: E, I, S, A, X.

Read only

Former Member
0 Likes
1,308

Use the FM:

POPUP_TO_DECIDE

Read only

former_member404244
Active Contributor
0 Likes
1,308

Hi,

use the function module

POPUP_CONTINUE_YES_NO

Regards,

Nagaraj

Read only

Former Member
0 Likes
1,308

hello,

try this and reward if found helpfull.

Regards,

Rakesh



DATA: wrk_answer TYPE c VALUE space.

CALL FUNCTION 'POPUP_TO_CONFIRM'
      EXPORTING
        text_question  = text-001 "Enter the message you want to display here
      IMPORTING
        answer         = wrk_answer
      EXCEPTIONS
        text_not_found = 1
        OTHERS         = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

Read only

Former Member
0 Likes
1,308

Hi,

Use the FMs:

POPUP_TO_CONFIRM_STEP

POPUP_TO_CONFIRM_WITH_VALUE (with Back and Exit)

POPUP_TO_DECIDE

POPUP_TO_DECIDE_WITH_MESSAGE

Hope thishelps.

Reward if helpful.

Regards,

Sipra