Before a critical operation starts , we often need user to confirm the operation just to be sure that the process wasn't started mistakenly. Simplest example for this purpose ;
data : lv_mes type string.data lv_answer.lv_mes = 'Your question here'.call function 'POPUP_TO_CONFIRM'exportingtitlebar = 'Popup Title'text_question = lv_mestext_button_1 = 'YES'icon_button_1 = 'ICON_OKAY' " 1st Buttons icontext_button_2 = 'NO'icon_button_2 = 'ICON_CANCEL' "2nd Buttons icondefault_button = '2' " Default choice - NOdisplay_cancel_button = 'X' " 3rd button(CANCEL) is visible or notimportinganswer = lv_answerexceptionstext_not_found = 1others = 2.**** RESULTIF lv_answer = '1'. " 1st button has clickedELSEIF lv_answer = '2'. " 2nd button has clickedELSEIFlv_answer = 'A'. " CANCEL button has clickedENDIF.
No comments:
Post a Comment