Hi all,
I am using POPUP_TO_CONFIRM_LOSS_OF_DATA function module to give a pop-up message when the data is changed in the screen.
I am triggering this POP-UP when the 'BACK' button is hit.
But I when we select 'NO' also in the Pop-up it is coming out of the screen. How to handle the answer = 'N' option? how to remain in the same screen when we select 'NO'.
Can anyone help me plz?
Regards,
Nag
You can use like this:
CALL FUNCTION 'POPUP_TO_CONFIRM_LOSS_OF_DATA' EXPORTING TEXTLINE1 = TEXT-PC1 TEXTLINE2 = TEXT-PC2 TITEL = TEXT-PC3 IMPORTING ANSWER = LV_ANSWER. IF LV_ANSWER = 'N' OR LV_ANSWER = 'A'. STOP. else. * process of loosing ENDIF.
Regards,
Naimesh Patel
&----
*& Module exit INPUT
&----
text
----
*
*on selecting the cancel button
module exit input.
case ok_code2.
when 'CANCEL'.
data answer type c.
set hold data on.
if sy-datar eq 'X'.
call function 'POPUP_TO_CONFIRM'
exporting
text_question = 'Would you like to save the data?'(a02)
importing
answer = answer
exceptions
text_not_found = 1
others = 2.
case answer.
when '1'.
perform save.
when '2'.
message 'SUCCESS: EXITING...SUCCESSFUL' type 'S'.
leave program.
when 'A'.
set screen 200.
endcase.
set hold data off.
else.
leave program.
endif.
*on selecting the exit button
when 'EXIT'.
leave program.
endcase.
endmodule. " exit INPUT
Add a comment