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: 

Doubt

Former Member
0 Kudos

if i am going to delete a record .i am using a message box asking are u sure want to delete .how can i check that i pressed the ok button.and continue the deletion or revert back.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

In that function module there must be a flag which will be with either '0' and '1' Or 'Y' and 'N' .. Check accordingly and that will solve your probelm.

Hope this solves your purpose.

Award points if it helps.

-Gaurang

8 REPLIES 8

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'.
  * delete
else.
 * do nothing
endif.

Former Member
0 Kudos

Hi,

Try this codes:

  call function 'POPUP_CONTINUE_YES_NO'
      exporting
        defaultoption = 'Y'
        textline1     = 'Do you want to delete record
        titel         = 'delete confirmation'
        start_column  = 25
        start_row     = 6
      importing
        answer        = g_answer.
    if g_answer = 'J'.
      delete itab..
    endif.

Former Member
0 Kudos

Hi,

In that function module there must be a flag which will be with either '0' and '1' Or 'Y' and 'N' .. Check accordingly and that will solve your probelm.

Hope this solves your purpose.

Award points if it helps.

-Gaurang

Former Member
0 Kudos

Hi Magesh.

u can use FM poput_to_confirm

i think this one is help full 4 u.

pls Reward me if this is helpfull

thank u

mayukh

Former Member
0 Kudos

use FM POPUP_TO_CONFIRM.

in this get the importing parameter & check.

if the importing parameter ANSWER is 1 (yes pushbutton is clicked)

if its 2(NO pushbutton is clicked)

if answer = '1'.

delete record.

else.

message.

endif.

Former Member
0 Kudos

Hi,

you need to define an ok_code in the element list and an fktcode for the button (attibutes)

You can select this inside an PAI-module and define a roll-back if for e.g. CANC is pressed.

Regards

Nicole

Former Member
0 Kudos

Hi Magesh,

How are you displaying the pop up asking are you sure you want to delete? The function module you are using would provide you with a return value to capture user response. You can then use this return value to determine next course of action.

You can use the FM 'C14A_POPUP_CONFIRM_DELETE' for this.

Hope this helps!

Regards,

Saurabh

Former Member
0 Kudos

plz try with FM POPUP_TO_CONFIRM module,

also u can use POPUP_CONTINUE_YES_NO..

try reward if u feel ok