‎2007 Aug 14 7:57 PM
Hi,
In my screen, if the user failed to populate MailUpdate Flag value field but updating the MailAddress Field, then upon saving, a pop up window should come indicating that "MailUpdate Flag valule is empty,kindly update it". After giving the required value it should save. This is my requirement.Kindly help me on this.Points will be awarded for helpful answers.
With Regards,
Manikandan Rajendran
‎2007 Aug 14 8:45 PM
hi Manikandan,
I assume that the " Mail Update Flag" is a check box in your screen. If this is the
case, then you can ues the function module POPUP_CONTINUE_YES_NO
and based on the import parameter ANSWER you can set the flag in the program
field:
sample code:
if sy-ucomm = 'SAVE'.
if mail_update_flag is initial.
if mail_address is not initial.
CALL FUNCTION 'POPUP_CONTINUE_YES_NO'
EXPORTING
DEFAULTOPTION = 'N' "NO Button
TEXTLINE1 = WA_TEXTLINE1 " Mail update flag is not selected
TEXTLINE2 = WA_TEXTLINE2 " Do you want to sent mail updates?
TITEL = text-004
IMPORTING
ANSWER = FLAG-POST.
IF FLAG-POST = 'J'. " YES Button selected
PERFORM SET_FLAG_FOR_MAIL_UPDATE.
ENDIF.
endif.
endif.
endif.
Also, you can consider the option of making the field
disabled if the check box is not selected. only if
the check box is selected, you should make the field
for email address field input enabled.....
Hope this helps,
Sajan Joseph.
‎2007 Aug 14 8:45 PM
hi Manikandan,
I assume that the " Mail Update Flag" is a check box in your screen. If this is the
case, then you can ues the function module POPUP_CONTINUE_YES_NO
and based on the import parameter ANSWER you can set the flag in the program
field:
sample code:
if sy-ucomm = 'SAVE'.
if mail_update_flag is initial.
if mail_address is not initial.
CALL FUNCTION 'POPUP_CONTINUE_YES_NO'
EXPORTING
DEFAULTOPTION = 'N' "NO Button
TEXTLINE1 = WA_TEXTLINE1 " Mail update flag is not selected
TEXTLINE2 = WA_TEXTLINE2 " Do you want to sent mail updates?
TITEL = text-004
IMPORTING
ANSWER = FLAG-POST.
IF FLAG-POST = 'J'. " YES Button selected
PERFORM SET_FLAG_FOR_MAIL_UPDATE.
ENDIF.
endif.
endif.
endif.
Also, you can consider the option of making the field
disabled if the check box is not selected. only if
the check box is selected, you should make the field
for email address field input enabled.....
Hope this helps,
Sajan Joseph.
‎2007 Aug 16 12:30 PM
Hi,
try the following FM
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'CONFIRMATION'
DIAGNOSE_OBJECT = ' '
text_question = lv_msg ==> MailUpdate Flag valule is empty,kindly update it
text_button_1 = 'YES'
ICON_BUTTON_1 = 'ICON_DELETE'
text_button_2 = 'NO'
ICON_BUTTON_2 = 'ICON_CANCEL'
DEFAULT_BUTTON = '1'
display_cancel_button = ' '
USERDEFINED_F1_HELP = ' '
start_column = 30
start_row = 10
POPUP_TYPE =
IV_QUICKINFO_BUTTON_1 = ' '
IV_QUICKINFO_BUTTON_2 = ' '
IMPORTING
answer = lv_ans
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Good Regards,
vallamuthu.M