Using attachment with RNIF
Hi,
I actually use B2B scenario based on RosettaNet/RNIF with SAP PI 7.0 SP12.
I need to use the attachment capability, but, according to discussion with SAP support there is no current documentation about how to perform this action.
Has anybody already do this setup ?
Is it like attachment with mail adapter ? Do I develop a custom adapter module to use this standard capability ?
Best Regards,
Laurent
Hi Asif,
Thanks for the help below. I will also try to propose this as part of the low-level design. I'm just thinking that the overall architecture makes it complicated. SAP will send IDOC with the fields to be converted to both XML and MIME attachment in PI. And these data should be both sent by PI to TIBCO. During the message mapping, will PI be able to convert this to the desired format?
The desired format is like the one below:
mime-version:1.0
content-id:"6acecec45db14b70bfad32298bc4134c"
x-rn-version:RosettaNet/V02.00
x-rn-response-type:async
content-type:multipart/related; type="multipart/related"; boundary="c95198da0eb5408ba23f0caee018a88b"
host: ...
content-length:35518
expect:100-continue
connection:Keep-Alive
--c95198da0eb5408ba23f0caee018a88b
=_Part_1418_1240817770.1288816246590
Content-Type: multipart/related;
boundary="----=_Part_1417_171409072.1288816246574";
type="application/xml"
=_Part_1417_171409072.1288816246574
Content-Type: application/xml
Content-Transfer-Encoding: binary
Content-Location: RN-Preamble
Content-ID: RN-Preamble.3d1534e0e78911dfbeda001b78be27c2
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Preamble SYSTEM "Preamble_MS_V02_00.dtd"><Preamble><standardName><GlobalAdministeringAuthorityCode>RosettaNet</GlobalAdministeringAuthorityCode></standardName><standardVersion><VersionIdentifier>V02.00</VersionIdentifier></standardVersion></Preamble>
=_Part_1417_171409072.1288816246574
Content-Type: application/xml
Content-Transfer-Encoding: binary
Content-Location: RN-Delivery-Header
Content-ID: RN-Delivery-Header.3d1534e1e78911df8070001b78be27c2
<XMLTag>insert XML here</XMLTag>
Thanks.
Regards,
Madz
Similar Messages
-
How to use Java with PL/SQL commands to send an email with attachment
Apologizes in advance if this is the wrong place to ask the question.
I need to use Java with PL/SQL commands to send an email with attachment. My java application runs from the command line and does some magic to gather info from an Oracle 11g db. If the DB has sendmail configured, I'd like to send the results of the data gathering as an attachment to the email addresses. I'm not sure how to do this. I've been reading up on on PL/SQL can send email with UTL_SMTP - with attachments. I'm just not sure how to translate that into being triggered by my Java application. Any suggestions or pointers on what I should read would be appreciated.
Background - I've been programming in Java for 10+ years, but this is my first time using databases. I also have been on these forums for a long time, but lost my profile when it was switched to Oracle.
Thanks for all help.user13726880 wrote:
The original requirements were put together and given to me, an Oracle newbie. They expected the Java app to use something intrinsic to Oracle and Unix sendmail. To solve my problem, I use a JDBC connection to run some SQL commands. I take that data, format it and send the results by email to the user. By default the requirement is to send it as an HTML attachment using Unix 'sendmail'. So I do that using Runtime exec. I have also added JavaMail functionality as an alternative to sendmail. It works great and as expected.Sounds like a reasonable solution.
Note however that PL/SQL itself can send email. And PL/SQL can call unix sendmail too.
However myself I would have done it in java with JavaMail. -
Email attachment with didnt used EXPORTING TO MEMORY
Hi Expert,
For my development I cant using below abap code because I getting short dump when trying to execute the SAP Standard Program "RM06WCD1". When trying other program that is working fine.
SUBMIT (report_name)
USING SELECTION-SET p_var
EXPORTING LIST TO MEMORY AND RETURN.
So I trying to use it with FM "Job Open" and FM "Job Close" and it was working fine with the following submit statement.
SUBMIT (report_name)
USING SELECTION-SET p_var
VIA JOB l_name NUMBER l_number AND RETURN.
and I using this fm "RSPO_RETURN_ABAP_SPOOLJOB" to get the data from the spool.
But I stuck in develop in emailing with the htm attachment part. I have no idea on how to split my line item because the content will be different based on the report that calling.
Have any expert here got any idea on the way to solve for this issue?
Thanks.Hi,
I don't understand what your issue is exactly. RSPO_RETURN_ABAP_SPOOLJOB returns the lines of a spool of type "ABAP list" in an internal table. Each line of the internal table corresponds to one line, so what do you mean by "split"?
Or does RM06WCD1 generate a spool of type "SAPscript/Smart form"? In that case, you shouldn't use RSPO_RETURN_ABAP_SPOOLJOB, but use CONVERT_OTFSPOOLJOB_2_PDF to send it as mail. Moreover, a standard function allows to send directly outputs as a mail.
BR
Sandra -
What kind of information of SIM attached with the device are we able to use on developing application?
Can we get MSISDN from SIM?
Authentication number???Hi
XI has two engines that are ABAP engine called ABAP stack and JAVA engine calles JAVA stack.
Some components are executed in ABAP stack and some components are executed in JAVA stack.
ABAP stack -
> Only Integration Engine(IE) and Business Process Engine(BPE) are executed in the ABAP stack
JAVA stack -
> Remaining all(IR, ID, Adapter Engine, RTWB) are executed in the JAVA stack.
More informations about SAP NetWeaver Application Server:
http://help.sap.com/saphelp_nw04s/helpdata/en/84/54953fc405330ee10000000a114084/frameset.htm
More informations about XI components:
http://help.sap.com/saphelp_nw04/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm
Many thanks
Kiran -
Using Aperture with a Network Attached Storage (NAS)
Hi,
I would like to make my Aperture library accessible from severals Macs and for different users on these Macs --- not at the same time. The idea is that only one user from one Mac can use Aperture at a given time.
The basic idea is to install the Aperture library on a Network Attached Storage (NAS) --- either will all photos included or with all photos stored in a separated folder structure --- next to the library ("externally referenced masters").
The NAS I am planning to use is a QNAP TS 239 Pro II+, which will be attached to a Gigabit Ethernet network (to which all Macs are connected too). Following the reviews, the QNAP should be capable to deliver a read/write performance in the order of 70 Mb/s ... hence performance-wise there should be no problem.
I've read through various forums and found many messages telling that using Aperture with a NAS is not possible or at least not a good idea. The posts in the forum were partially a bit confusing; people were telling contradictory things. I also had the impression that the answers depend on the actual version of Aperture. Apple itself put in the release notes of Aperture 3.1.1 about Vaults: "Fixes an issue that could sometimes cause Aperture on a computer with Mac OS X v10.5.8 Leopard to stop responding while updating a vault stored on a network volume." Hence, it seems that Aperture 3.1.1 can work with a NAS ... at least it can use vaults that are stored on a NAS. On the other hand, it's exactly the topic of vaults where many people say that this does not work with a NAS ...
To clarify things, I try to get some clear and competent answers here. The questions are:
Can one store and use the Aperture library on a NAS (whose disk is formatted using a UNIX file system, e.g. EXT4) ?
If yes, does this work in both configurations: (a) with a library containing the masters, and (b) with a library with externally referenced masters (that are also located on the NAS) ?
If a user on a given Mac on the network has opened Aperture (and thus the library on the NAS), is this library the blocked for other users ? (That should ideally be the case.)
If it is NOT possible to use an Aperture library on the NAS, is it then possible to store it on an external, HFS+ formatted drive connected to the NAS via USB ? (QNAP allows to format its external drives with HFS+).
I know that putting everything on an iSCSI target volume on the NAS is a solution, but is iSCSCI properly working under OS X (10.6). I read that one has to install an iSCSI Initiator software first ... which is not from Apple itself.
What about Vaults: According to the Aperture 3.1.1 release notes, it seems to be possible to use vaults on a NAS ... is this really the case ?
Is usage of Aperture on a NAS depending on the file protocol used to transfer the data ? I read also that if one uses the AFP protocol (supported in a QNAP NAS) then everything's fine ... Is this the case ?
Thanks a lot in advance for any clear and correct answer!
RainerCan one store and use the Aperture library on a NAS (whose disk is formatted using a UNIX file system, e.g. EXT4) ?
Not reliably, no. You will encounter issues. You could use Mac OS X disk images on the server, mount them on a client, and work that way. Note only one machine can mount the disk image at a time.
If yes, does this work in both configurations: (a) with a library containing the masters, and (b) with a library with externally referenced masters (that are also located on the NAS) ?
(a) no (b) no.
If a user on a given Mac on the network has opened Aperture (and thus the library on the NAS), is this library the blocked for other users ? (That should ideally be the case.)
Aperture does no locking. There is a very high likelihood you will corrupt the library if you do this.
If it is NOT possible to use an Aperture library on the NAS, is it then possible to store it on an external, HFS+ formatted drive connected to the NAS via USB ? (QNAP allows to format its external drives with HFS+).
How would you be accessing it then? If it's over a file protocol (SMB or NFS or ...) it likely won't work.
I know that putting everything on an iSCSI target volume on the NAS is a solution, but is iSCSCI properly working under OS X (10.6). I read that one has to install an iSCSI Initiator software first ... which is not from Apple itself.
Right. There is no Apple-provided iSCSI initator. I don't know how well 3rd party initators work.
What about Vaults: According to the Aperture 3.1.1 release notes, it seems to be possible to use vaults on a NAS ... is this really the case ?
I've done vaults reliably for years using a Mac OS X disk image stored on the NAS, that I mount before backing up. I wouldn't do it "naked" (i.e. stored directly on the NAS).
Is usage of Aperture on a NAS depending on the file protocol used to transfer the data ? I read also that if one uses the AFP protocol (supported in a QNAP NAS) then everything's fine ... Is this the case ?
AFP might have a better chance than other protocols but... frankly... it's a bad idea. If you MUST share a library across many machines, use something like a Promise DS4600 (direct attached) and plug it into a machine when you're using it. -
Complete code to send an attachment with a text message using java mailapi
complete code to send an attachment with a text message using java mailapi
code should be free from errorhttp://java.sun.com/products/javamail/FAQ.html#examples
Was this code too hard to find?
Was the FAQ too hard to find? -
Programmaticaly attachement with outlook using java
Hi All,
I used this code Runtime.getRuntime().exec(
new String[] {"rundll32", "url.dll,FileProtocolHandler",
"mailto:" + "&subject=" + "testmail" + "&attachment="+"\"" + "C:\\test.txt" + "\""}, null
Once execute, it will open outlook express along with subject, but without attachment.
I want to send the attachment programmatically using java..
If anybody come across this issues, share your ideas...
Edited by: SARAV_RS on Dec 28, 2008 11:09 PMFirst thing, it's not only for Outlook or windows. I need to check which email application is being using
like outlook,Thunderbird,.
The file is attached programmatic to the corresponding mail application. Those files are
getting from server side (databases).
In jsp,
<a href="mailto:?subject=Pictures from PhotoAlbum&cc= &body=This is the body text&attachment="c:\test.txt'">Email</a><br>{code}
mailto function works only in client side as of my knowledge. We can't use attachment.
Give me any suggestions.
Edited by: SARAV_RS on Dec 29, 2008 3:21 AM -
I CAN,T OPEN PDF FILES IN PAGES WHICH ARE ATTACHED WITH EMAIL OR CAN,T SHARE PDF FILES WITH PAGES
Install free Adobe Reader.
https://itunes.apple.com/sg/app/adobe-reader/id469337564?mt=8 -
Attachment with no extension using SO_DOCUMENT_SEND_API1
Hi,
anyone know if it is possible to create a txt file email attachement with SO_DOCUMENT_SEND_API1 but NOT to have the attachment name with the '.txt' extension?
I would like the attachment to be 'filename.001' but when it is emailed it being sent as 'filename.001.txt'
thanks.Hi,
Have you tried like:
t_packing_list-doc_type = 'RAW'.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = w_doc_data
* PUT_IN_OUTBOX = ' '
commit_work = 'X'
IMPORTING
sent_to_all = lv_flag
* NEW_OBJECT_ID =
TABLES
packing_list = t_packing_list -
<blockquote>Locking duplicate thread.<br>
Please continue here: [[/questions/937363]]</blockquote>
I can send JPEG and .doc files, but cannot send PDF files. It has just happened again. it is a random occurrence.
If I open Earthlink e-mail in IE, all is OK. If I use hotmail with Mozilla, I can send PDF files. It is apparently a problem only between Mozilla and EarthlinkMany site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
Note: ''This will temporarily log you out of all sites you're logged in to.''
To clear cache and cookies do the following:
#Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
#Under "Time range to clear", select "Everything".
#Now, click the arrow next to Details to toggle the Details list active.
#From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
#Now click the ''Clear now'' button.
Further information can be found in the [[Clear your cache, history and other personal information in Firefox]] article.
Did this fix your problems? Please report back to us!
'''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
''(If you're not using it, switch to the Default theme.)''
* You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
* Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
''Once you get the pop-up, just select "'Start in Safe Mode"''
'''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.'' -
Inbound PIDX 1.2 With RNIF V2.0
Hi,
We are trying to configure an Inbound PIDX Invoice V1.2, with RNIF V2.0.
Here are my questions.
1. Can we read the PIDX invoice as a Generic File or should I need to get it over http or https? As per the documentation, RNIF is supposed to support multiple transport protocols.
2. I tried the file, by removing the RNIF wrappers, seems to be working fine. But, when I include the wrapper and at the From-TP level, I configure the listening channel to RNIF 2.0, Saved the Agreement, Validated and redeployed.
Wire Message :
Id 0A6066AF13553B45C60000004D1C7A4F
Message Id 0A6066AF13553B45BBB000004D1C7A4B
Refer To Message Refer To Message
Sender Type Name
Sender Value GlobalChips
Receiver Type Name
Receiver Value Enterprise
Sender GlobalChips
Receiver Enterprise
Agreement Id
Agreement
Document Type PayableInvoice
Document Protocol
Document Version
Message Type REQ
Direction INBOUND
State MSG_ERROR
Acknowledgement Mode NONE
Response Mode ASYNC
Send Time Stamp 02/06/2012 11:27 AM
Receive Time Stamp 02/06/2012 11:27 AM
Document Retry Interval(Channel) 0
Document Remaining Retry(Channel) 0
Document Retry Interval(Agreement)
Document Remaining Retry(Agreement)
Native Message Size 194014
Translated Message Size
Business Action Name
Business Transaction Name
Xpath Name1
Xpath Value1
Xpath Expression1
Xpath Name2
Xpath Value2
Xpath Expression2
Xpath Name3
Xpath Value3
Xpath Expression3
Correlation From XPath Name
Correlation From XPath Value
Correlation From XPath Expression
Correlation To XPath Name
Correlation To XPath Value
Correlation To XPath Expression
Wire Message Wire Message
Application Message Application Message
Payload Storage Payload Storage
Attachment Attachment
Label
Collaboration Id
Collabration Name
Collabration Version
Business Action Name
Exchange Protocol Name Generic File
Exchange Protocol Version 1.0
Interchange Control Number
Group Control Number
Transaction Set Control Number
Error Code B2B-50083
Error Description Machine Info: (zzzzzzzz.ttttt.com) Description: Document protocol identification error.
Error Level ERROR_LEVEL_COLLABORATION
Error Severity ERROR
Error Text Document protocol identification error.
what I observed is packed message still has the rnif wrapper.
Any help is appreciated.
Thanks,
Sai.Sai,
You can not create Listening Channels with channel protocol as RNIF 2.0. Only partner channel can be of type RosettaNet V02.00. Please refer -
http://docs.oracle.com/cd/E17904_01/integration.1111/e10229/bb_listen_chan.htm#BAJJICJJ
If you want B2B to handle the RNIF headers (as per RNIF specification) then use HTTP transport (RosettaNet V02.00 channel) otherwise if you will use Generic File then B2B will treat the incoming message as a normal XML/Flat File.
Regards,
Anuj -
Email with text attachment with line width 1250
Dear all,
I want to send the email with text attachment whose line width in text file is 1250. Kindly let me know how to send email attachment with more than 255 line width.
Regards,
Manoj
Moderator Message: Frequently Asked Question. Please search for available information before posting.
Edited by: kishan P on Apr 29, 2011 2:48 PMHi,
What ever text you are sending in the email, create a standard text for it using tcode SO10. In the program use the FM READ_TEXT to get the data into internal table which will be of length 132 char. If you want line widht of 255 chars convert using FM SX_TABLE_LINE_WIDTH_CHANGE as below,
CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
EXPORTING
line_width_dst = '255'
TABLES
content_in = it_data
content_out = it_mess_att
EXCEPTIONS
err_line_width_src_too_long = 1
err_line_width_dst_too_long = 2
err_conv_failed = 3
OTHERS = 4.
Use FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send email.
Hope this will help you.
regards,
Tulasi. -
Want to Send smartform as pdf attachment with a Email to some mail id
Hi ,
I want to send a smartform as a PDF attachment with a mail to a mail id. And I can send a mail with the PDF attachment.
But I am not able to open the PDF. It is throwing some error (Adobe reader could not open u2018fileu2019 because it is either not a supported file type or because the file has been damaged (for example , it was sent as an email attachment and was not correctly decoded)).
By debugging I come to know that the file which is generating is in some encoding format.
Please help me regard this. This is very urgent.
here is the code,
Main Program :
REPORT Ztest_report.
*--Top Include for Global Data Declarations.
INCLUDE ztest_report_top.
*--Form Include for Form Routines.
INCLUDE ztest_report_form.
START-OF-SELECTION.
START-OF-SELECTION.
*--Display data
Perform display_data.
END-OF-SELECTION.
Top declaration :
Internal table
DATA : i_otfdata TYPE tsfotf, " Smart Forms: Table OTF
i_tline TYPE TABLE OF tline WITH HEADER LINE,
i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
Objects to send mail.
i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
Work Area declarations
w_mailaddr TYPE ppfdmailad,
w_mailtype TYPE so_escape,
w_mailrecipient TYPE swotobjid,
w_control TYPE ssfctrlop,
w_compop TYPE ssfcompop,
w_return TYPE ssfcrescl,
wa_doc_chng TYPE sodocchgi1,
w_data TYPE sodocchgi1,
wa_buffer TYPE string, "To convert from 132 to 255
wa_objhead TYPE soli_tab,
Variables declarations
v_form_name TYPE rs38l_fnam,
v_len_in LIKE sood-objlen,
v_len_out LIKE sood-objlen,
v_len_outn TYPE i,
v_lines_txt TYPE i,
v_lines_bin TYPE i.
Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-009.
PARAMETER: p_bukrs TYPE bukrs OBLIGATORY, "Company Code
p_belnr TYPE belnr_d OBLIGATORY, "Document No
p_gjahr TYPE gjahr OBLIGATORY, "document type
p_mailid(50) TYPE c OBLIGATORY.
"Mail Id
SELECTION-SCREEN END OF BLOCK blk1.
Form Logic :
FORM display_data.
*Local Variable declaration
DATA: lc_fm TYPE rs38l_fnam, "local variable to store the
l_i_document_output_info TYPE ssfcrespd,
l_i_struc_job_output_info TYPE ssfcrescl,
l_i_struc_job_output_options TYPE ssfcrescl,
i_lines TYPE TABLE OF tline WITH HEADER LINE,
lv_job_output_info TYPE ssfcrescl,
lv_document_output_info TYPE ssfcrespd,
lv_job_output_options TYPE ssfcresop,
lv_bin_filesize LIKE sood-objlen.
Determine the smartform name
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZTEST_SMARTFORM'
IMPORTING
fm_name = lc_fm
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
w_control-getotf = 'X'.
w_control-no_dialog = 'X'.
w_control-preview = space.
w_control-device = 'MAIL'.
Call the smartform and pass the selection screen parameter
CALL FUNCTION lc_fm
EXPORTING
control_parameters = w_control
output_options = w_compop
user_settings = 'X'
t_bukrs = p_bukrs
t_belnr = p_belnr
t_gjahr = p_gjahr
IMPORTING
job_output_info = l_i_struc_job_output_info
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Moving the Smart Forms: Table OTF into an internal table
i_otfdata[] = l_i_struc_job_output_info-otfdata[].
CONVERT TO OTF TO PDF.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = lv_bin_filesize
TABLES
otf = i_otfdata
lines = i_lines
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
IF sy-batch EQ l_c_no.
To directly view the print-preview in PDF format
CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
EXPORTING
i_otf = i_otfdata
EXCEPTIONS
convert_otf_to_pdf_error = 1
cntl_error = 2
OTHERS = 3.
For Sending the PDF file to a Mail ID.
LOOP AT i_lines.
TRANSLATE i_lines USING '~'.
CONCATENATE wa_buffer i_lines INTO wa_buffer.
ENDLOOP.
TRANSLATE wa_buffer USING '~'.
DO.
i_record = wa_buffer.
APPEND i_record.
SHIFT wa_buffer LEFT BY 255 PLACES.
IF wa_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
DATA: BEGIN OF zlines OCCURS 0,
tline TYPE char255,
END OF zlines.
*Change the PDF format from 132 to 255.
CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
EXPORTING
transfer_bin = 'X'
TABLES
content_in = i_lines
content_out = zlines
EXCEPTIONS
err_line_width_src_too_long = 1
err_line_width_dst_too_long = 2
err_conv_failed = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Attachment
REFRESH: i_reclist,
i_objtxt,
i_objbin,
i_objpack.
CLEAR wa_objhead.
i_objbin[] = zlines[].
Create Message Body Title and Description
i_objtxt = 'test with pdf-Attachment!'.
APPEND i_objtxt.
DESCRIBE TABLE i_objtxt LINES v_lines_txt.
READ TABLE i_objtxt INDEX v_lines_txt.
wa_doc_chng-obj_name = 'smartform'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'smartform'.
wa_doc_chng-sensitivty = 'F'.
wa_doc_chng-doc_size = v_lines_txt * 255.
Main Text
CLEAR i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 1.
i_objpack-body_start = 2.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
APPEND i_objpack.
Attachment (pdf-Attachment)
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 1.
i_objpack-body_start = 2.
I_OBJPACK-DOC_TYPE = 'RAW'.
DESCRIBE TABLE i_objbin LINES v_lines_bin.
READ TABLE i_objbin INDEX v_lines_bin.
i_objpack-doc_size = v_lines_bin * 255 .
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'smart'.
i_objpack-obj_descr = 'test'.
APPEND i_objpack.
CLEAR i_reclist.
i_reclist-receiver = p_mailid.
i_reclist-rec_type = 'U'.
APPEND i_reclist.
Send new document with attachments via RFC
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = i_objpack
object_header = wa_objhead
contents_bin = i_objbin
contents_txt = i_objtxt
receivers = i_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.
IF sy-subrc <> 0.
WRITE:/ 'Error When Sending the File', sy-subrc.
ELSE.
WRITE:/ 'Mail sent'.
ENDIF.
ENDFORM. " display_datahi,
i wrote a programm.for me it is working.i think it will help for u.
DATA: t_otfdata TYPE ssfcrescl,
t_lines LIKE tline OCCURS 0 WITH HEADER LINE,
t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
t_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
Objects to send mail.
DATA:T_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
T_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
T_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
T_RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE.
DATA: w_filesize TYPE i,
w_bin_filesize TYPE i,
wa_ctrlop TYPE ssfctrlop,
wa_outopt TYPE ssfcompop,
WA_BUFFER TYPE STRING, "To convert from 132 to 255
WA_OBJHEAD TYPE SOLI_TAB,
WA_DOC_CHNG TYPE SODOCCHGI1,
W_DATA TYPE SODOCCHGI1.
DATA: form_name TYPE rs38l_fnam,
V_LINES_TXT TYPE I,
V_LINES_BIN TYPE I,
nast-spras type sy-langu value 'DE'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSR_DEMO1'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = form_name
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
wa_ctrlop-LANGU = nast-spras.
wa_ctrlop-getotf = 'X'.
wa_ctrlop-no_dialog = 'X'.
wa_outopt-tdnoprev = 'X'.
CALL FUNCTION form_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = wa_ctrlop
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = wa_outopt
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = t_otfdata
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
t_otf[] = t_otfdata-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = w_bin_filesize
BIN_FILE =
TABLES
OTF = t_otf
LINES = t_lines
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at t_lines.
TRANSLATE t_lines USING '~'.
CONCATENATE WA_BUFFER T_LINES INTO WA_BUFFER.
ENDLOOP.
TRANSLATE WA_BUFFER USING '~'.
DO.
t_RECORD = WA_BUFFER.
APPEND t_RECORD.
SHIFT WA_BUFFER LEFT BY 255 PLACES.
IF WA_BUFFER IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Attachment
REFRESH: T_RECLIST,
T_OBJTXT,
T_OBJBIN,
T_OBJPACK.
CLEAR WA_OBJHEAD.
T_OBJBIN[] = T_RECORD[].
Create Message Body Title and Description
T_OBJTXT = 'test with pdf-Attachment!'.
APPEND T_OBJTXT.
DESCRIBE TABLE T_OBJTXT LINES V_LINES_TXT.
READ TABLE T_OBJTXT INDEX V_LINES_TXT.
WA_DOC_CHNG-OBJ_NAME = 'smartform'.
WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
WA_DOC_CHNG-SENSITIVTY = 'F'.
WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
Main Text
CLEAR T_OBJPACK-TRANSF_BIN.
T_OBJPACK-HEAD_START = 1.
T_OBJPACK-HEAD_NUM = 0.
T_OBJPACK-BODY_START = 1.
T_OBJPACK-BODY_NUM = V_LINES_TXT.
T_OBJPACK-DOC_TYPE = 'RAW'.
APPEND T_OBJPACK.
Attachment (pdf-Attachment)
T_OBJPACK-TRANSF_BIN = 'X'.
T_OBJPACK-HEAD_START = 1.
T_OBJPACK-HEAD_NUM = 0.
T_OBJPACK-BODY_START = 1.
DESCRIBE TABLE T_OBJBIN LINES V_LINES_BIN.
READ TABLE T_OBJBIN INDEX V_LINES_BIN.
T_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
T_OBJPACK-BODY_NUM = V_LINES_BIN.
T_OBJPACK-DOC_TYPE = 'PDF'.
T_OBJPACK-OBJ_NAME = 'smart'.
T_OBJPACK-OBJ_DESCR = 'test'.
APPEND T_OBJPACK.
CLEAR T_RECLIST.
T_RECLIST-RECEIVER = 'mail id'.
T_RECLIST-REC_TYPE = 'U'.
APPEND T_RECLIST.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = T_OBJPACK
OBJECT_HEADER = WA_OBJHEAD
CONTENTS_BIN = T_OBJBIN
CONTENTS_TXT = T_OBJTXT
RECEIVERS = T_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.
IF SY-SUBRC <> 0.
WRITE:/ 'Error When Sending the File', SY-SUBRC.
ELSE.
WRITE:/ 'Mail sent'.
ENDIF.
please reward me if helpful. -
Mail.app: I can't send attachment with "space" in filename
Hi.
I've this kind of problem. I think it is Mail.app problem. The mail isn't sent if the attachment's filename contains "space" (eg: "file name.pdf").
The same email is sent finw if I use Thunderbird with the same SMTP server (Leopard Server) and from the same machine.
If the recipinets in local (not relayed over internet) it works well. Otherwise the SMTP server tell me it have lost connection whith relay server (ISP SMTP server).
I've used Lotus domino Server as SMTP server with the same result.
If I cut the "space" (' ') in the attachment's filename Mail.app works fine as well.
HELP!
thanks.
P.S.: sorry for my english
Message was edited by: odolo
Message was edited by: odoloThere is a bug which causes the filenames of attachments with a space or an accented character in the name to have characters appended to the filename extension; it may be that it also sometimes stops the attachment from sending. But other people have reported problems with mails with attachments not sending regardless of the filename, so I think the next software update will see some fixes.
Meanwhile, don't use spaces!
AK -
How do i set up a used iPad with iTunes account
Hi, my friend has recently bought a second hand iPad and has been having problems using it with her iTunes account. She has the latest version installed on her laptop but when the iPad is connected, a window opens to say it cannot be used because it requires iTunes 10.1 or later.
Is it possible to use a second hand device with an existing iTunes account and how do you get the latest version of iTunes on the iPad?
Any help would be appreciated.Sorry that I mentioned 'daughter' rather than 'friend'.
Has she access to another computer with iTunes. If so, attach it to that briefly to see if she gets the same message. If she does not then the problem is iTunes on her own laptop. This can be resolved in two ways. If the iTunes update was recent then do a system restore on the laptop and then update iTunes again. (Be careful that such a restore has not ramifications as regards to new programmes installed in the interim.) Now try connecting again. The second option, as quoted earlier by Demo, is to forget about the system restore (on the laptop) and reinstall iTunes. The following should help - http://support.apple.com/kb/ht1925
Maybe you are looking for
-
Address book - multiple listings of same entry
I feel like there's a really simple explaination for this and will probably feel silly when I get the answer - BUT I just bought a MacBook Pro and am running Leopard (10.6.7). I now have muptiple listings of the same entry. Some of them repeat l
-
Retreive External data from SQL making connection to SQL server take a long time
I have an Excel pivottable based on a view from SQL server. The view gets data from 2 databases on the sames server. I have the sames login for both databases and also the same rights (datareader, datawriter and owner). When running the view from wit
-
Need help in changing INTERNAL password
I am using Oracle 8.0.6 on win 2000 server. I want to change the password of INTERNAL. the scenario is that when i change the password for sys, the INTERNAL should also be changed. Please help with ur suggestions
-
Error message at the start of iPhoto?
"iPhoto has detected inconsistencies in your library, click repair to avoid any further problems." I click repair every time and nothing every repairs? I've tried another maneuver as well about holding down the function key and one of the "F" button
-
URGENT: Legacy Sourcefire license portal
Hi I have questions regarding Sourcefire license portal access. I'm referring following discussion and understood the from GPL (11/10) all license related activities should be done in Cisco's license registration tool. https://supportforums.cisco.com