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

Abap Programing

Former Member
0 Likes
900

Hi All,

I have to show one message before saving the data that maseeage box must contain 'yes' and 'no' options. If i say 'yes' then the data has to be save or update in the data base. If i say 'no' data should not be save or update in the data base. How to work on this?

regards,

Phanikumar.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
876
data : l_ans(1).

CALL FUNCTION 'POPUP_CONTINUE_YES_NO'
         EXPORTING
              DEFAULTOPTION = 'Y'
              TEXTLINE1     = 'line1'
              TEXTLINE2     = 'line2'
              TITEL         = 'HEADING'
         IMPORTING
              ANSWER        = L_ANS
         EXCEPTIONS
              OTHERS        = 1.

if l_ans eq 'J' or 'Y'.
  * update database
else.
 * do nothing
endif.
6 REPLIES 6
Read only

Former Member
0 Likes
876

Hi

You can do this using Module pool programming by creating Push buttons and writing flow logic.

Regards

Haritha.

Read only

Former Member
0 Likes
876

Pls use the function module

POPUP_TO_CONFIRM

It is very easy to use and provides exactly what you want

Read only

Former Member
0 Likes
876

Hi,

Use the FM 'POPUP_TO_CONFIRM'

Read only

Former Member
0 Likes
876

Hi phanikumar,

i don't have an SAP at the current time.

Look with SE37 for POPUP_TO*

Hope it helps.

Regards, Dieter

Read only

Former Member
0 Likes
877
data : l_ans(1).

CALL FUNCTION 'POPUP_CONTINUE_YES_NO'
         EXPORTING
              DEFAULTOPTION = 'Y'
              TEXTLINE1     = 'line1'
              TEXTLINE2     = 'line2'
              TITEL         = 'HEADING'
         IMPORTING
              ANSWER        = L_ANS
         EXCEPTIONS
              OTHERS        = 1.

if l_ans eq 'J' or 'Y'.
  * update database
else.
 * do nothing
endif.
Read only

Former Member
0 Likes
876

Answered