How to send attachment as a single bodypart instead of MultiPart?

Hi there,
I'm trying to send an email with only a file attachment (holding an EDI message), because an email client that I'm sending to can't handle multipart.
My email app uses MimeMessage.setContent(MimeMultiPart), but as said, this doesn't work for the recipient.
Unfortunately, there is no such thing as MimeMessage.setContent(MimeBodyPart) which would be the one I'd have to use I suppose...
Is there an easy way to do this?
I tried plunging into the API and came up with DataHandler, DataSource blahblah, but that made it seem very complicated and I couldn't succeed in setting the correct headers (it insisted on 7bit encoding although set the header in the code for quoted-printable)...
If I look into the API, it seems as if I'm completely on my own on this, as though you're supposed to send multipart messages....
Any thoughts?
Any hint will be greatly appreciated because I've wasted already a day on this thing.... :-/
Thanks,

Have you tried just using Message and BodyPart?
Looking at the 1.3 API, Body part has the following method: BodyPart.setContent(java.lang.Object obj,java.lang.String type), where the type is the MIME type of the object.
You will probably have to encode the data yourself to get the object since I don't think the method will do the encoding for you.

Similar Messages

  • In Mavericks Mail, how do you attach a PDF (single-page or multi-page) without the PDF being embedded in the message?

    In Mavericks Mail, how do you attach a PDF (single-page or multi-page) without the PDF being embedded in the message?

    I attached a .doc file to the message and it appeared as an icon, so I did not have to convert it. I attached a .jpg image — it appeared as a full image, but when I Command+clicked the image, the view as icon window did not appear on the screen. Likewise, I again checked the Mail Menu Bar, and did see 'View as icon.' Side note: I routinely use Mavericks Mail in Classic Mode, so I decided to try both modes. Same results in both modes. I checked my Mail Preferences, but couldn't find anything there, either. I'll continue to look around, but this has me stumped. Thanks for your assistance.  

  • SRM-- XI -- generate cXML EPO, how to send attached xls with xml ?

    Hi,
    We have to use XI to generate  E-  Purchase Order  and send it to  supplier in  cXML format.
    The flow is :--
    We have SRM> IDOC> XI--> cXML EPO
    I have couple of questions?
    1) Can I have some document where  this kind of scenarios  implemented?
    2) Can we send attachment (.xls file)  with the cXML file to external system., where  this attachment is coming  from  SRM.
    3) Can XI receive the attachment with the iDoc and send as is to the supplier?
    4) How  can we convert cXML 1.2 standard format as output?
    5) Which adapter can be used and receiver side  to publish the cXML format EPO?
    6)  What else we need to do to configure SRM to XI ?
    7)  how we make cXML 1.2 standard format  or  define data type?
    Please help me to understand  this, your inputs are appreciable? if  you  have any docs   then please mail me at [email protected]
    Thanks & regards
    Ram Singhal

    Hi Ram,
    Info about cXML
    http://en.wikipedia.org/wiki/CXML
    Info about attachments in cXML
    http://edocs.bea.com/wli/docs70/cxml/api.htm
    example of an order in cXML with attachment
    http://www.wmusers.com/wmusers/messages/117/AribaOrderwithAttachment-124618.txt
    I hope this help you.
    Bye.

  • How to send attachment(file) in javamail via JSP ?

    Dear Friends,
    Please guide me for :
    (1) my e-mail client is using JSP. So, hoW to send file-attachments via jsp ?
    Please specify example for attaching file(s) to a message object in JSP ( and only in JSP ).
    I have used HTML <input type="file" .... > control , but don't know how to bring that file to the jsp file and then attach it to the message object.
    Thank u.

    I wouldn't recommend using JSP to do that. I would use a servlet instead. Then you are just writing Java code, and to answer your two questions you need to learn about JavaMail (1) and get some already-written classes to do file uploads such as this one: http://www.servlets.com/cos/index.html (2).

  • How to send acknowledgement in HTTP_AAE single stack 7.31

    Hi
    My scenario is HTTPs to ECC and we are also sending alert mails to support system using RequestResponseBean in sender HTTP_AAE channel.
    Can anyone provide provide some info on how to send acknowledgement back to 3party(using https) ?
    If normally it is not possible, can we do this using customized adapter modules?

    Hi,
    Can anyone provide provide some info on how to send acknowledgement back to 3party(using https) ?
    The sender needs to request the acknowledgement. Except the receiver interface is an IDoc, then you just need to setup a corresponding configuration to send back an ALEAUD IDoc.
    /Udo

  • How to send attachment as html file in mail in workflow

    Hi Experts,
    I want to know how i can send an attachment as .html file by mail in sap workflow.
    By default it is being sent as .txt file.
    Thanks & Regards,
    Kapil Kumar

    Hello,
    In your decision step you can put this binding (if you haven't already):
    Workflow                  Step
    &DECISIONCOMMENTS&   <-   &_ATTACH_OBJECTS&
    where DECISIONCOMMENTS is a BOR of type SOFM.
    In the next step you can use fm SO_DOCUMENT_READ_API1
    to get the actual text lines.
    Once you have that you can convert it to HTML (not
    sure how) or you could use fm SO_NEW_DOCUMENT_ATT_SEND_API1
    to send it as a HTML attachment.
    regards
    Rick

  • How to send attachment via SOAP

    Dear All,
    I have to develop a web client in order to send a Text.txt file to web server. I'm using SOAP based message. In fact I'm using eclipse IDE to develop the web client. but I'm not still knowing  how it's doing.
    WSDL
    [code]
    <xs:element name="ReconReport">                                      
    <!-- Reconciliation report -->
    <xs:complexType>
    <xs:sequence>
    <xs:element name="login" 
    type="xs:string"/>         
    <!-- Login name for the client -->
    <xs:element name="pass"  
    type="xs:string"/>         
    <!-- Password for the client -->
    <xs:element name="filename"   type="xs:string"/>         
    <!-- Filename for the attached reconciliation report -->
    <xs:element name="desc"  
    type="xs:string" minOccurs="0"/><!-- Additional description if any -->
    <xs:element name="attachment" type="xs:base64Binary"/>   
    <!-- Attachment -->
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    [/code]
    My code
    [code]
    public int reconReport(java.lang.String login, java.lang.String pass, java.lang.String filename, java.lang.String desc, byte[] attachment) throws java.rmi.RemoteException {
    if (super.cachedEndpoint == null) {
    throw new org.apache.axis.NoEndPointException();
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[2]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("urn:ReconReport");
    _call.setEncodingStyle(null);
    _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
    _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(new javax.xml.namespace.QName("http://paymentGateway.celcom.com", "ReconReport"));
    setRequestHeaders(_call);
    setAttachments(_call);
    try {   
    java.lang.Object _resp = _call.invoke(new java.lang.Object[] {login, pass, filename, desc, null});
        String requestmsg = "Request context[PrepaidAccountQuery] : \n"
    + _call.getMessageContext().getRequestMessage()
    .getSOAPPartAsString();
        System.out.println(requestmsg);
    if (_resp instanceof java.rmi.RemoteException) {
    throw (java.rmi.RemoteException)_resp;
    else {
    extractAttachments(_call);
    try {
    return ((java.lang.Integer) _resp).intValue();
    } catch (java.lang.Exception _exception) {
    return ((java.lang.Integer) org.apache.axis.utils.JavaUtils.convert(_resp, int.class)).intValue();
      } catch (org.apache.axis.AxisFault axisFaultException) {
      throw axisFaultException;
    [/code]
    Form Result
    [code]
    Request context[PrepaidAccountQuery] :
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ReconReport xmlns="http://paymentGateway.celcom.com"><login>123</login><pass>123</pass><filename>BSN.TXT</filename><desc>Celcom</desc><attachment xsi:nil="true"/></ReconReport></soapenv:Body></soapenv:Envelope>
    [/code]
    Server accepting message
    [code]
    ReconReport
    POST /axis2/services/PaymentGateway HTTP/1.1
    Content-Type: multipart/related; boundary="MIMEBoundary_9aca5e2dc7e6ba2b683923292e7c1df44d8dc670242a205e"; type="application/xop+xml"; start="<[email protected]>"; start-info="application/soap+xml"; action="urn:ReconReport"
    User-Agent: Axis2
    Host: cel229:18080
    Transfer-Encoding: chunked
    689
    --MIMEBoundary_9aca5e2dc7e6ba2b683923292e7c1df44d8dc670242a205e
    Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
    Content-Transfer-Encoding: binary
    Content-ID: <[email protected]>
    <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><ns1:ReconReport xmlns:ns1="http://paymentGateway.celcom.com"><ns1:login>xxxxxxx</ns1:login><ns1:pass>xxxxxxx</ns1:pass><ns1:filename>20120213.txt</ns1:filename><ns1:desc>xxxxxxx Recon Report</ns1:desc><ns1:attachment xmlns:ns2="http://www.w3.org/2005/05/xmlmime" ns2:contentType="text/plain"><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:[email protected]" /></ns1:attachment></ns1:ReconReport></soapenv:Body></soapenv:Envelope>
    --MIMEBoundary_9aca5e2dc7e6ba2b683923292e7c1df44d8dc670242a205e
    Content-Type: text/plain
    Content-Transfer-Encoding: binary
    Content-ID: <[email protected]>
    1|40637781|44084597|110|20091019141048|121|
    2|77371568|44084597|120|20091019141050|126|162727|MBB|
    3|66432343|44084597|130|20091019141059|56|4111111111111111|0313|123456|
    101|21339684|0192234567|140|0|0|20091019141038|
    102|21339685|0192234567|140|0|0|20091019145013|
    103|21339686|0192234567|140|0|0|20091019146043|
    104|21339687|21339686|2009101914703|
    201|40637781|0135605893|1000|20091019151058|102310-ABCDEF|
    202|40637781|0135605893|2000|20091019151133|102310-ABCDEF|xxxxxxxxxxxx5442|123654|
    900|23482933|40637781|20091019141059|658|
    801|21337384|44084597|140|20091019141040|0193456678|Y|
    TOT. REC : 10
    --MIMEBoundary_9aca5e2dc7e6ba2b683923292e7c1df44d8dc670242a205e--
    [/code]
    Please help me.
    Regards

    Hi,
    I tried my best to find in google but there is no helpful url.  However, I'm just following bellow code but still Im getting same message contains. Please appreciate ur advice.
    Before calling ,
    _call.invoke(-----------)
    I just add this
    Hashtable chunkedTable = new Hashtable();
    chunkedTable.put(HTTPConstants.HEADER_TRANSFER_ENCODING, HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED);
    _call.setProperty(MessageContext.HTTP_TRANSPORT_VERSION, HTTPConstants.HEADER_PROTOCOL_V11);
    _call.setProperty(HTTPConstants.REQUEST_HEADERS,chunkedTable);
    byte source[] ="999999999999944444444444444444444444444444444444444".getBytes();
    DataSource ds = new ByteArrayDataSource(source, "text/plain");
    DataHandler dh = new DataHandler(ds);
          _call.setProperty(_call.ATTACHMENT_ENCAPSULATION_FORMAT, _call.ATTACHMENT_ENCAPSULATION_FORMAT_MIME);
    _call.addAttachmentPart(dh);
    setRequestHeaders(_call);
    setAttachments(_call);
    _call.invoke(-----------)
    But still the message contains is same.
    Request context[PrepaidAccountQuery] :
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ReconReport xmlns="http://paymentGateway.celcom.com"><login>123</login><pass>123</pass><filename>BSN.TXT</filename><desc>Celcom</desc><attachment>OTk5OTk5OTk5OTk5OTQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0</attachment></ReconReport></soapenv:Body></soapenv:Envelope>
    Regards
    -Kapila

  • How to send attachment to adobe interactive form

    Hi
    I have two interactive forms i.e initiator and approver from intiator i want to send an attachment(word document) to approver.can you please tell me how to do this.
    Thanks
    Krishna

    Hi,
    this blog may be helpful to you,
    Demystifying Attachments with SAP Interactive Forms
    Regards,
    ramesh

  • How to send attachment mail in sap

    hi all,
    please guide me how to use function module named SO_NEW_DOCUMENT_ATT_SEND_API1.
    i have text files in internal table.
    please guide me how can i send files in my internal table as in attachment.

    Manish,
    Just copy paste the below code as given into a report only changing the email address of receipient to your email address to testing.
    That is line:
    lwa_reclist-receiver = '[email protected]'. " Email address of your receipient
    Then I think your SCOT is not configured for automatic execution hence once you have run your report go to transaction SCOT and press (Ctrl + F7) to start send process.
    A mail will be sent to your email address specified in the receipient list and a copy of it also placed in your SBWP Outbox.
    Let me know if you need further help, else reward neccessary points.
    Code
    *& Report  ZMFV_ROUGH_PAD
    REPORT  zmfv_rough_pad.
    DATA :
    li_attachment TYPE TABLE OF soli, " hold attachment contents
    li_pdf        TYPE TABLE OF tline, " hold data from spool in PDF format
    li_objpack    TYPE TABLE OF sopcklsti1, " hold email body, attachment details
    li_objtxt     TYPE TABLE OF solisti1, " hold message contents
    li_reclist    TYPE TABLE OF somlreci1. " hold email reciever details
    DATA :
    lwa_attachment    LIKE LINE OF li_attachment,
    lwa_pdf           LIKE LINE OF li_pdf,
    lwa_objpack       LIKE LINE OF li_objpack,
    lwa_objtxt        LIKE LINE OF li_objtxt,
    lwa_reclist       LIKE LINE OF li_reclist,
    lwa_document_data TYPE sodocchgi1. " hold document details like title, size etc.
    DATA :
    lv_sent_to_all     TYPE c, " flag to check if mail is sent to all
    l_att_lines        TYPE i, " hold number of lines in attachment table
    lv_spool_desc(68)  TYPE c. " hold description of spool
    CONSTANTS : lc_email_txt TYPE solisti1-line VALUE 'Find attached Payment Advice sent by this email.',
    lc_sensitivity TYPE sodocchgi1-sensitivty VALUE 'O',
    lc_raw         TYPE sopcklsti1-doc_type VALUE 'RAW',
    lc_pdf         TYPE sopcklsti1-doc_type VALUE 'PDF',
    lc_transf_bin  TYPE sopcklsti1-transf_bin VALUE 'X',
    lc_email       TYPE sopcklsti1-obj_name VALUE 'Email',
    lc_ext_id      TYPE somlreci1-rec_type VALUE 'U',
    lc_outbox      TYPE sonv-flag VALUE 'X',
    lc_obj_name    TYPE sodocchgi1-obj_name VALUE 'Email Test',
    lc_1           TYPE n VALUE '1',
    lc_0           TYPE n VALUE '0'.
    CLEAR: lwa_attachment,
    lwa_pdf,
    lwa_reclist,
    lwa_objtxt,
    lwa_objpack,
    lwa_document_data.
    REFRESH : li_attachment,
    li_pdf,
    li_reclist,
    li_objtxt,
    li_objpack.
    Build attachment table
    lwa_attachment-line = 'YOUR TEXT FROM INTERNAL TABLE LINES'.
    APPEND lwa_attachment TO li_attachment.
    Body of email
    CLEAR lwa_objtxt.
    MOVE lc_email_txt TO lwa_objtxt.
    APPEND lwa_objtxt TO li_objtxt.
    Title of the email
    lwa_document_data-obj_descr = 'Title of email'.
    lwa_document_data-sensitivty = lc_sensitivity.
    lwa_document_data-expiry_dat = sy-datum + 15.
    lwa_document_data-doc_size = STRLEN( lwa_objtxt ).
    lwa_document_data-obj_name = lc_obj_name.
    e-mail body
    CLEAR lwa_objpack.
    lwa_objpack-head_start = lc_1.
    lwa_objpack-head_num = lc_0.
    lwa_objpack-body_start = lc_1.
    lwa_objpack-body_num = lc_1.
    lwa_objpack-doc_type = lc_raw.
    lwa_objpack-doc_size = STRLEN( lwa_objtxt ).
    APPEND lwa_objpack TO li_objpack.
    For e-mail attachment
    DESCRIBE TABLE li_attachment LINES l_att_lines.
    CLEAR lwa_attachment.
    READ TABLE li_attachment INDEX l_att_lines INTO lwa_attachment.
    CLEAR lwa_objpack.
    lwa_objpack-transf_bin = lc_transf_bin.
    lwa_objpack-head_start = lc_1.
    lwa_objpack-head_num = lc_1.
    lwa_objpack-body_start = lc_1.
    lwa_objpack-body_num = l_att_lines.
    lwa_objpack-doc_type = lc_raw.
    lwa_objpack-obj_name = lc_email.
    lwa_objpack-obj_descr = lv_spool_desc.
    lwa_objpack-doc_size = ( 255 * ( l_att_lines - 1 ) ) + STRLEN( lwa_attachment-line ).
    APPEND lwa_objpack TO li_objpack.
    make recipient list
    CLEAR lwa_reclist.
    lwa_reclist-receiver = '[email protected]'. " Email address of your receipient
    lwa_reclist-rec_type = lc_ext_id. " To external email id
    lwa_reclist-COM_TYPE = 'INT'.     " Internet mail
    APPEND lwa_reclist TO li_reclist.
    send mail with attachment
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        document_data              = lwa_document_data
        put_in_outbox              = lc_outbox
        commit_work                = 'X'
      IMPORTING
        sent_to_all                = lv_sent_to_all
      TABLES
        packing_list               = li_objpack
        contents_bin               = li_attachment
        contents_txt               = li_objtxt
        receivers                  = li_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: 'Success'.
    ENDIF.

  • How to send attachment to internal mails

    hi,
    my requirement is ,
    i have to send alv output as attachment through mail to internal(sap) users.
    could you please some one provide me some solution

    I am enclosing the sample code to trigger an email, The logic for this is in comments, check this I am shure yuor problem will be solved.
    *& Report ZGBL_SLA_PER
    REPORT zgbl_sla_per NO STANDARD PAGE HEADING LINE-COUNT 26(3) MESSAGE-ID
    zmsg2.
    DECLARATION OF DB TABLES
    TABLES: zncrfid, zrule_id.
    DECLARATION OF INTERNAL TABLES
    DATA: BEGIN OF ncrf OCCURS 0,
    zncrf_id(15) TYPE c,
    zncrf_l4_name(60) TYPE c,
    z9gl_sla_flag(1) TYPE c,
    zowners(30) TYPE c,
    zowners_value(30) TYPE c,
    zdate_changed(8) TYPE n,
    ztime_changed(6) TYPE n,
    END OF ncrf.
    *DATA: NCRF LIKE ZNCRFID OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF it_ruleid OCCURS 0,
    zrule_id(10) TYPE c,
    zowners(30) TYPE c,
    zowners_value(30) TYPE c,
    END OF it_ruleid.
    *data: wa like ncrf occurs 0 with header line.
    DATA: BEGIN OF itab OCCURS 0,
    zncrf_id(15) TYPE c,
    zncrf_l4_name(60) TYPE c,
    z9gl_sla_flag(1) TYPE c,
    zowners(30) TYPE c,
    zowners_value(30) TYPE c,
    zdate_changed(8) TYPE n,
    ztime_changed(6) TYPE n,
    END OF itab.
    data: file(10) type c,
    dates type date.
    EMAIL DECLARATION
    *CONSTANTS: c_subject LIKE sodocchgi1-obj_descr VALUE 'Subject',
    *c_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
    *DATA: g_time TYPE char8,
    *g_email(40) TYPE c,
    *g_sent_all(1) TYPE c,
    *g_doc_data LIKE sodocchgi1,
    *g_error TYPE sy-subrc.
    *DATA: i_message LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    *i_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    *i_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
    *DATA: BEGIN OF mailid OCCURS 0,
    zemail_id TYPE zrule_id-zemail_id,
    END OF mailid.
    *data: mailid like zrule_id occurs 0 with header line.
    UPLOADING FLAT FILE TO INTERNAL TABLE NCRF
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = 'C:\VAMSY\file.txt'
    filetype = 'ASC'
    has_field_separator = 'X'
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    DAT_MODE = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    CHECK_BOM = ' '
    IMPORTING
    FILELENGTH =
    HEADER =
    TABLES
    data_tab = ncrf[]
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_READ_ERROR = 2
    NO_BATCH = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE = 5
    NO_AUTHORITY = 6
    UNKNOWN_ERROR = 7
    BAD_DATA_FORMAT = 8
    HEADER_NOT_ALLOWED = 9
    SEPARATOR_NOT_ALLOWED = 10
    HEADER_TOO_LONG = 11
    UNKNOWN_DP_ERROR = 12
    ACCESS_DENIED = 13
    DP_OUT_OF_MEMORY = 14
    DISK_FULL = 15
    DP_TIMEOUT = 16
    OTHERS = 17
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ELSE.
    IF sy-subrc EQ 0.
    Checking internal table ncrf is empty then
    *delete records from TABLE ZNCRF_ID ******************************
    IF ncrf[] IS INITIAL.
    MESSAGE i003(ZMSG2).
    ELSE.
    DELETE FROM zncrfid.
    ENDIF.
    *****Values are read from rule table and checking owner and owner_value
    *from zrule_id table and inserted into ZNCRFID **************
    SELECT * FROM zrule_id INTO CORRESPONDING FIELDS OF TABLE it_ruleid
    WHERE zrule_id IN ('OWNER1', 'OWNER2').
    append IT_RULEID.
    LOOP AT ncrf WHERE z9gl_sla_flag EQ 'Y'.
    READ TABLE it_ruleid WITH KEY zowners = ncrf-zowners
    zowners_value = ncrf-zowners_value.
    IF ncrf-zowners = it_ruleid-zowners AND ncrf-zowners_value =
    it_ruleid-zowners_value AND ncrf-z9gl_sla_flag ='Y'.
    itab-zncrf_id = ncrf-zncrf_id.
    itab-zncrf_l4_name = ncrf-zncrf_l4_name.
    itab-z9gl_sla_flag = ncrf-z9gl_sla_flag.
    itab-zdate_changed = sy-datum.
    itab-ztime_changed = sy-uzeit.
    itab-zowners = it_ruleid-zowners.
    itab-zowners_value = it_ruleid-zowners_value.
    APPEND itab.
    ENDIF.
    ENDLOOP.
    modify database table zncrfid FROM ITAB
    LOOP AT itab.
    WRITE:/ itab-zncrf_id, itab-zncrf_l4_name, itab-z9gl_sla_flag,
    itab-zowners, itab-zowners_value, itab-zdate_changed,
    itab-ztime_changed.
    zncrfid-zncrf_id = itab-zncrf_id.
    zncrfid-zncrf_l4_name = itab-zncrf_l4_name.
    zncrfid-z9gl_sla_flag = itab-z9gl_sla_flag.
    zncrfid-zowners = itab-zowners.
    zncrfid-zowners_value = itab-zowners_value.
    zncrfid-zdate_changed = itab-zdate_changed.
    zncrfid-ztime_changed = itab-ztime_changed.
    INSERT INTO zncrfid VALUES zncrfid.
    ENDLOOP.
    ENDIF.
    ENDIF.
    *CALL FUNCTION 'DATE_TO_DAY'
    EXPORTING DATE = sy-datum
    IMPORTING WEEKDAY = file.
    **CHECKING FOR THE FIRST MONDAY OF THE MONTH.
    dates = sy-datum.
    shift dates by 6 places left.
    if file CO 'monday' and dates < 7 and dates >= 1.
    else.
    message e004(zmsg2).
    endif.
    EMAIL SEND TO OWNERS LIST
    **Fill the mail body in i_message.
    get email id's from database into internal table et_mailid
    Fill the document data.
    *g_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
    *g_doc_data-obj_langu = sy-langu.
    *g_doc_data-obj_name = 'SAPRPT'.
    *g_doc_data-obj_descr = c_subject .
    *g_doc_data-sensitivty = 'F'.
    Describe the body of the message
    Information about structure of data tables
    *CLEAR i_packing_list.
    *REFRESH i_packing_list.
    *i_packing_list-transf_bin = space.
    *i_packing_list-head_start = 1.
    *i_packing_list-head_num = 0.
    *i_packing_list-body_start = 1.
    *DESCRIBE TABLE i_message LINES i_packing_list-body_num.
    *i_packing_list-doc_type = 'RAW'.
    *APPEND i_packing_list.
    Add the recipients email address
    *LOOP AT mailid.
    *CLEAR i_receivers.
    *i_receivers-receiver = mailid-zemail_id.
    *i_receivers-rec_type = 'U'.
    *i_receivers-com_type = 'INT'.
    *i_receivers-notif_del = 'X'.
    *i_receivers-notif_ndel = 'X'.
    *APPEND i_receivers.
    *ENDLOOP.
    Call the FM to post the message to SAPMAIL
    *CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    *EXPORTING
    *document_data = g_doc_data
    *put_in_outbox = 'X'
    *commit_work = 'X'
    *IMPORTING
    *sent_to_all = g_sent_all
    *TABLES
    *packing_list = i_packing_list
    *contents_txt = i_message
    *receivers = i_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.
    Store function module return code
    *g_error = sy-subrc.
    Get i_receivers return code
    *LOOP AT i_receivers.
    *ENDLOOP.
    **Instructs mail send program for SAPCONNECT to send email(rsconn01)
    *WAIT UP TO 2 SECONDS.
    *IF g_error EQ 0.
    *SUBMIT zgbl_sla_per WITH mode = 'INT'
    *WITH output = 'X'
    *AND RETURN.
    REWARD IF FOUND USEFULL,
    Cheers,
    Chandru

  • How to send attachement using JACOB

    When I am trying to send an email with attachement using JACOB integrated with MS Outlook.
    Attachement is not going, but the fle link of the attachement is visible and that too in the Outlook Outbox but the mail is goving without the attachement

    When I am trying to send an email with attachement using JACOB integrated with MS Outlook.
    Attachement is not going, but the fle link of the attachement is visible and that too in the Outlook Outbox but the mail is goving without the attachement

  • How to send values from a "Report Column" instead of a "Page Item" ?

    Hi there,
    Here's my case: Two pages A and B.
    Page A is used to view each employee from a selected department.
    Page B is used to created/modify employees.
    I have a create button on page A which redirect to page B.
    By default, page B is blank (as of course we have to fill the blanks to create a new employee).
    However, there is 2 values I want to send to page B (as I'd like to pre-fill some blanks) : The department ID and the Manager ID (there is one manager per department).
    ---- I succeed with the department ID because it's a page item and in the "Action When Button Clicked" of the button I filled "Set These Items" -> Item From Page B "With These Values" -> Item from Page A.
    ---- I'm confused with the Manger ID because it is not a page item but a report column and there is nothing to do like I did for the Department ID in the create button.
    I'm a bit lost cause I don't know how to transfer/send this value to the second page.
    Do you have any clue ?
    Thanks again for your time !
    BR
    Ulrich

    Ulrich,
    Maybe I have misunderstood your requirements, from those I assumed that Page 4 was already being populated with a Department ID. So my plan was to look-up the Manager ID via the known Department ID
    Here's my case: Two pages A and B.Page A is used to view each employee from a selected department.
    Page B is used to created/modify employees.
    I have a create button on page A which redirect to page B.
    By default, page B is blank (as of course we have to fill the blanks to create a new employee).
    However, there is 2 values I want to send to page B (as I'd like to pre-fill some blanks) : The department ID and the Manager ID (there is one manager per department).
    ---- I succeed with the department ID because it's a page item and in the "Action When Button Clicked" of the button I filled "Set These Items" -> Item From Page B "With These Values" -> Item from Page A.
    ---- I'm confused with the Manger ID because it is not a page item but a report column and there is nothing to do like I did for the Department ID in the create button.>
    Have you verified that you have the :P4_DEPARTMENT_ID in session?
    Does your SQL run in SQL Commands when provided a Department ID?
    Have you tried altering when the Computation fires? I recommended to start with After Regions, try some other firing points.
    Jeff

  • How to send out email in HTML format instead of Plain text?

    Can anyone help? Or any website with that information?
    I am trying to send out email using javamail. But i want it to be in HTML format so that i can set font size,coulor and so on.
    Thanks in advance if you have any clue or solution.

    look at this page:http://developer.java.sun.com/developer/onlineTraining/JavaMail/contents.html

  • How to Send SAP User to Spool Job instead of SAPService SID

    Dear Gurus,
    I have to print data using access method C (or L) via print server that runs on win 2008.
    SAP AS runs on win 2003.
    It works fine, but user which appears in print job is SAPService<SID>. We need here sap user who actually initiated printing. It can be obtained easily by chaning access method to G. However, this solution is not acceptable.
    Thank you in advance,
    Nenad

    Problem solved on OS level by introducing anonymous log on.
    Cheers.

  • How to send multiple attachements in single mail

    Hi All,
    Currently i am using this function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send mail with only one attachment.
    But now i need to send multiple attachments to a single mail.
    Can any one please tell me as how to send multiple attachments in single mail.
    Thanks in advance.

    Hi
    See this and do accordingly
    Mailing with Attachment by ABAP Coding  
    Refer this link:
    Mail with attachment.
    FORM send_list_to_basis .
      DATA: w_path      LIKE rlgrap OCCURS 0 WITH HEADER LINE,
            lt_index    TYPE sy-tabix,
            doc_type(3) TYPE c,
            descr       LIKE it_objpack_basis-obj_descr,
            temp_data   LIKE w_path,
            temp1       TYPE string,
            tab_lines   TYPE i,
            langu(15)   TYPE c,
            expirydate  TYPE so_obj_edt,
            L_FILE1(100).
      CONCATENATE 'C:\' sy-repid '_' sy-datum '.XLS' INTO L_FILE1.
      W_PATH-FILENAME = L_FILE1.
      APPEND w_path.
      CLEAR w_path.
      wa_doc_chng-obj_descr  = 'User List not logged on for 180 days'.
      wa_doc_chng-obj_langu  = 'E'.
      wa_doc_chng-obj_expdat = sy-datum.
      CLEAR w_subject.
      CONCATENATE 'Please find attached document with list of users'
                  'not logged on for 180 days for client' sy-mandt
                  INTO w_subject SEPARATED BY space.
      it_objtxt_basis-line = w_subject.
      APPEND it_objtxt_basis.
      CLEAR it_objtxt_basis.
      it_objtxt_basis-line = text-004.
      APPEND it_objtxt_basis.
      CLEAR it_objtxt_basis.
      CLEAR w_tab_line.
      DESCRIBE TABLE it_objtxt_basis LINES w_tab_line.
      READ TABLE it_objtxt_basis INDEX w_tab_line  INTO l_cline.
      wa_doc_chng-doc_size =
       ( w_tab_line - 1 ) * 255 + STRLEN( l_cline ).
      CLEAR it_objpack_basis-transf_bin.
      it_objpack_basis-head_start = 1.
      it_objpack_basis-head_num   = 0.
      it_objpack_basis-body_start = 1.
      it_objpack_basis-body_num   = w_tab_line.
      it_objpack_basis-doc_type   = 'RAW'.
      APPEND it_objpack_basis.
      CLEAR it_objpack_basis.
      LOOP AT w_path.
        temp1 = w_path.
        descr = w_path.
        CALL FUNCTION 'STRING_REVERSE'
          EXPORTING
            string  = descr
            lang    = 'E'
          IMPORTING
            rstring = descr.
        CALL FUNCTION 'STRING_SPLIT'
          EXPORTING
            delimiter = '\'
            string    = descr
          IMPORTING
            head      = descr
            tail      = temp_data.
        CALL FUNCTION 'STRING_REVERSE'
          EXPORTING
            string  = descr
            lang    = 'E'
          IMPORTING
            rstring = descr.
        CALL FUNCTION 'STRING_SPLIT'
          EXPORTING
            delimiter = '.'
            string    = descr
          IMPORTING
            head      = temp_data
            tail      = doc_type.
        CALL FUNCTION 'GUI_UPLOAD'
          EXPORTING
            filename      = temp1
            filetype      = 'BIN'
            header_length = 0
            read_by_line  = 'X'
            replacement   = '#'
          TABLES
            data_tab      = it_upload.
        DESCRIBE TABLE it_upload LINES tab_lines.
        DESCRIBE TABLE it_objbin_basis LINES lt_index.
        lt_index = lt_index + 1.
        LOOP AT it_upload.
          wa_objbin_basis-line = it_upload-line.
          APPEND wa_objbin_basis TO it_objbin_basis.
          CLEAR wa_objbin_basis.
        ENDLOOP.
        it_objpack_basis-transf_bin = 'X'.
        it_objpack_basis-head_start = 0.
        it_objpack_basis-head_num   = 0.
        it_objpack_basis-body_start = lt_index.
        it_objpack_basis-body_num   = tab_lines.
        it_objpack_basis-doc_type   = doc_type.
        it_objpack_basis-obj_descr  = descr.
        it_objpack_basis-doc_size   = tab_lines * 255.
        APPEND it_objpack_basis.
        CLEAR it_objpack_basis.
      ENDLOOP.
      it_reclist_basis-receiver = '[email protected]'.
      it_reclist_basis-rec_type = 'U'.
      APPEND it_reclist_basis.
      CLEAR it_reclist_basis.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = wa_doc_chng
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = it_objpack_basis
          contents_txt               = it_objtxt_basis
          contents_bin               = it_objbin_basis
          receivers                  = it_reclist_basis
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          operation_no_authorization = 4
          OTHERS                     = 99.
      IF sy-subrc EQ 0.
        SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.
      ENDIF.
    ENDFORM.                    " send_list_to_basis
    <b>Reward points for useful Answers</b>
    Regards
    Anji

Maybe you are looking for

  • What are the Handbrake settings to import to iBooks Author?

    Hi. I have a really neat DVD a friend of mine made for me. I can copy the .VOB's to my drive, but then I'm fade with the problem of  which settings to use in Handbrake to get a file which 1) iMovie can use 2) iBooks Author can use. Does anyone have a

  • How can i two adobe digital edition windows?

    Is it possible to open two docs at the same time - strictly one document in two different windows ? I have to campare two parts of one document and it would be much easier if i can do it using two windows on my two monitors. Please help!

  • Zynq DMA access to PL memory (AXI BRAM)

    Hi, We need to transfer data from Zynq PL memory (AXI BRAM) to DDR and also DDR to PL. We have instantiated AXI BRAM controller in PL and are using M_AXI_GP0 interface from PS. We have verified the data transfer between DDR and PL using memcpy functi

  • Synch issues after upgrade to iOS8 on iPad and iPhone.

    iPhone 4S iPad mini 4 have been upgraded to iOs 8.0.2. Uncheck some music for iPhone in iTunes and synch never completes. Space utilized is now very different numbers in iTunes and Settings, General, About. I have done a hard reset on both devices.

  • How recover deleted pictures in my icloud

    How do I recover pictures I deleted but are backed up in my icloud