Send PDF via Mail-Adapter
Which tags you are talking about? Is your pdf is the payload or an attachment? May be you can look at swapping of payload if you can send the PDF as an attachment.
VJ
Hi Mario,
Have a look at the blog by michal
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417100%29ID0975923150DB01234155231841994144End?blog=/pub/wlg/2849
If you have the pdf in your payload you can make it as an attachment using PAyloadSwap bean. Just give a try
Regards
Suraj
Similar Messages
-
How to Send Appointment via mail adapter
Hi Guys,
I need to send the appointment and vTodo via mail adapter, any way i need to develop a mail adapter module. Till now i have finished this part,and i can send normal mail even normal mail with attachment. But i don't know how to send appointment via mail adapter.
This is payload content of appointment which got from Exchange server to gmail:
_=_NextPart_001_01C71EC0.97A011C6
Content-Type: text/plain;
charset="GB2312"
Content-Transfer-Encoding: quoted-printable
When: 2007=C4=EA6=D4=C227=C8=D5=D0=C7=C6=DA=C8=FD 3:30 =CF=C2=CE=E7-4:00 = =CF=C2=CE=E7 (GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi.
Where: China
~*~*~**
This is calendar content
_=_NextPart_001_01C71EC0.97A011C6
Content-class: urn:content-classes:calendarmessage
Content-Type: text/calendar;
method=REQUEST;
name="meeting.ics"
Content-Transfer-Encoding: 8bit
BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft CDO for Microsoft Exchange
VERSION:2.0
BEGIN:VTIMEZONE
TZID:(GMT+01.00) Sarajevo/Warsaw/Zagreb
X-MICROSOFT-CDO-TZID:21
BEGIN:STANDARD
DTSTART:20070112T140000
TZOFFSETFROM:+0100
TZOFFSETTO:+0100
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20070112T140000
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20061213T141132Z
DTSTART;TZID="(GMT+01.00) Sarajevo/Warsaw/Zagreb":20070112T140000
SUMMARY:This is calendar test
UID:040000008200E00074C5B7101A82E0080000000030D51864C81EC701000000000000000
010000000CA9F127EA8947844BC4DD47F269BDEA9
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="Xu, Rocky":MAILTO:rocky@***.com
ORGANIZER;CN="Xu":MAILTO:rocky@**.com;roc*@gmail.com
LOCATION:Shanghai
DTEND;TZID="(GMT+01.00) Sarajevo/Warsaw/Zagreb":20070112T160000
DESCRIPTION:This is calendar content\N
SEQUENCE:0
PRIORITY:5
CLASS:
CREATED:20061213T141132Z
LAST-MODIFIED:20061213T141133Z
STATUS:CONFIRMED
TRANSP:OPAQUE
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-OWNERAPPTID:367904726
X-MICROSOFT-CDO-APPT-SEQUENCE:0
X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20061213T141132Z
X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20061213T141132Z
END:VEVENT
END:VCALENDAR
_=_NextPart_001_01C71EC0.97A011C6--
My question is
1. How to generate this kind of payload in mail adapter module?
2. It is possible to send appointment via mail adapter?
Following i can get from other system, even using mail package check or not using mail package check.
BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft CDO for Microsoft Exchange
VERSION:2.0
BEGIN:VTIMEZONE
TZID:(GMT+08.00) Kuala Lumpur/Singapore
X-MICROSOFT-CDO-TZID:21
BEGIN:STANDARD
DTSTART:16010101T000000
TZOFFSETFROM:+0800
TZOFFSETTO:+0800
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T000000
TZOFFSETFROM:+0800
TZOFFSETTO:+0800
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20070608T025852Z
DTSTART;TZID="(GMT+08.00) Kuala Lumpur/Singapore":20070608T110000
SUMMARY:This is meeting request with attachment
UID:040000008200E00074C5B7101A82E0080000000000A9BD0BA7A9C701000000000000000
010000000C5E16D144D1612498C0EF7E2115EFEC4
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="Xu, Rocky
":MAILTO:roc*@**
ORGANIZER;CN="Xu,y":MAILTO:roc*@**
LOCATION:India labs
DTEND;TZID="(GMT+08.00) Kuala Lumpur/Singapore":20070608T113000
DESCRIPTION:This is content! <<shanghai.txt>> \N
SEQUENCE:0
PRIORITY:5
CLASS:
CREATED:20070608T025925Z
LAST-MODIFIED:20070618T033505Z
STATUS:CONFIRMED
TRANSP:OPAQUE
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
ATTACH:CID:008501c7b159$a9d41d3b$_CDOEX
X-MICROSOFT-CDO-OWNERAPPTID:1468557271
X-MICROSOFT-CDO-APPT-SEQUENCE:0
X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20070608T025852Z
X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20070608T025852Z
END:VEVENT
END:VCALENDAR
Thanks & regards
RockyHi
have a look at this
You can use Java/ABAP proxies to do this job for you..
Java Proxy >> will read the mail(with the attachments) with the help of Java APIs and send the message into XI ABAP Proxy >> for this you will have to first convert the attachment into a message and then you can proceed in the regular fashion.
Not all adapters can process attachments, I'm not sure why you are having trouble with using module processor in the mail adapter. Just check if the service pack that you are using supports this feature.
If you are on WAS 6.10 and above you can achieve this and there is an excellent weblog by Thomas Jung on this topic at
/people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816
reading Pdf Through mail easly done with Java Proxy, which will read the mail(with the attachments) with Java APIs and send the message into XI and then map with the Target ABAP proxy structure .
Thanks -
I can't send emails via mail. I can receive but not send. I have set up gmail on mail. Any ideas? No problems with the set up previously to this.
Go to Mail Preferences- Accounts and confirm you are providing Gmail what they require to send and receive mail. And DON'T specify Secure Socket Layer. Some mail accts don't like SSL
Good Luck to you. -
Cannot receive/send emails via Mail on Mac using 10.6.8, keeps asking for password, very frustrating. Any ideas please? Regards
One more time, iCloud mail accounts are .me, .mac and .icloud. New ones are only .icloud.
iCloud mail is a standard Imap account that can be used with any mail client in existence. But You are talking about the ability to automatically setup an iCloud account in mail, which did not exist until 10.7.2.
You can use password or token authentification with iCloud mail (in Mail) it is your choice.
Set the account manually, set it as Imap, use imap.mail.me.com (no P number) for the incoming email and smtp.mail.me.com as the outgoing server.
The full settings (ports and security) are here. Use them and it will work, regardless of domain (mac, me and icloud addresses all use the same settings.
IMAP (Incoming Mail Server) information:
Server name: imap.mail.me.com
SSL Required: Yes
Port: 993
Username: [email protected] (use your @me.com address from your iCloud account)
Password: Your iCloud password
SMTP (outgoing mail server) information:
Server name: smtp.mail.me.com
SSL Required: Yes
Port: 587
SMTP Authentication Required: Yes
Username: [email protected] (use your @me.com address from your iCloud account)
Password: Your iCloud password
Note: If you receive errors using SSL, try using TLS instead. SSL is required for both IMAP and SMTP connection with iCloud. POP is not supported by iCloud.
For more information on how to use this information with your email application, consult your application's documentation. -
Send xml via mail (IPhone SDK)
HI all,
i have some problem sending xml via mail(mailto). When the amil program caming up il see the subjet but the xml tag there aren't???
any one has an idea how do this??
thanks in advanced
ClaudioGo into settings - mail - account - and then look for the outgoing server - click in there and there should be a place for you to enter your password - just as you would when you first set up your email account.
-
I am new on the iPod 5th Gen, I have managed setting up ok, I can send emails via Mail but cannot seem to receive them ? help what am I doing wrong
Try this...
Delete the affected email account from your device.
Tap Settings > Mail, Contacts, Calendars.
Choose the affected email account, then tap Delete Account.
Add your account again. -
Safari / Mail: No longer able to send webpages via Mail? HELP
How can I restore my Safari / Mail settings to allow Safari to recognize Mail so I can resume sending webpages via Mail? It was working OK, then stopped giving me this message: <Safari couldn’t create an email message to send the link because it couldn’t locate an email application.You can use the Mail application included with Mac OS X to send email. To do so, you might need to install Mail using the Mac OS X installation CDs.> Did the installation of Firefox take over or change my settings?
Go to Mail > Preferences > General and make sure Default Email Reader is set correctly.
-
How can I send a PDF via mail without it becoming an attached file?
Hi All!
I need to know how I am able to send a PDF file via mail, without it becoming an attached file. This means when the receiver opens the mail, he automatically sees the PDF without first having to read the normal mail text and scroll down to open the attached PDF file. Just like a spam newsletter
Also I want to know - I want some illustrations in my portfolio to be a hyperlink to a website, is this possible on a picture (not on an URL) - and if so - How?
Hope you can help me out here!
** I use Adobe Acrobat Reader Pro X 10.1.10 on a Macbook Pro 10.8.5**
Thanks,
CarlinskyCarlinsky wrote:
Hi All!
I need to know how I am able to send a PDF file via mail, without it becoming an attached file. This means when the receiver opens the mail, he automatically sees the PDF without first having to read the normal mail text and scroll down to open the attached PDF file. Just like a spam newsletter
Not possible with Adobe Reader or Adobe Acrobat. -
Sending Smartform via Mail as PDF
Hi at all,
how can I realize the sending of a smartform as a PDF file via Mail as attachment?
This is the functiom module I call:
IF p_mail EQ 'X' AND p_adress IS NOT INITIAL.
CLEAR: wa_ssfcompop,
wa_ssfctrlop,
ls_tab_otf_data.
wa_ssfcompop-tdprinter = 'PDF1'.
wa_ssfctrlop-langu = 'D'.
wa_ssfctrlop-no_dialog = 'X'. "KEIN DIALOG
wa_ssfctrlop-preview = 'X'.
wa_ssfctrlop-getotf = 'X'. "NUR DAS OTF IST INTERESSANT
ENDIF.
CALL FUNCTION fm_name "'/1BCDWB/SF00000033'
EXPORTING
output_options = wa_ssfcompop
control_parameters = wa_ssfctrlop
user_settings = space
* im_redat_von = so_redat-low
* im_redat_bis = so_redat-high
im_beleg_waers = rb_beleg "DV_M964
im_sum = p_summe "DV_M1464
im_wert = p_ertrag "DV_M1464
im_stueck = p_stueck "DV_M1464
im_period = p_monat "DV_M1464
IMPORTING
* DOCUMENT_OUTPUT_INFO =
job_output_info = ls_tab_otf_data "DV_M1464
job_output_options = wa_ssfcompop2 "FE 20100429
TABLES
i_umsatz = it_umsatz_ergebnis
i_faknr = it_faknr
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
After this I have a otf string that I convert with the following coding:
lt_tab_otf_final[] = ls_tab_otf_data-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = lv_filesize
bin_file = lv_file
TABLES
otf = lt_tab_otf_final
lines = lt_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
But now I am stuck. How can I send this xString to the next function module? The other structures / tables are still filled, only the it_attachment has to be filled, but how?
wa_receivers-receiver = p_adress.
wa_receivers-rec_type = 'U'.
APPEND wa_receivers TO it_receivers.
CONCATENATE 'Umsatznachweis Druck' sy-datum sy-uzeit INTO wa_document_data-obj_descr SEPARATED BY space.
wa_message = 'Dies ist ein Test'.
APPEND wa_message TO it_message.
wa_packing_list-transf_bin = space.
wa_packing_list-head_start = 1.
wa_packing_list-head_num = 0.
wa_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES wa_packing_list-body_num.
wa_packing_list-doc_type = 'RAW'.
APPEND wa_packing_list TO it_packing_list.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = wa_document_data
put_in_outbox = 'X'
* sender_address = sy-uname
* sender_address_type = 'B'
commit_work = 'X'
* IMPORTING
* SENT_TO_ALL =
* NEW_OBJECT_ID =
* SENDER_ID =
TABLES
packing_list = it_packing_list
* OBJECT_HEADER =
* CONTENTS_BIN =
contents_txt = it_message
contents_hex = it_attachment
* OBJECT_PARA =
* OBJECT_PARB =
receivers = it_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.Hi,
After
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
archive_index = ' '
copynumber = 0
ascii_bidi_vis2log = ' '
pdf_delete_otftab = ' '
IMPORTING
bin_filesize = ls_bin_file
bin_file = bin_file <-- get this
Convert this to string ...
DATA : lv_strlen TYPE i.
DATA : it_raw TYPE STANDARD TABLE OF char255,
ia_raw TYPE char255.
lv_strlen = STRLEN( bin_file ).
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = bin_file
APPEND_TO_TABLE = ' '
IMPORTING
output_length = lv_strlen
TABLES
binary_tab = it_raw.
CALL FUNCTION 'QCE1_CONVERT'
TABLES
t_source_tab = it_raw
t_target_tab = lt_objbin.
*call the FM ... to send mail ..
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = lv_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = lt_objpack
object_header = lv_objhead
contents_txt = lt_objtxt
contents_bin = lt_objbin
receivers = lt_reclist
EXCEPTIONS
document_not_sent = 1
OTHERS = 2.
Regards,
Srini. -
Problems sending a PDF via mail
Hi !! I have a report, runs in background, which obtains some information from sap tables and then generates an ALV. As it is executed in background, the ALV creates an spool order. After this, I convert this spool into a PDF object . And then I need to send a mail to an specific user with some text in its body and this PDF as attach. If I don't attach the PDF, the mail is sent ok. The problem is when I try to attach the PDF.. Here is my code so anybody can help me please... REPORT zautorizaciones_spool . TABLES : usr02, agr_texts, agr_users, adr6, usr21, adrp, itcpo, tsp01. TYPE-POOLS : slis. DATA: BEGIN OF i_tabla OCCURS 0, agr_name LIKE agr_texts-agr_name, text LIKE agr_texts-text, uname LIKE agr_users-uname, name_text LIKE adrp-name_text, END OF i_tabla. * Spool IDs TYPES: BEGIN OF t_tbtcp. INCLUDE STRUCTURE tbtcp. TYPES: END OF t_tbtcp. DATA: fieldcat TYPE slis_t_fieldcat_alv, fieldcat_ln LIKE LINE OF fieldcat, sortcat TYPE slis_t_sortinfo_alv. DATA: col_pos TYPE i, spos TYPE i. DATA: v_buffer TYPE string. DATA: BEGIN OF it_email OCCURS 0, smtp_addr LIKE adr6-smtp_addr. DATA: END OF it_email. DATA: mi_rqident LIKE tsp01-rqident, mi_bytecount TYPE i, mtab_pdf LIKE tline OCCURS 0 WITH HEADER LINE. DATA: it_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE, objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE, objhead LIKE solisti1 OCCURS 0 WITH HEADER LINE, objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE, objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE, doc_chng LIKE sodocchgi1, tab_lines LIKE sy-tabix, reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE, it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE. DATA: gd_eventid LIKE tbtcm-eventid, gd_eventparm LIKE tbtcm-eventparm, gd_external_program_active LIKE tbtcm-xpgactive, gd_jobcount LIKE tbtcm-jobcount, gd_jobname LIKE tbtcm-jobname, gd_stepcount LIKE tbtcm-stepcount, it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0, wa_tbtcp TYPE t_tbtcp. CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV'. *----
Pantalla de selección *----------------------------------------------------------------------
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001. SELECT-OPTIONS: s_ustyp FOR usr02-ustyp, s_nomrol FOR agr_texts-agr_name, s_uflag FOR usr02-uflag, s_class FOR usr02-class, s_line FOR agr_texts-line, s_todat FOR agr_users-to_dat, s_spras FOR agr_texts-spras, s_gltgb FOR usr02-gltgb, s_correo FOR adr6-smtp_addr. SELECTION-SCREEN END OF BLOCK b1. *----
INITIALIZATION *----------------------------------------------------------------------
INITIALIZATION. CLEAR i_tabla. REFRESH i_tabla. *----
START-OF-SELECTION *----------------------------------------------------------------------
START-OF-SELECTION. PERFORM obtener_datos. IF NOT i_tabla[] IS INITIAL. IF sy-batch IS INITIAL. PERFORM listado. SKIP. WRITE:/ 'Para que la orden spool pueda ser creada, el programa', 'se debe de ejecutar en fondo.'. ELSE. MESSAGE s000(z2) WITH 'batch'. PERFORM listado. PERFORM get_job_details. PERFORM get_spool_number USING SY-REPID sy-uname CHANGING mi_rqident. PERFORM conver_spool_pdf. PERFORM enviar_mail. PERFORM delete_spool. IF sy-sysid = c_dev. WAIT UP TO 5 SECONDS. SUBMIT rsconn01 WITH mode = 'INT' WITH output = 'X' AND RETURN. ENDIF. ENDIF. ENDIF. *----
END-OF-SELECTION *---------------------------------------------------------------------
END-OF-SELECTION. *&----
*& Form obtener_datos *&--------------------------------------------------------------------
FORM obtener_datos. SELECT agr_textsagr_name agr_textstext agr_usersuname adrpname_text APPENDING CORRESPONDING FIELDS OF TABLE i_tabla FROM ( agr_users INNER JOIN usr02 ON usr02bname = agr_usersuname INNER JOIN agr_texts ON agr_textsagr_name = agr_usersagr_name INNER JOIN usr21 ON usr21bname = usr02bname INNER JOIN adrp ON adrppersnumber = usr21persnumber ) WHERE agr_usersagr_name IN s_nomrol AND agr_usersto_dat IN s_todat AND usr02class IN s_class AND usr02gltgb IN s_gltgb AND usr02uflag IN s_uflag AND usr02ustyp IN s_ustyp AND agr_textsline IN s_line AND agr_textsspras IN s_spras. ENDFORM *&--------------------------------------------------------------------
*& Form listado *&--------------------------------------------------------------------
FORM listado. PERFORM crear_catalogo. PERFORM imprimir. ENDFORM. *&--------------------------------------------------------------------
*& Form crear_catalogo *&--------------------------------------------------------------------
FORM crear_catalogo. PERFORM build_fieldcat USING : 'AGR_TEXTS' 'AGR_NAME' '' '' '' '30' '' 'L' 'Papel', 'AGR_TEXTS' 'TEXT' '' '' '' '80' '' 'L' 'Denominación papel', 'AGR_USERS' 'UNAME' '' '' '' '12' '' 'L' 'Usuario', 'NAME_TEXT' 'NAME_TEXT' '' '' '' '80' '' 'L' 'Nombre completo'. ENDFORM. *&--------------------------------------------------------------------
*& Form build_fieldcat *&--------------------------------------------------------------------
FORM build_fieldcat USING tabname fieldname key no_out hotspot outputlen do_sum ddictxt seltext_l. ADD 1 TO col_pos. fieldcat_ln-ref_tabname = tabname. fieldcat_ln-fieldname = fieldname. fieldcat_ln-key = key. fieldcat_ln-col_pos = col_pos. fieldcat_ln-no_out = no_out. fieldcat_ln-hotspot = hotspot. fieldcat_ln-do_sum = do_sum. fieldcat_ln-ddictxt = ddictxt. fieldcat_ln-seltext_l = seltext_l. fieldcat_ln-seltext_m = seltext_l. fieldcat_ln-seltext_s = seltext_l. IF NOT outputlen IS INITIAL. fieldcat_ln-outputlen = outputlen. ENDIF. APPEND fieldcat_ln TO fieldcat. CLEAR fieldcat_ln. ENDFORM. *&--------------------------------------------------------------------
*& Form imprimir *&--------------------------------------------------------------------
FORM imprimir. DATA : prg LIKE sy-repid. prg = sy-repid. DATA : salida TYPE slis_exit_by_user. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING i_callback_program = prg i_callback_user_command = 'ALV_USER_COMMAND' it_fieldcat = fieldcat it_sort = sortcat i_save = 'A' IMPORTING es_exit_caused_by_user = salida TABLES t_outtab = i_tabla EXCEPTIONS program_error = 1 OTHERS = 2. ENDFORM. *&--------------------------------------------------------------------
*& Form informar_cuerpo *&--------------------------------------------------------------------
FORM informar_cuerpo. objtxt-line = 'Estimado propietario de datos.'. APPEND objtxt. CLEAR objtxt. APPEND objtxt. CLEAR objtxt. CONCATENATE 'En el marco de la auditoría SOX, y para asegurar el cumplimiento' 'de uno de sus controles, le adjuntamos un/os informes para...' INTO objtxt-line SEPARATED BY space. APPEND objtxt. CLEAR objtxt. ENDFORM. " informar_cuerpo *&--------------------------------------------------------------------
*& Form enviar_mail *&--------------------------------------------------------------------
FORM enviar_mail. DATA: w_cnt TYPE i, t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE, cont type i. doc_chng-obj_name = 'Probando envio mail'. doc_chng-obj_descr = 'Probando asunto mail'. PERFORM informar_cuerpo. READ TABLE it_mess_att INDEX w_cnt. MESSAGE s000(z2) WITH 'w_cnt' w_cnt. MESSAGE s000(z2) WITH 'sy-subrc' sy-subrc. DESCRIBE TABLE objtxt LINES tab_lines. doc_chng-doc_size = ( w_cnt - 1 ) * 255 + STRLEN( it_mess_att ). CLEAR t_attachment. REFRESH t_attachment. t_attachment[] = it_mess_att[]. CLEAR objpack-transf_bin. objpack-head_start = 1. objpack-head_num = 0. objpack-body_start = 1. objpack-body_num = tab_lines. objpack-doc_type = 'RAW'. objpack-obj_descr = doc_chng-obj_descr. DESCRIBE TABLE t_attachment LINES objpack-body_num. objpack-doc_type = 'PDF'. objpack-obj_descr = 'OBJ_Descr'. objpack-obj_name = 'obj_name'. objpack-doc_size = objpack-body_num * 255. APPEND objpack. objhead = 'Envio mail'. READ TABLE objtxt INDEX tab_lines. IF sy-subrc = 0. MESSAGE s000(z2) WITH 'objtxt' tab_lines. ENDIF. reclist-receiver = p_mail. reclist-rec_type = 'U'. reclist-express = 'X'. reclist-com_type = 'INT'. APPEND reclist. CLEAR reclist. CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' EXPORTING document_data = doc_chng TABLES packing_list = objpack object_header = objhead contents_bin = objbin contents_txt = objtxt receivers = reclist EXCEPTIONS too_many_receivers = 1 document_not_sent = 2 document_type_not_exist = 3 operation_no_authorization = 4 parameter_error = 5 x_error = 6 enqueue_error = 7 OTHERS = 8. MESSAGE s000(z2) WITH 'sy-subrc' sy-subrc. ENDFORM. " enviar_mail *&--------------------------------------------------------------------
*& Form get_spool_number *&--------------------------------------------------------------------
FORM get_spool_number USING f_repid f_uname CHANGING f_rqident. DATA: lc_rq2name LIKE tsp01-rq2name. CHECK NOT ( gd_jobname IS INITIAL ). CHECK NOT ( gd_jobcount IS INITIAL ). SELECT * FROM tbtcp INTO TABLE it_tbtcp WHERE jobname = gd_jobname AND jobcount = gd_jobcount AND stepcount = gd_stepcount AND listident <> '0000000000' ORDER BY jobname jobcount stepcount. CLEAR wa_tbtcp. READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1. IF sy-subrc = 0. f_rqident = wa_tbtcp-listident. MESSAGE s000(z2) WITH 'Se ha creado la orden spool' f_rqident. ELSE. MESSAGE s000(z2) WITH 'No se ha recuperado ninguna orden spool'. ENDIF. ENDFORM. " get_spool_number *&--------------------------------------------------------------------
*& Form informar_destinatario *&--------------------------------------------------------------------
FORM informar_destinatario USING p_correo. it_receivers-receiver = p_correo. it_receivers-rec_type = 'U'. it_receivers-express = 'X'. it_receivers-com_type = 'INT'. APPEND it_receivers. CLEAR it_receivers. ENDFORM. " informar_destinatario *&--------------------------------------------------------------------
*& Form get_job_details *&--------------------------------------------------------------------
FORM get_job_details. CALL FUNCTION 'GET_JOB_RUNTIME_INFO' IMPORTING eventid = gd_eventid eventparm = gd_eventparm external_program_active = gd_external_program_active jobcount = gd_jobcount jobname = gd_jobname stepcount = gd_stepcount EXCEPTIONS no_runtime_info = 1 OTHERS = 2. MESSAGE s000(z2) WITH 'job: ' gd_jobname. ENDFORM. " get_job_details *&--------------------------------------------------------------------
*& Form conver_spool_pdf *&--------------------------------------------------------------------
FORM conver_spool_pdf. CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF' EXPORTING src_spoolid = mi_rqident no_dialog = ' ' dst_device = 'LOCL' IMPORTING pdf_bytecount = mi_bytecount TABLES pdf = mtab_pdf EXCEPTIONS err_no_abap_spooljob = 1 err_no_spooljob = 2 err_no_permission = 3 err_conv_not_possible = 4 err_bad_destdevice = 5 user_cancelled = 6 err_spoolerror = 7 err_temseerror = 8 err_btcjob_open_failed = 9 err_btcjob_submit_failed = 10 err_btcjob_close_failed = 11 OTHERS = 12. CHECK sy-subrc = 0. LOOP AT mtab_pdf. TRANSLATE mtab_pdf USING ' '. CONCATENATE v_buffer mtab_pdf INTO v_buffer. ENDLOOP. TRANSLATE v_buffer USING ' '. DO. it_mess_att = v_buffer. APPEND it_mess_att. SHIFT v_buffer LEFT BY 255 PLACES. IF v_buffer IS INITIAL. EXIT. ENDIF. ENDDO. ENDFORM. " conver_spool_pdf *&--------------------------------------------------------------------
*& Form delete_spool *&----
FORM delete_spool. DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char, ld_status LIKE sy-subrc. CLEAR: ld_spool_nr, ld_status. ld_spool_nr = mi_rqident. CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ' EXPORTING spoolid = ld_spool_nr IMPORTING status = ld_status. ENDFORM. " delete_spool I don't know where the error can be and I've been working on it for 2 days... Do I have to download the PDF to a file ??? In that case, how do I attach then the file ?? Thanks a lot in advance, Regards !!Sorry, I wrote it as the code appears in SAP and didn't know I can format it..I hope I've done it ok now..
As I run the report through a job, I do it like this:
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS no_runtime_info = 1
OTHERS = 2.
Then I get the spool:
DATA: lc_rq2name LIKE tsp01-rq2name.
SELECT * FROM tbtcp INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident '0000000000'
ORDER BY jobname jobcount stepcount.
CLEAR wa_tbtcp.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
f_rqident = wa_tbtcp-listident.
After this I create the PDF:
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = mi_rqident
no_dialog = ' '
dst_device = 'LOCL'
IMPORTING
pdf_bytecount = mi_bytecount
TABLES
pdf = mtab_pdf.
LOOP AT mtab_pdf.
TRANSLATE mtab_pdf USING ' ~'.
CONCATENATE
v_buffer
mtab_pdf
INTO v_buffer.
ENDLOOP.
TRANSLATE v_buffer USING '~ '.
DO.
it_mess_att = v_buffer.
APPEND it_mess_att.
SHIFT v_buffer LEFT BY 255 PLACES.
ENDDO.
To send the mail..
DATA: w_cnt TYPE i
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
cont type i.
doc_chng-obj_name = 'Probando envio mail'.
doc_chng-obj_descr = 'Probando asunto mail'.
READ TABLE it_mess_att INDEX w_cnt.
DESCRIBE TABLE objtxt LINES tab_lines.
doc_chng-doc_size = ( w_cnt - 1 ) * 255 + STRLEN( it_mess_att ).
CLEAR t_attachment.
REFRESH t_attachment. t_attachment[] = it_mess_att[].
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
objpack-obj_descr = doc_chng-obj_descr.
DESCRIBE TABLE t_attachment LINES objpack-body_num.
objpack-doc_type = 'PDF'.
objpack-obj_descr = 'OBJ_Descr'.
objpack-obj_name = 'obj_name'.
objpack-doc_size = objpack-body_num * 255.
APPEND objpack. objhead = 'Envio mail'.
READ TABLE objtxt INDEX tab_lines.
reclist-receiver = p_mail.
reclist-rec_type = 'U'.
reclist-express = 'X'.
reclist-com_type = 'INT'.
APPEND reclist.
CLEAR reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
receivers = reclist .
Edited by: poketina on Nov 19, 2009 4:51 PM
Sorry, i don't know how to give format.... -
How to send the acknowledgement via mail adapter
Hi Experts,
I have a async scenario file to webservice here we are getting an acknowledgment from the webservice side.
My requirement is - to capture the acknowledgement (application ack) which is coming to PI and then send this acknowledgment to some user mail ID using the mail adapter.
here we are not using the proxies and the acknowlodgement is application ack (not transport ack) and we are avoiding the BPM.
Please help me in this regard.
Thanks
SugataHi Stefan,
Thanks for quick reply.
can you please let me know if application ack can be handled by BPM or not? if it is possible thru BPM please provide me the guidelines for the same ( blog etc.).
I am here to capture the Application Acknowledgment that is coming into PI sxmb_moni from webservice
Thanks
Sugata -
Create newsletter with Pages and send out via mail (not attachement)?
I have a question: I have created a newsletter in Iworks Pages. How can I send this out via mail as a newsletter ? So not as an attachment? I know Microsoft Publisher can do it with 1 click, but I don't want to move to MSFT. Please let me know, I also have Indesign etc. Createion of the newsletter is easy with my Apple, but then it stops....and gets worse the MSFT....
KOENIG Yvan wrote:
PeterBreis0807 wrote:
+Menu > File > Print > PDF (button bottom left corner) > Mail PDF+
As far as I know, only single page PDFs will appear directly in the mail and they will do only in some mail applications.
No it is multipage. Can't test for all appliactions but it was both sent and received on my system/Mail as the 3 pages in the document.
In other apps and always if the PDF contain several pages, it will be an attachment : what was rejected by the OP.
When Helena Rubenstein arrived in Australia she first worked in David Jones, our version of Harrods.
A woman approached another salesperson and asked "Do you have a brown cashmere top?"
To which the salesperson replied "Sorry no madam"
Helena stepped in and asked "Would madam like a blue or black one instead?" and made the sale to the lady who wanted a top. It seemed that was more important than none at all.
There is a lesson to be learnt from this.
Peter -
Sending files via File Adapter through FTP having a HTTP proxy as firewall
Dear experts,
I am having a issue trying to send a file via FTP with the File Adapter. My client has a HTTP proxy with authentification required as firewall in order to send files via FTP.
I've tried several solutions but I cannot find a way to add the proxy name, user and password in the communication channel.
Any ideas?
Thanks in advance.
Best RegardsHi,
Unfortunately those changes didn't work. The adapter is not able to establish a connection within the FTP server. These are the parameters I added:
-Dhttp.proxy.user=<usename>
-Dhttp.proxy.password=<userpassword>
-Dhttp.proxyHost=<proxy.domain...>
-Dhttp.proxyPort=80
-Dhttp.nonProxyHost="*domain1.com domain2com"
-Dhttps.proxy.user=<usename>
-Dhttps.proxy.password=<userpassword>
-Dhttps.proxyHost=<proxy.domain...>
-Dhttps.proxyPort=80
-Dhttps.nonProxyHost="*domain1.com domain2com"
And just in case, we tried with these other parameters at the same time.
-Dftp.proxy.user=<usename>
-Dftp.proxy.password=<userpassword>
-Dftp.proxyHost=<proxy.domain...>
-Ddftp.proxyPort=80
-Dftp.nonProxyHost="*domain1.com domain2com"
The errors in the adapter engine's log are:
Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: ConnectException: Socket connection timed out: <ftp ip address>
Error Exception caught by adapter framework: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: ConnectException: Socket connection timed out: <ftp ip address>
Error Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: ConnectException: Socket connection timed out: <ftp ip address>
By the way, we are using PI 7.0.
Thanks in advance
Edited by: SAPIMSA . on Apr 20, 2011 4:08 PM -
Dynamically pass subject via mail adapter without using mail package
Hi,
We have requirement to pass the Dynamic variable as Mail subject
we can't use Mail Package as we need to capture the data from Dynamic SOAP header Data from incomming channel
Dynamic SOAP Header variable (XHeaderName1) comming from Sender SOAP channel.
Receiver side we need to capture that XHeaderName1 in Mail Adapter channel using ASMA and Variable transport binding so that value of XHeaderName1 should overwrite Subject under General/ Mail Atribute section.
Could you please let me know, how to handle this requirement using module configuration?
Also suggest the correct configuration to use ASMA and Variable transport binding.
Regards
VenkyHi Venky,
Please have a look at the links below. They should help you.
Configuring the Sender SOAP Adapter- https://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm
Configuring the Receiver Mail Adapter-https://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
Adapter-Specific Message Attributes in the Message Header -https://help.sap.com/saphelp_nw04/helpdata/en/43/0a7d1be4e622f3e10000000a1553f7/content.htm
Regards,
Jannus Botha -
Send URL via Mail (outlook)
Hi all,
we're currently working with SAP Easy DMS (Document Management System) in which documents can be managed 'outside' of SAP R/3 in an explorer which looks a lot like the windows explorer. When clicking on a document with the right mouse button a context menu appears. Using this one can send the exact url of the document (which is stored on a content server) can be sent via mail. This works just fine when the document doesn't contain any blanks (spaces) in the name. But when it does contain blanks (for example test 1.doc) the hyperlink which is displayed in the mail doesn't work. The document should be displayed in the (web)browser. Normally when an URL contains blanks, they are replaced with '%20'. For displaying the document a BSP (service) is created and a function module is used for replacing the blanks with '%20'. Replacing the blanks in the function module looks good, but somewhere along the way these are deleted again. Is there a way to achieve this in a way that it works for all documents, with or without blanks.
I'm using the following statement in the function module
Z_EASYDMS_GETURL (implemented using a SAP Note):
REPLACE space WITH '%20' INTO docfile. And this just works fine. Doesn't the BSP service recognize the blanks ('%20') or what?
Kind regards,
Micky.Hi,
Did you try ESCAPE_URL (http://help.sap.com/saphelp_bw31/helpdata/en/fd/778c3a045c7b73e10000000a11405a/frameset.htm) yet?
Eddy
Maybe you are looking for
-
How to hide the first 2 levels of Hierarchey in bex
Hi Guys, I am using Sales Office Hierarchy in report. Hierarchy name is 'First Sales Hierarchy' which is coming as a root node.My requirement is that I do not want to see the first 2 levels of hierarchy,but I want to see the all 3rd level hierarchies
-
I have loaded my shuffle 3 times. 750 songs, 150 songs and 100 songs. When I use my shuffle it only plays the last 100 songs in the shuffle. My ipod shows that I have the 1,000 songs in the ipod. How do I get the entire library of songs in the "shuff
-
Customs declaration number in VAT Invoice output
Hi Gurus, I need to print the customs declaration number in VAT invoice output.I have given the logic to fetch this number from ITEM>Foreign Trade/Customs>Comments tab,but I have come across a scenario if some times user forgot to mention this number
-
HT201250 can I copy and past from a doc in time machine
I'm a writer and I'd like to go back to an old version of a story and copy a chunk out to use in my current version. Is there a way to do this without wiping out what I have?
-
Open Arena , a wonderful open source FPS online shooter!
I downloaded this yesterday and started playing for a couple of hours today and was impressed by the graphics, replayability and price tag FREE. If anyone wants to check it out , Google Open Arena. You will not be dissapointed. *******DISCLAIMER*****