Problem in Attachment @ Runtime

Hi,
####Senario1:
I started my GP process which has two actions.
Action1 is done by initiator and Action2 is done by other user.
@using Attachment Clip
On Action1, I attached a file at process level  by using attachment clip and completes this step.
Now, I open the next step i.e. "Action2" with different user.
At Action2 I could not able to see previously attached file.
@using Additional Resources Runtime View
I tried this with runtime view "Additional resources".
Here it is working fine.
Can anyone please tell me why this is soo? i have attached file at process level.
####Senario2:
I started my GP process which has two actions.
Both actions are done by initiator.
@using Attachment Clip
attachment is visible in Action2. Working fine.
@using Additional Resources Runtime View
attachment is visible in Action2. working fine.
Why it is working if user is same for both the actions? I have attached file at process level.
Regards,
Pratik

Hi,
Check this thread as evrything should be here :
Attachment transfer from EBP V 5.0 to Backend SAP R/3
Regards,
Laurent.

Similar Messages

  • Problem in attaching a xml file in Email Notification

    Hi,
    I am new to BPEL. I am using 10.1.3.4 Jdev. Facing a problem in attaching a xml file in Email Notification process. I do not get any email when ever the attachment is a xml. Whereas when the attachment is a pdf, i get the pdf in the mail. I have put the mime type as text/xml. Used ora:doc() to read the xml. Dont know what i am missing. Please help me out. Thanks.
    Edited by: friendsforever on Oct 6, 2010 1:05 AM

    actually i want that when a user open my website register form then he must attached their resume in it
    so i want to know how can i make a field of attaching.
    please reply
    I am waiting for your reply

  • Problem in attach a file during mail

    I am facing problem while attaching a file during mailing

    What file ?
    If its some Office document (word / excel) .. first open the document and then (...)-->share and select your mail client ..

  • Problem in attaching a file

    hello
    I have a problem in attaching a file from client site
    Actually i am building a website and i want that client attach any file in login form and that must be attach in my database. I am using a database MsAccess.
    Please help me
    I am waiting for ur reply
    Ashish

    actually i want that when a user open my website register form then he must attached their resume in it
    so i want to know how can i make a field of attaching.
    please reply
    I am waiting for your reply

  • Problem wich attach in e-mail

    Hello!
    I have problem with attach in e-mail for bidders.
    I create a bid invitation and attach any document.
    [Attach|http://www.4shared.com/file/67153110/5be21d31/attach01.html]
    So, i publish my bid invitation and a e-mail is send to bidder.
    But, i go to the SOST and view the e-mail and attach not is there.
    [Problem|http://www.4shared.com/file/67153109/3b2594d4/attach02.html]
    Who can i resolve this problem? Are there any configuration for that?
    Tanks!

    Hi Rodrigo
    You are absolutely correct. please refer this link.check the mentioned BADI in your systems controls ?
    Attachment  .PDF in Bid Invitation and Auction e-mail
    regards
    Muthu

  • PDF ICON problem in attachment

    Hi all,
    I am sending the PO smartform to mail as PDF attachment .
    Attachment was happening correct. but problem is Attachment ICON was not showing as PDF ICON. When Double click on attachment to open , it is asking with OPEN WITH POPUP.in that I am choosing Acorobat reader.
    but i need when i double click attachment , it shoube open in directly in PDF.
    please help in this.
    regards,
    Rama
    Edited by: ram reddy on Feb 24, 2009 1:47 PM

    Just check if everything is fine or not.
    TYPES : BEGIN OF ty_errorlog,
                field(255) TYPE c,
              END OF ty_errorlog.
      DATA:   lwa_objpack TYPE sopcklsti1,        "Contents of the Email
              lt_objpack TYPE STANDARD TABLE OF sopcklsti1,
              lwa_reclist TYPE somlreci1,         "Recievers List
              lt_reclist TYPE STANDARD TABLE OF somlreci1,
              lwa_errorlog TYPE ty_errorlog,
              lwa_doc_chng TYPE sodocchgi1,        "Mail Contents
              lt_errorlog TYPE STANDARD TABLE OF ty_errorlog.
      CONSTANTS :lc_1(15) TYPE n VALUE '1',         "Email Params
                 lc_2(15) TYPE n VALUE '2',          "Email Params
                 lc_raw(3) TYPE c VALUE 'RAW',       "Email Params
                 lc_u TYPE c VALUE 'U',              "Recipient Property
                 lc_01 TYPE c VALUE '1',
                 lc_docsize TYPE so_doc_siz VALUE '510',
                 lc_x TYPE c VALUE 'X'.
    Pack to main body
      lwa_objpack-body_start =  lc_1.
      lwa_objpack-head_start = lc_1.
      lwa_objpack-body_num   =  lc_2.
      lwa_objpack-doc_type   =  lc_raw.
      APPEND lwa_objpack TO lt_objpack.
    Fill receiver list
      lwa_reclist-receiver     =  p_mail.
      lwa_reclist-rec_type     =  lc_u.
      APPEND lwa_reclist TO lt_reclist.
    Filling Mail Contents
      lwa_doc_chng-obj_descr = p_subject.
      lwa_doc_chng-obj_prio   = lc_01.
      lwa_doc_chng-doc_size   = lc_docsize.
      lwa_errorlog-field = p_msg.
      APPEND lwa_errorlog TO lt_errorlog.
    Calling FM to Send Email
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = lwa_doc_chng
          put_in_outbox              = lc_x
          commit_work                = lc_x
        TABLES
          packing_list               = lt_objpack
          contents_txt               = lt_errorlog
          receivers                  = lt_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.
        MESSAGE e011(z_com_msg).
      ENDIF.
    Edited by: Phanindra Annaparthi on Feb 24, 2009 1:49 PM

  • Problems with attached documents in Mail and Docs To Go

    Hello everybody.
    I've found a problem with attached documents in Mail. In fact, if I click on attached documents with .doc (microsoft office word 97-2004) and files in .docx Office Open .xml, the iPad doesn't open them, also if I click in "Open with Docs To Go (which should support these files' format)".
    How can I do? There's an application or another way to open these files?
    Other Informations:
    Docs To Go version: 5.2.2

    Update the patch to the Sapgui.
    Regards,
    Ignacio.

  • Problem receiving attachment with Mail 5.1

    Hi all,
    Just got the New Macbook Pro 15". Superb machine!
    But since i set up my Mail account on Mail 5.1, I can receive and send mails... but have problems opening attachements.
    It tells me that there have been a problem with the file and that It has crashed.
    I don't have any problems when I open the same mail from my internet provider site.
    Any suggestions are welcome.
    Thank you in advance
    Julien

    solved by a colleague

  • Problem reading attached PDF files

    <!--[if gte mso 9]><xml>
    </xml><![endif]--><!--[if gte mso 9]><xml>
    Normal
    0
    false
    false
    false
    MicrosoftInternetExplorer4
    </xml><![endif]--><!--[if gte mso 9]><xml>
    </xml><![endif]--><!--[if !mso]>
    <object
         classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui>
    </object>
    <style>
    st1\:*{behavior:url(#ieooui) }
    </style>
    <![endif]-->
    <!--[if gte mso 10]>
    <style>
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-parent:"";
    mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
    mso-para-margin:0cm;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:"Times New Roman";
    mso-ansi-language:#0400;
    mso-fareast-language:#0400;
    mso-bidi-language:#0400;}
    </style>
    <![endif]-->
    Hello.
    At my work, we use JavaMail (version 1.4.1) in server
    programs, processing mails with attached files from customers. Mostly it is
    TIFF images, but it can also be PDF
    files, and the attached files are extracted and saved for further processing.
    Sometimes, we have a problem, reading attached PDF
    files. The files get saved, but is of size 0 bytes. If I forward it, however,
    using an Outlook client, the forwarded item can be read by our JavaMail program, and files saved OK.
    I have tried to forward it using JavaMail, but I cannot
    compose the mail parts, that fails, however - of the same reasons: I cannot
    read the them in:-)
    It looks like it's when the mail is send from a Mac.
    Anyway, the part to read is of content type "APPLICATION/APPLEFILE" whereas when it's forwarded, it's content
    type is "APPLICATION/OCTET-STREAM"
    The way, I read the part, is to check if the part is an
    instance of an InputStream, and then saving into a byte array, like this:
    h5. Object
    obj = part.getContent();
    if (obj instanceof
    InputStream) {
    InputStream
    inStream = part.getInputStream();
    byte[]
    buffer = new byte[BUFFER_SIZE];
    int
    bytesRead;
    BufferedOutputStream
    outBufStream = new BufferedOutputStream(new FileOutputStream(attFileName));
    while
    ((bytesRead = inStream.read(buffer)) != -1)
    outBufStream.write(buffer,
    0, bytesRead);
    inStream.close();
    h5. outBufStream.close();
    Problem
    is that .read() method always returns -1 when content type Is APPLICATION/APPLEFILE,
    so a file of 0 bytes are created.
    Interesting is perhaps, that debugging shows me that the
    part instance of the InputStream actually is a
    com.sun.mail.util.BASE64DecoderStream when it fails, and a
    com.sun.mail.util.QPDecoderStream
    when it works OK.
    So I have this idea, that I's a certain type of decoder
    stream we're missing? We use Java 1.6.0 update 10 and JavaMail 1.4.1. and since
    we use java 1.6 we use the JAF framework from that one, I guess?
    Hope you guys can help?
    Thanks in advance, Per Jensen
    [email protected]

    We have two (MS Exchange) servers (from trace log):
    Microsoft Exchange IMAP4rev1-server version 5.5.2650.23
    Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7226.0
    - the first one is the one, we're using here, but I have tried on the other, newer version too, and it didn't help either.
    But I've found out a couple of interesting things:
    1: Debugging shows me, that the part instance of the InputStream actually is a com.sun.mail.util.BASE64DecoderStream when it fails, and if I forward the mail via Outlook as described earlier, and it can be read OK, the part is a com.sun.mail.util.QPDecoderStream instance.
    2: I can save the WHOLE message to a file, using message.getInputStream(), and when I opens the file I can find the individual attachments - as well as the bodytext, if any - as they are separated with the disposition, mimetype and filename fields, showed as plain text. And the attachments are showed as blocks of characters; I guess it's the ascii character representation of the bytes. Here's a snippet, note the first two sentences. They seemes to be added, somehow, when I dump the message to file(?):
    <START OF DUMPED FILE>
    This message is in MIME format. Since your mail reader does not understand
    this format, some or all of this message may not be legible.
    ------_=_NextPart_000_01C9A8A2.19479FE4
    Content-Type: text/plain;
         charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    (The body text here)
    ------_=_NextPart_000_01C9A8A2.19479FE4
    Content-Type: application/applefile;
         name="first_attachment.pdf"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
         filename="first_attachment.pdf"
    AAUWAAACAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAASgAAABAAAAAJAAAAWgAAACAAAAADAAAA
    egAAABAAAAABAAAAigAAI6IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAA1NzE2NSBCTkhhdWcucGRmJVBERi0xLjMKJbe+raoKMSAwIG9iago8PAovVHlwZSAv
    Q2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9L
    aWRzIFsgNCAwIFIgXQovQ291bnQgMQo+PgplbmRvYmoKMyAwIG9iago8PAovUHJvZHVjZXIgKEhh
    ...(and so on)
    DMgMDAwMDAgbg0KMDAwMDAwNTM1NSAwMDAwMCBuDQowMDAwMDA2NTA5IDAwMDAwIG4NCjAwMDAw
    MDc2NjUgMDAwMDAgbg0KdHJhaWxlcgo8PAovUm9vdCAxIDAgUgovSW5mbyAzIDAgUgovU2l6ZSAx
    MQo+PgpzdGFydHhyZWYKODgyNAolJUVPRgo=
    ------_=_NextPart_000_01C9A8A2.19479FE4
    Content-Type: application/applefile;
         name="second_attachment.pdf"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
         filename="second_attachment.pdf"
    AAUWAAACAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAASgAAABAAAAAJAAAAWgAAACAAAAADAAAA
    egAAABAAAAABAAAAigAAI9wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAA1NzE4MSBCTkhhdWcucGRmJVBERi0xLjMKJbe+raoKMSAwIG9iago8PAovVHlwZSAv
    Q2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9L
    ...(and so on)
    <END OF DUMPED FILE>I understand that it's base64 encoded and must be decoded, and I have tried to copy/paste the blocks separately, run them through the com.sun.mail.util.BASE64DecoderStream, and saving them as PDF files, which works fine(!).
    As the solution seems to be painfull: Parse the mail to find where the attachments starts and stops and saving them as files, I hope you guys can send me on the right track?
    PS: The trace log when dumping the file shows everything OK, I think. Here's a bit of the log at the end of dumping the message:
    (...)MTUgMDAwMDAgbg0KMDAwMDAwNTg2NyAwMDAwMCBuDQowMDAwMDA3MDIxIDAwMDAwIG4NCjAwMDAw
    MDgxNzcgMDAwMDAgbg0KdHJhaWxlcgo8PAovUm9vdCAxIDAgUgovSW5mbyAzIDAgUgovU2l6ZSAx
    MQo+PgpzdGFydHhyZWYKOTMzNgolJUVPRgo=
    ------_=_NextPart_000_01C9A8A2.19479FE4--
    A10 OK FETCH fuldført.
    A11 FETCH 1 (BODY[TEXT]<40336.16384>)
    * 1 FETCH (BODY[TEXT]<40336> {0}
    20/03-09 15:18:21,445 3 Done, writing bytes to ByteArrayOutputStream. Size: 40336 bytes (..common.mail.MailUtil.dumpMessageToFile.dumpMessageToFile)
    20/03-09 15:18:21,445 3 Done, writing ByteArrayOutputStream to file. (..common.mail.MailUtil.dumpMessageToFile.dumpMessageToFile)
    A11 OK FETCH fuldført.

  • Problem in using runtime.exec()

    Hi all,
    I am having a problem with the runtime.exec method.I am trying to execute linux commands using this method.For most of the commands it works fine.But when i tried to change the user with the su command in linux my program hung up.So please help me to get around this.any help would be highly appreciable..
    I am pasting the code..
    <code>
    Process p=null;
    int ch=0;
    try
    System.out.println("Before executing command");
    String unlock_command="sh changeuser.sh";
    p = Runtime.getRuntime().exec(new String[] {"/bin/sh","-c","su tony"});
    InputStreamReader myIStreamReader = new InputStreamReader(p.getInputStream());
    while ((ch = myIStreamReader.read()) != -1)
    System.out.print((char)ch);
    p.waitFor();
    int p_exitvalue = p.exitValue();
    System.out.println("After executing the command and the exit value = "+p_exitvalue);
    p.destroy();
    catch (IOException anIOException)
    System.out.println(anIOException);
    catch(Exception e)
    e.printStackTrace();
    </code>
    Thanks
    HowRYou

    Is it possible that this is a re-post of this thread?
    http://forum.java.sun.com/thread.jspa?threadID=636637
    :^)Might be! What gives you that impression?

  • Forms/Designer 10g - problem with attached libraries

    I've problem with forms with attached libraries. All of libraries have removed paths. I can run all forms without any problem on my local application server from Forms Builder 9i or Designer 9i. I added all paths in registry FORMS90_PATH. WORKINGDIRECTORY in formsweb.cfg is blank.
    Unfortunately I can't do it with Developer 10g on second workstation. I added all paths in registry FORMS_PATH. WORKINGDIRECTORY in formsweb.cfg is blank too. When form is running I get ORA-06508. I can't store all files (fmb, fmx, pll, plx etc.) in one folder because I've to use CVS. In this case I can't set any folder in WORKINGDIRECTORY.

    Assuming Forms 10.1.2.x, FMX, MMX, PLX, and OLB files are found based on the value of FORMS_PATH which is set in default.env and not the Registry. This applies to runtime only. The Builder uses the Registry.
    Understand that "runtime" refers to any time a form is displayed in a browser, regardless of whether is was started from the Builder or Application Server.
    Also, be aware that if you have FMX, MMX, or PLX files which were created in older versions they must be recompiled using the 10.1.2 compiler.

  • Problem with attachment in web service

    I'm writing a WebService under WebLogic 9.2 . My WebService API needs to recive and return an attachment. I'm tring to use a javax.activation.DataHandler object for the attachment, but for some reason in the WSDL file that being created, the DataHandler isn't being recognize and the "http://www.bea.com/servers/wls90/wsee/attachment" namespace is being associated with it (I'm using "jwsc" in the build.xml).
    Does anyone encounter with problem ? and does the DataHandler is the right object to use for attachment (i want to avoid using base-64 String)?

    duplicate problem with a secured web service

  • Problem with attaching file to Sales Order

    Hello,
    In my company we have the possibility to attach files to sales orders, e.g. pdf files with the printing details.
    These files are added by the GUI user, this works fine.
    Now we have an extra order creation stream in which a pdf file has to be added to the SO without user interaction.
    I found a helpful link ( /people/rammanohar.tiwari/blog/2005/10/10/generic-object-services-gos--in-background )
    This program creates URL links with no problem, but the file generation is not implemented yet.
    I tried to add the file functions to his sample report but still have one problem. The file is uploaded, but not reported as a PDF file in sap. If I select the created attachment SAP allows only the saving of the attachment. After saving the created file is a good PDF file, it opens with PDF-viewers.
    Why does SAP not know this is a PDF file and report it as such (and open the pdf viewer when selected).
    Thanks, Frank.
    source-code:
    REPORT  zzfb_brc                                .
    * Report  Z_RMTIWARI_ATTACH_DOC_TO_BO
    * Written By : Ram Manohar Tiwari
    * Function   : We need to maintain links between Business Object and
    *              the attachment.Attachment document is basiclally a
    *              business object of type 'MESSAGE'.In order to maintain
    *              links, first the attachment will be crated as Business
    *              Object of type 'MESSAGE' using Message.Create method.
    *              Need to check if we can also use FM
    *              'SO_DOC_INSERT_WITH_ORIG_API1' or SO_OBJECT_INSERT rather
    *              than using Message.Create method.
    * I took this program and removed all the parts for adding URL's and
    * notes.
    * Include for BO macros
    INCLUDE : <cntn01>.
    * Load class.
    CLASS cl_binary_relation DEFINITION LOAD.
    CLASS cl_obl_object      DEFINITION LOAD.
    PARAMETERS:
    *  Object_a
       p_botype LIKE obl_s_pbor-typeid DEFAULT 'BUS2032',    "SO
       p_bo_id  LIKE obl_s_pbor-instid DEFAULT '0000757830', "example number
    *  Object_b
       p_docty  LIKE obl_s_pbor-typeid DEFAULT 'MESSAGE' NO-DISPLAY,
       p_msgtyp LIKE sofm-doctp        DEFAULT 'EXT'     NO-DISPLAY,
    *  Relationship
       p_reltyp  LIKE mdoblrel-reltype DEFAULT 'ATTA'.
    TYPES: BEGIN OF ty_message_key,
            foltp     TYPE so_fol_tp,
            folyr     TYPE so_fol_yr,
            folno     TYPE so_fol_no,
            doctp     TYPE so_doc_tp,
            docyr     TYPE so_doc_yr,
            docno     TYPE so_doc_no,
            fortp     TYPE so_for_tp,
            foryr     TYPE so_for_yr,
            forno     TYPE so_for_no,
           END OF ty_message_key.
    DATA : lv_message_key TYPE ty_message_key.
    DATA : lo_message TYPE swc_object.
    DATA : lt_doc_content TYPE STANDARD TABLE OF soli-line,
           ls_doc_content TYPE soli-line.
    * Create an initial instance of BO 'MESSAGE' - to call the
    * instance-independent method 'Create'.
    swc_create_object lo_message 'MESSAGE' lv_message_key.
    * Upload the pdf file, for now from the frontend, in the future from
    * the server.
    DATA:
    *  dsn(40) TYPE C VALUE '/usr/sap/trans/convert/1.pdf', "server location
    l_lines TYPE i. "filelenght
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename   = 'c:t1.pdf'
        filetype   = 'BIN'
      IMPORTING
        filelength = l_lines
      TABLES
        data_tab   = lt_doc_content.
    * no exceptions, the file is there in this example
    break brouwersf.
    ** the coding for the server input, for later
    *OPEN DATASET dsn FOR INPUT IN BINARY MODE.
    *IF sy-subrc <> 0.
    *  EXIT.
    *ENDIF.
    *READ DATASET dsn INTO ls_doc_content.
    *WHILE sy-subrc EQ 0.
    *  APPEND ls_doc_content TO lt_doc_content.
    *  READ DATASET dsn INTO ls_doc_content.
    *ENDWHILE.
    *CLEAR ls_doc_content.
    *CLOSE DATASET dsn.
    * define container to pass the parameter values to the method call
    * in next step.
    swc_container lt_message_container.
    * Populate container with parameters for method
    swc_set_element lt_message_container 'DOCUMENTTITLE' 'Title'.
    swc_set_element lt_message_container 'DOCUMENTLANGU' 'E'.
    swc_set_element lt_message_container 'NO_DIALOG'     'X'.
    swc_set_element lt_message_container 'DOCUMENTNAME' p_docty.
    swc_set_element lt_message_container 'DOCUMENTTYPE' p_msgtyp.
    swc_set_element lt_message_container 'DocumentSize'    l_lines.
    swc_set_element lt_message_container 'DocumentContent' lt_doc_content.
    swc_call_method lo_message 'CREATE' lt_message_container.
    * Refresh to get the reference of create 'MESSAGE' object for attachment
    swc_refresh_object lo_message.
    * Get Key of new object
    swc_get_object_key lo_message lv_message_key.
    * Now we have attachment as a business object instance. We can now
    * attach it to our main business object instance.
    * Create main BO object_a
    DATA: lo_is_object_a TYPE sibflporb.
    lo_is_object_a-instid = p_bo_id.
    lo_is_object_a-typeid = p_botype.
    lo_is_object_a-catid  = 'BO'.
    * Create attachment BO object_b
    DATA: lo_is_object_b TYPE sibflporb.
    lo_is_object_b-instid = lv_message_key.
    lo_is_object_b-typeid = p_docty.
    lo_is_object_b-catid  = 'BO'.
    *TRY.
    CALL METHOD cl_binary_relation=>create_link
      EXPORTING
        is_object_a = lo_is_object_a
        is_object_b = lo_is_object_b
        ip_reltype  = p_reltyp.
    * Check if everything OK...who cares!!
    COMMIT WORK.

    Hi,
    Welcome to the SDN Forums!!!
    You need to supply the PC file extension in the container element 'DOCUMENTTYPE'.
    swc_set_element lt_message_container 'DOCUMENTTYPE' p_msgtyp.
    In your case change the above statement as below:
    swc_set_element lt_message_container 'DOCUMENTTYPE' 'pdf'.
    <b>OR</b> change the default value of p_msgtyp to 'PDF'.
    Cheers,
    Ramki Maley.
    Please reward points if the answer is helpful.
    For info on awarding points click on this link: https://www.sdn.sap.com/sdn/index.sdn?page=crp_help.htm
    Message was edited by: Ramki Maley

  • Problem with attachment using SO_NEW_DOCUMENT_ATT_SEND_API1

    Hi,
    I'm using function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send emails from SAP (to Outlook - but the problem can already be observed when checking the email attachment in transaction SOST) with attachments.
    My attachment is a tab delimited file (so that I can open with MS Excel) with a line size of approx. 1600 characters. I mean, concatenating all fields of the output table into a 1600 character field, separated by tabstops (cl_abap_char_utilities=>horizontal_tab)
    I am using function module SCMS_STRING_TO_FTEXT to convert the internal table that I want to send to the line size as accepted by function module SO_NEW_DOCUMENT_ATT_SEND_API1, tables parameter contents_bin. Due to function module SCMS_STRING_TO_FTEXT this happens line by line, using a string variable. I make sure to remove any exess blanks that appear in the process due to not completey filled character fields. And for all rows bar the first the string is prefixed with (cl_abap_char_utilities=>cr_lf). I believe that's required so that SAP knows to put the lines back together. So far so good.
    When checking the email's attachment via SOST (and the same happens in Outlook) there are extra blanks in certain fields. Like:
    Annual Base
    92,928.         00
    or
    Email
    First L ast
    In debugging it appears that these excess spaces (sometimes 1, sometimes several) appear where the 1600 character data line is split into the 255 character pieces in 'contents_bin'. But then it happens quite randomly and cannot be observed in all data rows.
    Is there a better way of splitting my internal table into 255 character chunks so that what is one field will never get split up into two rows. For the above example, the two fields would show like this in contents_bin
    ....  92,928.        
    00
    and
    First_L
    ast
    Or where else lies the problem?
    Thanks in advance!
    Philipp

    Ron,
    Thank you for the suggestion. Just tried but issue remains exactly the same. The function module you have suggested builds the table in the same way.
    But, after a few more rounds of debugging and scratching my head it occured to me that my problem is self inflicted. I was using the condense statement in an attempt to get rid of the trailing blanks at the end of a row causing the last column to be filled with lots of spaces at the end. But it wasn't working anyway and I have since inserted a dummy column at the end to take all those trailing blanks. What this condense statement did though was creating trailing blanks in some of those rows with 255 characters fixed length and those trailing blanks then showed up as additional blanks in some columns in the attachment that the emailing function module created by putting those lines back to it's original length of close to 1600 characters.
    Problem solved!
    Regards,
    Philipp

  • Problem in Attachment of the Mail

    Hi, I want to send the data in Internal Table as a text attachment to the SAP User Inbox. Problem I am facing is that, the records should go Line by Line i.e. each record should start from a new line but problem I am having is that, the next record starts in the same line where previous record has ended.
    E.g. records should appear like this in file :
    1. AAA XXX YYY ZZZ
    2. XXX YYY ZZZ AAA
    rather it is appearing like :
    1. AAA XXX YYY ZZZ2. XXX YYY ZZZ AAA
    I am giving the Code here to generate attachment and Mail I have used. Please help.
    Data Declaration
    data : begin of itab occurs 0,
             ws_line(600) type c,
           end of itab.
    DATA : file_name TYPE string.
    data : path like PCFILE-PATH.
    data : extension(5) type c.
    data : name(100) type c.
    DATA : receiver TYPE somlreci1-receiver VALUE 'AHUJR0'.
    DATA : BEGIN OF itab_str,
               text(290) TYPE c,
           END OF itab_str.
    DATA: docdata LIKE sodocchgi1,
          objpack LIKE sopcklsti1  OCCURS 0 WITH HEADER LINE,
          objhead LIKE solisti1    OCCURS 0 WITH HEADER LINE,
          objtxt  LIKE solisti1    OCCURS 0 WITH HEADER LINE,
          objbin  LIKE itab_str    OCCURS 0 WITH HEADER LINE,
          objhex  LIKE solix       OCCURS 0 WITH HEADER LINE,
          reclist LIKE somlreci1   OCCURS 0 WITH HEADER LINE.
    DATA: tab_lines TYPE i,
          doc_size TYPE i,
          att_type LIKE soodk-objtp.
    DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
    Function Called to Prepare & send mail
    PERFORM ml_addrecp USING receiver 'B'.     "receiver contains SAP User Id
    PERFORM doconv TABLES itab objbin.          "itab is the table containing Data
    PERFORM ml_prepare USING 'X' 'txt' grn_file.  "grn_file is the name of attachment file
    PERFORM ml_dosend.
    Form ml_addrecp
    FORM ml_addrecp USING preceiver prec_type.
    CLEAR reclist.
    reclist-receiver = preceiver.
    reclist-rec_type = prec_type.
    APPEND reclist.
    ENDFORM. "ml_addrecp
    Form doconv
    FORM doconv TABLES mypdf STRUCTURE itab_str
                       outbin STRUCTURE itab_str.
    Loop And Put Data
          LOOP AT mypdf.
              outbin = mypdf.
              APPEND outbin.
             CLEAR: outbin.
          ENDLOOP.
    ENDFORM. "doconv
    Form ml_prepare
    FORM ml_prepare USING bypassmemory whatatt_type whatname.
    IF bypassmemory = ''.
    Fetch List From Memory
        CALL FUNCTION 'LIST_FROM_MEMORY'
          TABLES
            listobject = listobject
          EXCEPTIONS
            OTHERS = 1.
    IF sy-subrc <> 0.
        MESSAGE ID '61' TYPE 'E' NUMBER '731'
        WITH 'LIST_FROM_MEMORY'.
    ENDIF.
    ENDIF.
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'TXT'.
    APPEND objpack.
    Packing Info Attachment
    att_type = whatatt_type..
    DESCRIBE TABLE objbin LINES tab_lines.
    READ TABLE objbin INDEX tab_lines.
    objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = att_type.
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = whatname.
    APPEND objpack.
    ENDFORM. "ml_prepare
    Form ml_dosend.
    FORM ml_dosend.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data = docdata
          put_in_outbox = 'X'
          commit_work = 'X' "used from rel. 6.10
        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.
    IF sy-subrc <> 0.
        MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
        WITH docdata-obj_name.
    ENDIF.
    ENDFORM. "ml_dosend

    Hi Ravi,
    I also had the same problem, the solution to this is....  Instead of giving the TXT type to the attachment give as 'RAW' it will work...  it is working for me... note the place for the comment CHANGE I HAVE DONE in the code given by you...
    objpack-doc_type = 'RAW'.  '' for the attachment instead of TXT...
    Eg...
    Packing Info Attachment
    *att_type = whatatt_type..                          '" CHANGE I HAVE DONE
    DESCRIBE TABLE objbin LINES tab_lines.
    READ TABLE objbin INDEX tab_lines.
    objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    *objpack-doc_type = att_type.  " CHANGE I HAVE DONE
    objpack-doc_type = 'RAW'.      " CHANGE I HAVE DONE
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = whatname.
    APPEND objpack.
    ENDFORM. "ml_prepare

Maybe you are looking for

  • Application Import not working for 1.6

    I just upgrade from 1.5 to 1.6 successfully with no errors. When I attempt to import a application I get a "Page can not be found" internet explorer error.

  • How to Install a Dialog Instance on NT server which CI is running on Unix

    Dear expert: Recently, we wanna add new dialog instance for our production system, but only one NT server can be used. Our SAP version is ECC6.0 SR3 and it's CI is running on HPUX 11.31. steps below: 1. I have configed the SAMBA with shared /sapmnt -

  • Built-in restore session hangs/freezes with too many tabs in Fx 29

    Hi, I've used the Session Manager add on for awhile, ever since a previous 'upgrade' to Firefox tended to not save sessions after a crash. The upgrade to version 29 has rendered Session Manager unusable, as documented here: https://support.mozilla.or

  • How do I  burn Playlist to disc, when it is greyed out.

    Hi, I have updated to itunes 7 and the first thing I did was lose all my music off my ipod, as I didn't have it in the library. I now think that I have all my music back as I had backed up on DVDs. I know that itunes is s'posed to be a one way thing

  • Adf faces demo problem

    I've installed adffacesdemo in to my local Jdeveloper instance. When I try to run the index.jspx file, it's giving a warning message about http port conflict and suggest to click OK for auto port assignment. I clicked OK for auto port resolution, but