2006 Aug 09 7:30 PM
hi to all,
i developed a report for sending mails to the corresponding email ids.in this i wrote
select-options: s_manif for sood-objnam no intervals.
if we did not enter any distribution list name it will automatically go to the consignee.
my requirement is while it going to the consignee it should ask a pop up regarding "Manifest will be emailed to Consignee" with ok and cancel buttons. if we click ok button then mail will go to consignee and if we click cancel button it will remain in the transcation
<b>thanks helman for giving the help.</b>
but while i click cancel button it is not remain into the transaction.
data: answer type c.
*LOOP AT S_DLINAM.
LOOP AT S_MANIF.
CLEAR DLI_NAME1.
DLI_NAME1 = S_DLINAM-LOW.
DLI_NAME1 = S_MANIF-LOW.
*IF S_DLINAM IS NOT INITIAL.
IF S_MANIF IS NOT INITIAL.
CALL FUNCTION 'SO_DLI_READ_API1'
EXPORTING
DLI_NAME = DLI_NAME1
DLI_ID = ' '
SHARED_DLI = 'X'
IMPORTING
DLI_DATA = IDLIENT
TABLES
DLI_ENTRIES = IDLIENT.
ENDIF.
LOOP AT IDLIENT.
IT_EMAIL-EMAIL = IDLIENT-MEMBER_ADR.
APPEND IT_EMAIL.
ENDLOOP.
REFRESH IDLIENT.
CLEAR IDLIENT.
CLEAR S_DLINAM.
CLEAR S_MANIF.
ENDLOOP.
*end of insert of tcs_kun.
CLEAR t_email_objtxt[].
Text in the email.
t_email_objtxt = 'PDF is included as attachment.'.
APPEND t_email_objtxt.
Fill the OTF table.
t_email_otf[] = h_sf-otfdata-otfdata[].
Get the address number
READ TABLE t_partners
WITH KEY parvw = 'ZC'.
IF sy-subrc NE 0.
MESSAGE ID 'ZSH' TYPE 'E' NUMBER 999
WITH text-006.
ENDIF.
h_email-addr_receiver = t_partners-adrnr.
Some general settings.
h_email-name_of_object = 'Freight'.
h_email-descr_of_obj = 'FREIGHT/CARGO MANIFEST'.
h_email-descr_attachem = 'FREIGHT.PDF'.
CALL FUNCTION 'ZSH_SEND_PDF_PER_EMAIL2'
EXPORTING
name_of_object = h_email-name_of_object
descript_of_object = h_email-descr_of_obj
descript_attachement = h_email-descr_attachem
address_no_recipient = h_email-addr_receiver
TABLES
OTF = t_email_otf
TEXT_IN_MAIL = t_email_objtxt
ITAB = IT_EMAIL
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 3
ADDRESS_NOT_EXIST = 4
CONV_NOT_POSSIBLE = 5
ERR_OTF_MC_NOENDMARKER = 6
OTHERS = 7.
IF SY-SUBRC = 0.
call function 'POPUP_TO_CONFIRM'
exporting
TITLEBAR = ' '
DIAGNOSE_OBJECT = ' '
text_question = 'Manifest will be emailed to Consignee'
text_button_1 = 'Continue'
ICON_BUTTON_1 = ' '
text_button_2 = 'Cancel'
ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = ' '
USERDEFINED_F1_HELP = ' '
START_COLUMN = 25
START_ROW = 6
POPUP_TYPE =
importing
answer = answer
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2
.
CALL FUNCTION 'ZSH_POPUP_MESSAGE'
EXPORTING
is_error = 'I'
popup_title = text-007
message_text = text-008.
ELSE.
CALL FUNCTION 'ZSH_POPUP_MESSAGE'
EXPORTING
is_error = 'E'
popup_title = text-015
message_text = text-016.
ENDIF.
Message was edited by: sun deep
Message was edited by: sun deep
Message was edited by: sun deep
hi to all,
i developed a report for sending mails to the corresponding email ids.in this i wrote
select-options: s_manif for sood-objnam no intervals.
if we did not enter any distribution list name it will automatically go to the consignee.
my requirement is while it going to the consignee it should ask a pop up regarding "Manifest will be emailed to Consignee" with ok and cancel buttons. if we click ok button then mail will go to consignee and if we click cancel button it will remain in the transcation
<b>thanks helman for giving the help.</b>
but while i click cancel button it is not remain into the transaction.
data: answer type c.
*LOOP AT S_DLINAM.
LOOP AT S_MANIF.
CLEAR DLI_NAME1.
DLI_NAME1 = S_DLINAM-LOW.
DLI_NAME1 = S_MANIF-LOW.
*IF S_DLINAM IS NOT INITIAL.
IF S_MANIF IS NOT INITIAL.
CALL FUNCTION 'SO_DLI_READ_API1'
EXPORTING
DLI_NAME = DLI_NAME1
DLI_ID = ' '
SHARED_DLI = 'X'
IMPORTING
DLI_DATA = IDLIENT
TABLES
DLI_ENTRIES = IDLIENT.
ENDIF.
LOOP AT IDLIENT.
IT_EMAIL-EMAIL = IDLIENT-MEMBER_ADR.
APPEND IT_EMAIL.
ENDLOOP.
REFRESH IDLIENT.
CLEAR IDLIENT.
CLEAR S_DLINAM.
CLEAR S_MANIF.
ENDLOOP.
*end of insert of tcs_kun.
CLEAR t_email_objtxt[].
Text in the email.
t_email_objtxt = 'PDF is included as attachment.'.
APPEND t_email_objtxt.
Fill the OTF table.
t_email_otf[] = h_sf-otfdata-otfdata[].
Get the address number
READ TABLE t_partners
WITH KEY parvw = 'ZC'.
IF sy-subrc NE 0.
MESSAGE ID 'ZSH' TYPE 'E' NUMBER 999
WITH text-006.
ENDIF.
h_email-addr_receiver = t_partners-adrnr.
Some general settings.
h_email-name_of_object = 'Freight'.
h_email-descr_of_obj = 'FREIGHT/CARGO MANIFEST'.
h_email-descr_attachem = 'FREIGHT.PDF'.
CALL FUNCTION 'ZSH_SEND_PDF_PER_EMAIL2'
EXPORTING
name_of_object = h_email-name_of_object
descript_of_object = h_email-descr_of_obj
descript_attachement = h_email-descr_attachem
address_no_recipient = h_email-addr_receiver
TABLES
OTF = t_email_otf
TEXT_IN_MAIL = t_email_objtxt
ITAB = IT_EMAIL
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 3
ADDRESS_NOT_EXIST = 4
CONV_NOT_POSSIBLE = 5
ERR_OTF_MC_NOENDMARKER = 6
OTHERS = 7.
IF SY-SUBRC = 0.
call function 'POPUP_TO_CONFIRM'
exporting
TITLEBAR = ' '
DIAGNOSE_OBJECT = ' '
text_question = 'Manifest will be emailed to Consignee'
text_button_1 = 'Continue'
ICON_BUTTON_1 = ' '
text_button_2 = 'Cancel'
ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = ' '
USERDEFINED_F1_HELP = ' '
START_COLUMN = 25
START_ROW = 6
POPUP_TYPE =
importing
answer = answer
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2
.
CALL FUNCTION 'ZSH_POPUP_MESSAGE'
EXPORTING
is_error = 'I'
popup_title = text-007
message_text = text-008.
ELSE.
CALL FUNCTION 'ZSH_POPUP_MESSAGE'
EXPORTING
is_error = 'E'
popup_title = text-015
message_text = text-016.
ENDIF.
Message was edited by: sun deep
Message was edited by: sun deep
Message was edited by: sun deep
2006 Aug 09 7:36 PM
YOu can use the function module POPUP_TO_CONFIRM in your Program.
~SUresh
2006 Aug 09 7:38 PM
You can do something like this.
report zrich_0001.
data: answer type c.
call function 'POPUP_TO_CONFIRM'
exporting
* TITLEBAR = ' '
* DIAGNOSE_OBJECT = ' '
text_question = 'Manifest will be emailed to Consignee'
text_button_1 = 'Continue'
* ICON_BUTTON_1 = ' '
text_button_2 = 'Cancel'
* ICON_BUTTON_2 = ' '
* DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = ' '
* USERDEFINED_F1_HELP = ' '
* START_COLUMN = 25
* START_ROW = 6
* POPUP_TYPE =
importing
answer = answer
* TABLES
* PARAMETER =
* EXCEPTIONS
* TEXT_NOT_FOUND = 1
* OTHERS = 2
.
if answer = '1'.
write:/ 'The answer is yes'.
elseif answer = '2'.
write:/ 'This answer is no'.
endif.
Regards,
Rich Heilman
2006 Aug 09 7:59 PM
2006 Aug 09 8:15 PM
It does not appear that you are checking for the answer anywhere. Notice in the sample above, I am check the ANSWER field which it is begin passed back from the POPUP_TO_CONFIRM function module. If the user presses CONTINUE, the the answer is = 1, if they press cancel, then the answer is = 2. You have to handle this in your program.
Regards,
Rich Heilman
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |