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: 

Abap Programing

Former Member
0 Kudos

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

Former Member
0 Kudos
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

Former Member
0 Kudos

Hi

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

Regards

Haritha.

Former Member
0 Kudos

Pls use the function module

POPUP_TO_CONFIRM

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

Former Member
0 Kudos

Hi,

Use the FM 'POPUP_TO_CONFIRM'

Former Member
0 Kudos

Hi phanikumar,

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

Look with SE37 for POPUP_TO*

Hope it helps.

Regards, Dieter

Former Member
0 Kudos
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.

Former Member
0 Kudos

Answered