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: 

I want to give a pop to confirm while saving PR&PO,for the optionbutton NO

Former Member
0 Kudos

Hi ,

i want give warning message by "pop-up to confirm" in PR while saving it.if the person press 'yes' then it should allow to save ,and if pressed 'no' then remains the previous screen in edit mode.

For 'yes' there is no prob. its getting saved going to display mode .

but for 'no' dont know how to get previous screen values in edit mode.similiarly i have to do the same for PO.

i am using badi "ME_PROCESS_REQ_CUST" method "POST" for PR.

And "ME_PROCESS_PO_CUST" method "CHECK" for PO

please provide your valuable ideas.

Regards,

sureshraj.M

2 REPLIES 2

former_member203305
Active Contributor
0 Kudos

Hi,

just add the following code to the badis that u mention.


data: l_ans.

      CALL FUNCTION 'POPUP_TO_CONFIRM'
        EXPORTING
          titlebar              = 'Save data'
          text_question         = 'Are you sure that you want to save the data??'
          text_button_1         = 'Yes'
          text_button_2         = 'No'
          default_button        = '1'
          display_cancel_button = ' '
          start_column          = 25
          start_row             = 6
        IMPORTING
          answer                = l_ans.

if l_ans = '2'.  " it means NO saveing
    mmpur_message_forced 'E' '000' '398' 'No saving data' '' '' ''.
endif.

Regards

0 Kudos

Hi ,

I already tried it by using the macros include,but it is allowing to save the datas.

regards

sureshraj.M