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

Similar Messages

  • 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 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.

  • UTL_SMTP mail with attachment( Problem in attaching zip file)

    Hi All,
    I used the below code for sending email with attachment. but when i try to add the message body its not working in the sense its not attaching my file. when i commented that line its attaching the file.
    commented lines:
    -- utl_smtp.write_data(mail_conn,UTL_TCP.CRLF ||'Body' ||':'|| text || UTL_TCP.CRLF);
      --utl_smtp.write_data(mail_conn,UTL_TCP.CRLF||text || UTL_TCP.CRLF );How to resolve this issue???
    Complete procedure.
    create or replace
    procedure sssl_send_mail (
          p_sender varchar2,
          p_recipient varchar2,
          p_cc varchar2,
          p_subject varchar2,
          p_filename varchar2,
          text varchar2) is    
        --c utl_smtp.connection;
        v_raw raw(57);
        v_length integer := 0;
        v_buffer_size integer := 57;
        v_offset integer := 1;
        mailhost    VARCHAR2(64) := 'xxxxxxxxxx';
        port constant number(2):=25;
        timeout number :=180;
        mail_conn  utl_smtp.connection;  
    p_blob Blob;
    temp_os_file bfile;
    ex number; 
    begin 
       DBMS_LOB.CREATETEMPORARY(p_blob,true);
       temp_os_file := BFILENAME ('xxxxxxxx',p_filename);
       ex := dbms_lob.fileexists(temp_os_file);
          if ex = 1 then
             dbms_lob.fileopen(temp_os_file, dbms_lob.file_readonly);
             dbms_lob.loadfromfile(p_blob,temp_os_file, dbms_lob.getlength(temp_os_file));
             dbms_lob.fileclose(temp_os_file);
           end if;
       mail_conn := utl_smtp.open_connection(mailhost, port,timeout);
       utl_smtp.helo(mail_conn, mailhost);
       utl_smtp.mail(mail_conn, p_sender);
       utl_smtp.rcpt(mail_conn, p_recipient);
       utl_smtp.rcpt(mail_conn, p_cc);
       utl_smtp.open_data(mail_conn);
      utl_smtp.write_data(mail_conn,'From'||':'|| p_sender || UTL_TCP.CRLF);
      utl_smtp.write_data(mail_conn,'To'||':'|| p_recipient || UTL_TCP.CRLF);
      utl_smtp.write_data(mail_conn,'CC'||':'|| p_cc || UTL_TCP.CRLF);
      utl_smtp.write_data(mail_conn,'Subject' ||':'|| p_subject || UTL_TCP.CRLF);
    -- utl_smtp.write_data(mail_conn,UTL_TCP.CRLF ||'Body' ||':'|| text || UTL_TCP.CRLF);
      --utl_smtp.write_data(mail_conn,UTL_TCP.CRLF||text || UTL_TCP.CRLF );
        utl_smtp.write_data( mail_conn, 'Content-Disposition: attachment; filename="' || p_filename || '"' || utl_tcp.crlf);
        utl_smtp.write_data( mail_conn, 'Content-Transfer-Encoding: base64' || utl_tcp.crlf );
        utl_smtp.write_data( mail_conn, utl_tcp.crlf );
        v_length := dbms_lob.getlength(p_blob);    
        <<while_loop>>
        while v_offset < v_length loop
          dbms_lob.read( p_blob, v_buffer_size, v_offset, v_raw );
          utl_smtp.write_raw_data( mail_conn, utl_encode.base64_encode(v_raw) );
          utl_smtp.write_data( mail_conn, utl_tcp.crlf );
          v_offset := v_offset + v_buffer_size;
        end loop while_loop;
        utl_smtp.write_data( mail_conn, utl_tcp.crlf );
        utl_smtp.close_data(mail_conn);
        utl_smtp.quit(mail_conn);
      exception
        when utl_smtp.transient_error or utl_smtp.permanent_error then
          utl_smtp.quit(mail_conn);
          raise;
        when others then
        raise;
      end;Please help me out to resolve this issue.
    Thanks in advance.
    Cheers ,
    Shan.
    Edited by: Shan on 13 Jan, 2011 1:08 PM
    Edited by: Shan on 14 Jan, 2011 3:22 PM

    Hi,
    Some Problems i am facing with this procedure. when i try to add CC in this procedure. Its sending the mail for recipent , But the CC person not getting the mail. How to resolve this??
    create or replace
    PROCEDURE sssl_send_mail( p_sender varchar2,
          p_recipient varchar2,
          p_cc varchar2,
          p_subject varchar2,
          p_filename varchar2,
          text varchar2) is 
        /*LOB operation related varriables */
       v_src_loc  BFILE;
       l_buffer   RAW(200);
       l_amount   BINARY_INTEGER := 200;
       l_pos      INTEGER := 1;
       l_blob     BLOB := EMPTY_BLOB;
       l_blob_len INTEGER;
       v_amount   INTEGER;
        /*UTL_SMTP related varriavles. */
        v_connection_handle  UTL_SMTP.CONNECTION;
        v_from_email_address VARCHAR2(200);
        v_to_email_address   VARCHAR2(200) ;
        v_smtp_host          VARCHAR2(10) ;
        v_subject            VARCHAR2(500) ;
        l_message            VARCHAR2(3000);
        /* This send_header procedure is written in the documentation */
        PROCEDURE send_header(pi_name IN VARCHAR2, pi_header IN VARCHAR2) AS
        BEGIN
        --dbms_output.put_line('entering into procedure');
        --dbms_output.put_line(pi_name || ': ' || pi_header);
          UTL_SMTP.WRITE_DATA(v_connection_handle,
                              pi_name || ': ' || pi_header || UTL_TCP.CRLF);
        END;
      BEGIN
       v_src_loc             := BFILENAME('BROKERREPORTS',p_filename);
       v_from_email_address  := p_sender;
       v_to_email_address    := p_recipient;
       v_smtp_host           := 'sbssld1'; --My mail server, replace it with yours.
       v_subject             := p_subject;
       l_message      := 'test';
        /*Preparing the LOB from file for attachment. */
        DBMS_LOB.OPEN(v_src_loc, DBMS_LOB.LOB_READONLY); --Read the file
        DBMS_LOB.CREATETEMPORARY(l_blob, TRUE); --Create temporary LOB to store the file.
        v_amount := DBMS_LOB.GETLENGTH(v_src_loc); --Amount to store.
        DBMS_LOB.LOADFROMFILE(l_blob, v_src_loc, v_amount); -- Loading from file into temporary LOB
        l_blob_len := DBMS_LOB.getlength(l_blob);
    /*UTL_SMTP related coding. */
        v_connection_handle := UTL_SMTP.OPEN_CONNECTION(host => v_smtp_host);
        UTL_SMTP.HELO(v_connection_handle, v_smtp_host);
        UTL_SMTP.MAIL(v_connection_handle, v_from_email_address);
        UTL_SMTP.RCPT(v_connection_handle, v_to_email_address);
        UTL_SMTP.OPEN_DATA(v_connection_handle);
        send_header('From', v_from_email_address || '<'||'>');
        send_header('TO', v_to_email_address || '<'||'>');
        send_header('CC', p_cc        || '<'||'>');
        send_header('Subject', v_subject);
        --MIME header.
       UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'MIME-Version: 1.0' || UTL_TCP.CRLF);
       UTL_SMTP.WRITE_DATA(v_connection_handle,
                            'Content-Type: multipart/mixed; ' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            ' boundary= "' || 'SAUBHIK.SECBOUND' || '"' ||
                            UTL_TCP.CRLF);
       UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
        -- Mail Body
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            '--' || 'SAUBHIK.SECBOUND' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            'Content-Type: text/plain;' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            ' charset=US-ASCII' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle, l_message || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
        -- Mail Attachment
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            '--' || 'SAUBHIK.SECBOUND' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                           'Content-Type: application/octet-stream' ||
                            UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            'Content-Disposition: attachment; ' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            ' filename="' || p_filename || '"' || --My filename
                            UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            'Content-Transfer-Encoding: base64' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      /* Writing the BLOL in chunks */
        WHILE l_pos < l_blob_len LOOP
          DBMS_LOB.READ(l_blob, l_amount, l_pos, l_buffer);
          UTL_SMTP.write_raw_data(v_connection_handle,
                                  UTL_ENCODE.BASE64_ENCODE(l_buffer));
          UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
          l_buffer := NULL;
          l_pos    := l_pos + l_amount;
        END LOOP;
        UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
        -- Close Email
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            '--' || 'SAUBHIK.SECBOUND' || '--' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            UTL_TCP.CRLF || '.' || UTL_TCP.CRLF);
        UTL_SMTP.CLOSE_DATA(v_connection_handle);
        UTL_SMTP.QUIT(v_connection_handle);
        DBMS_LOB.FREETEMPORARY(l_blob);
        DBMS_LOB.FILECLOSE(v_src_loc);
      EXCEPTION
        WHEN OTHERS THEN
          UTL_SMTP.QUIT(v_connection_handle);
          DBMS_LOB.FREETEMPORARY(l_blob);
          DBMS_LOB.FILECLOSE(v_src_loc);
         sssl_internal_error_track(sqlcode,sqlerrm,'SSSL_SEND_MAIL',NULL);
      END;Thanks in Advance.
    Cheers,
    Shan.
    Edited by: Shan on 13 Jan, 2011 12:33 PM
    Edited by: Shan on 13 Jan, 2011 1:05 PM

  • Problem in attaching XLS file to decision step

    Hi All,
    I have a requirement where i have to add a attachment to workflow while triggering the workflow itself and attach that to user decisition step, i have searched the forum for the same and i got some piece of code which i mention here.
    include <CNTN01>.
    DATA: attach TYPE swc_object.
    DATA:it_objhex TYPE solix_tab.
    DATA:container TYPE SWCONT OCCURS 0 WITH HEADER LINE,
          SIMPLE_CONTAINER TYPE STANDARD TABLE OF SWR_CONT
                                       WITH HEADER LINE.
    DATA :ml TYPE STANDARD TABLE OF  swr_messag ,
          ms TYPE STANDARD TABLE OF  swr_mstruc ,
      rc LIKE  sy-subrc,
      wi LIKE  swr_struct-workitemid.
    swc_container l_cont.
    DATA folder_id TYPE sofdk.
    DATA lt_objcont TYPE STANDARD TABLE OF soli.
    DATA ls_objcont TYPE soli.
    DATA l_obj_data TYPE sood1.
    DATA l_obj_id TYPE soodk.
    DATA document_id TYPE sofmk.
    DATA lt_objhead TYPE STANDARD TABLE OF soli.
    data wa_soli type soli.
    data wa_solix type solix.
    data lt_solix type STANDARD TABLE OF solix .
    FIELD-SYMBOLS: <ptr_text> type soli,
    <ptr_x> type any,
    <ptr_hex> type solix.
    define hex_to_cont.
    &1 Table of structure SOLIX
    &2 Table of structure SOLI
    refresh &2.
    loop at &1 into wa_solix.
    clear wa_soli.
    assign wa_soli to <ptr_hex> casting.
    move wa_solix to <ptr_hex>.
    append wa_soli to &2.
    endloop.
    end-of-definition.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETER f_n TYPE string.
    SELECTION-SCREEN END OF BLOCK b1.
    CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
    EXPORTING
    region = 'B'
    IMPORTING
    folder_id = folder_id
    EXCEPTIONS
    OTHERS = 1.
    *get the XLS file into a table
    CALL FUNCTION 'GUI_UPLOAD'
       EXPORTING
         filename                      = f_n
        FILETYPE                      = 'BIN'
       tables
         data_tab                      = lt_solix
    IF sy-subrc <> 0.
    ENDIF.
    l_obj_data-objnam = 'SOFM'.
    l_obj_data-objdes = 'test'.
    l_obj_data-file_ext = 'PDF'.
    hex_to_cont lt_solix LT_OBJCONT.
    CALL FUNCTION 'SO_OBJECT_INSERT'
    EXPORTING
    folder_id = folder_id
    object_type = 'EXT' "'RAW'
    object_hd_change = l_obj_data
    IMPORTING
    object_id = l_obj_id
    TABLES
    objhead = lt_objhead
    objcont = LT_OBJCONT
    EXCEPTIONS
    active_user_not_exist = 35
    folder_not_exist = 6
    object_type_not_exist = 17
    owner_not_exist = 22
    parameter_error = 23
    OTHERS = 1000.
    COMMIT WORK.
    Data: tb_key(100).
    IF sy-subrc = 0.
    document_id-foltp = folder_id-foltp.
    document_id-folyr = folder_id-folyr.
    document_id-folno = folder_id-folno.
    document_id-doctp = l_obj_id-objtp.
    document_id-docyr = l_obj_id-objyr.
    document_id-docno = l_obj_id-objno.
    ELSE.
    ENDIF.
    Concatenate folder_id-foltp folder_id-folyr folder_id-folno
    into tb_key.
    swc_create_object attach 'SOFM' tb_key.
    SWC_SET_ELEMENT CONTAINER 'SOFM' attach.
    LOOP AT CONTAINER.
        MOVE-CORRESPONDING CONTAINER TO SIMPLE_CONTAINER.
        APPEND SIMPLE_CONTAINER.
        CLEAR CONTAINER.
    ENDLOOP.
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
        EXPORTING
          task                      = 'WS95000377'
       IMPORTING
         return_code               = rc
         workitem_id               = wi
       TABLES
         input_container           = SIMPLE_CONTAINER
         message_lines             = ml
         message_struct            = ms
    but my problem is i am getting error in triggering workflow it says"1. The container passed has errors
    2.Object type and current value missing for element 'SOFM'"
    Please guide me on this..
    Thanks,
    Kishore

    Hi All,
    I have a requirement where i have to add a attachment to workflow while triggering the workflow itself and attach that to user decisition step, i have searched the forum for the same and i got some piece of code which i mention here.
    include <CNTN01>.
    DATA: attach TYPE swc_object.
    DATA:it_objhex TYPE solix_tab.
    DATA:container TYPE SWCONT OCCURS 0 WITH HEADER LINE,
          SIMPLE_CONTAINER TYPE STANDARD TABLE OF SWR_CONT
                                       WITH HEADER LINE.
    DATA :ml TYPE STANDARD TABLE OF  swr_messag ,
          ms TYPE STANDARD TABLE OF  swr_mstruc ,
      rc LIKE  sy-subrc,
      wi LIKE  swr_struct-workitemid.
    swc_container l_cont.
    DATA folder_id TYPE sofdk.
    DATA lt_objcont TYPE STANDARD TABLE OF soli.
    DATA ls_objcont TYPE soli.
    DATA l_obj_data TYPE sood1.
    DATA l_obj_id TYPE soodk.
    DATA document_id TYPE sofmk.
    DATA lt_objhead TYPE STANDARD TABLE OF soli.
    data wa_soli type soli.
    data wa_solix type solix.
    data lt_solix type STANDARD TABLE OF solix .
    FIELD-SYMBOLS: <ptr_text> type soli,
    <ptr_x> type any,
    <ptr_hex> type solix.
    define hex_to_cont.
    &1 Table of structure SOLIX
    &2 Table of structure SOLI
    refresh &2.
    loop at &1 into wa_solix.
    clear wa_soli.
    assign wa_soli to <ptr_hex> casting.
    move wa_solix to <ptr_hex>.
    append wa_soli to &2.
    endloop.
    end-of-definition.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETER f_n TYPE string.
    SELECTION-SCREEN END OF BLOCK b1.
    CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
    EXPORTING
    region = 'B'
    IMPORTING
    folder_id = folder_id
    EXCEPTIONS
    OTHERS = 1.
    *get the XLS file into a table
    CALL FUNCTION 'GUI_UPLOAD'
       EXPORTING
         filename                      = f_n
        FILETYPE                      = 'BIN'
       tables
         data_tab                      = lt_solix
    IF sy-subrc <> 0.
    ENDIF.
    l_obj_data-objnam = 'SOFM'.
    l_obj_data-objdes = 'test'.
    l_obj_data-file_ext = 'PDF'.
    hex_to_cont lt_solix LT_OBJCONT.
    CALL FUNCTION 'SO_OBJECT_INSERT'
    EXPORTING
    folder_id = folder_id
    object_type = 'EXT' "'RAW'
    object_hd_change = l_obj_data
    IMPORTING
    object_id = l_obj_id
    TABLES
    objhead = lt_objhead
    objcont = LT_OBJCONT
    EXCEPTIONS
    active_user_not_exist = 35
    folder_not_exist = 6
    object_type_not_exist = 17
    owner_not_exist = 22
    parameter_error = 23
    OTHERS = 1000.
    COMMIT WORK.
    Data: tb_key(100).
    IF sy-subrc = 0.
    document_id-foltp = folder_id-foltp.
    document_id-folyr = folder_id-folyr.
    document_id-folno = folder_id-folno.
    document_id-doctp = l_obj_id-objtp.
    document_id-docyr = l_obj_id-objyr.
    document_id-docno = l_obj_id-objno.
    ELSE.
    ENDIF.
    Concatenate folder_id-foltp folder_id-folyr folder_id-folno
    into tb_key.
    swc_create_object attach 'SOFM' tb_key.
    SWC_SET_ELEMENT CONTAINER 'SOFM' attach.
    LOOP AT CONTAINER.
        MOVE-CORRESPONDING CONTAINER TO SIMPLE_CONTAINER.
        APPEND SIMPLE_CONTAINER.
        CLEAR CONTAINER.
    ENDLOOP.
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
        EXPORTING
          task                      = 'WS95000377'
       IMPORTING
         return_code               = rc
         workitem_id               = wi
       TABLES
         input_container           = SIMPLE_CONTAINER
         message_lines             = ml
         message_struct            = ms
    but my problem is i am getting error in triggering workflow it says"1. The container passed has errors
    2.Object type and current value missing for element 'SOFM'"
    Please guide me on this..
    Thanks,
    Kishore

  • Problem opening attached pdf file

    Hi everybody,
    I'm trying to open a pdf file attached in a mail, but when i try to open it adobe acrobat gives me this error.
    Adobe Reader could not open <doc1.pdf> because it is either not a supported file type or the file has been damaged (for eg:it was sent as an email attachment and wasn't correctly decoded.)
    I've read many posts related to this problem but i haven't found the solution yet.
    Can anyone help me?
    Thanx!!

    Hi Dieter,
    Here is the code,
    doc_chng-obj_name = 'Nomina'.
    doc_chng-obj_descr = 'Nomina de empleado'.
    objtxt = '<html><body>Reserve price : <b>$250000</b>'.
    APPEND objtxt.
    objtxt = 'A reproduction of the painting to be auctioned'.
    APPEND objtxt.
    objtxt = 'is enclosed as an attachment.</body></html>'.
    APPEND objtxt.
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    Creating the entry for the compressed document
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num   = 0.
    objpack-body_start = 1.
    objpack-body_num   = tab_lines.
    objpack-doc_type   = 'PDF'.
    APPEND objpack.
    Crecion de attachments
    (Assume the data in OBJBIN are given in PDF format)
    DESCRIBE TABLE data_tab LINES tab_lines.
    objhead = 'nomina.pdf'. APPEND objhead.
    Creating the entry for the compressed attachment
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num   = 1.
    objpack-body_start = 1.
    objpack-body_num   = tab_lines.
    objpack-doc_type   = 'PDF'.
    objpack-obj_name   = 'ATTACHMENT'.
    objpack-obj_descr = 'Nomina Empleado'.
    objpack-doc_size   = tab_lines * 255.
    APPEND objpack.
    Entering names in the distribution list
    reclist-receiver = 'kkkkkkkkk'.
    reclist-rec_type = 'U'.
    append reclist.
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        document_data              = doc_chng
        put_in_outbox              = 'X'
        commit_work                = 'X'
      TABLES
        packing_list               = objpack
        object_header              = objhead
        contents_bin               = objbin
        contents_txt               = objtxt
        receivers                  = reclist
      EXCEPTIONS
        too_many_receivers         = 1
        document_not_sent          = 2
        operation_no_authorization = 4
        OTHERS                     = 99.

  • Problem with attached zip file

    I received an email with a zip file attached, but whenever I try to open it I get the message "Unable to unarchive "filename.zip: into "Desktop." (Error 1 - Operation not permitted)"
    Can anyone help?

    Download Stuffit Expander which can open just about anything you throw at it. You can obtain this "free" utility from Versiontracker and Macupdate.

  • I am having a problem with the FireFox browser. I have attached two files that best describe the problem. I have labeled them A & B. A is the way it should lo

    I am having a problem with the FireFox browser. I have attached two files that best describe the problem. I have labeled them A & B. A is the way it should look and B is what happens after I have I opened several tabs. I can get it back to normal if I click on VIEW than click on customize. When the customize window appears FireFox returns to its normal state. I than click on the done box and go back to what I have been doing. I tried resetting FireFox back to default settings, but that did not correct the problem.
    This began happening about a month ago. Is there a way I can fix this problem? Thanks for your help.I don't know how to attach my 2 attachments that shows the problem I am having.
    [email address removed to protect your privacy and security]
    <! [email protected] -->

    I found the images here: https://support.mozilla.org/en-US/questions/977542#answer-501598

  • Firefox crashes when I try to attach a file. Seems related to second problem, receive error messages when opening a pdf in adobe (which I've reinstalled twice)

    Crash report:
    bp-74bcae4f-7091-4121-a809-5d0a12140616 is the crash report.
    I have a Toshiba.
    When I open my email (gmail, school email) and try to attach a file, firefox immediately crashes and gives me two error messages. first one is a WerFault, i think. I don't know if that's relevant.
    Apart from these crashes in Firefox, I am also having the same problem when trying to view or open a pdf in adobe reader, or even open adobe reader itself. It won't try to open, I just receive the error messages. I've uninstalled and reinstalled it two times now. I did this thing suggested online where you go into the control panel and look at all your plugins. Then, "repair" adobe reader - pretty sure it's just a button that says repair. that didn't do anything, of course I also could have done something wrong.
    I realize this could be a problem unrelated to Firefox, but I'm doing what I can before I take my laptop in.
    Please save me.

    Ok two things based on the crash report and the steps you took right before the crash:
    # Try to disable scrolling acceleration and restart Firefox. Does it continue to crash?
    # Try Safe Mode and do the same task as above with email and the pdf [[Troubleshoot Firefox issues using Safe Mode]]
    # Also pdf.js may be helpful to read pdfs in the meantime. You can change the default reader in the Preferences/Options > Application menu of Firefox.
    # Try to clear out the downloads folder and update flash to version 14 (that should do it)
    IF it crashes again please also provide the new crash signatures and we can take a look :-) Sorry for the crashing :-(

  • 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

  • I recently undated to Firefox 8. When I try to attach a file using yahoo mail I get a message that file cannot be sent. I don't have a problem on Explorer

    When I use firefox I cannot attach a file to my outgoing yahoo e-mail. I do not have this problem when I use Explorer. This seems to have started when I updated to Firefox 8.0

    Are you trying to open the online document, or are you downloading it to your local disk first.  What is the exact message you get?
    [topic moved to ExportPDF forum]

  • I can't attach a file in ISP's WebMail. Was no Problem before. It is OK in MS IE v8x

    I use my ISP's WebMail. I am now unable to attach any files to any eMails. It was OK up until about a month ago. I don't rember making any change about then that would of caused this.
    I can browse for it and select the file, but when I try to 'add it' to the list of files to attach, it does not add it and the file name that I browsed and selected is empty as it was before I selected it.
    I have no such problem in MicroSoft's InterNet Explorer v8x

    Is your ISP's site powered by Yahoo or one of the other popular sites that someone could test?

  • Problem for PCs recieving attached SWF files from Mac Mail 2.1.3

    Hi All,
    When I send this file from my mac mail 2.1.3 (753.1) with a SWF (flash animation) attachment the file wont open on the PC client mail. Instead when I force the unknown attachment to open it says the below with a string of letters.
    --Apple-Mail-37--496662089
    Content-Transfer-Encoding: base64
    Content-Type: application/applefile;
    name=daft3.swf
    Content-Disposition: attachment;
    filename=daft3.swf
    AAUWBwACAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAJAAAAMgAAAAoAAAADAAAAPAAAAAlTV0ZMU1dG
    MgBAZGFmdDMuc3dm
    --Apple-Mail-37--496662089
    Content-Transfer-Encoding: base64
    Content-Type: application/octet-stream;
    x-mac-type=5357464C;
    x-unix-mode=0744;
    x-mac-creator=53574632;
    name=daft3.swf
    Content-Disposition: attachment;
    filename=daft3.swf

    Try creating an archive of the SWF file (.zip) and email that instead. But the recipient needs to have an application on their PeeCee that will open SWF files; Outlook or Outlook Express will not do that.
    Mulder

  • PROBLEM IN ATTACHMENT OF ANY WORD FILE IN P.O ( T-CODE- ME22N)

    Dear cons
         I created a p.o . In this P.o I attached one word file . Then I released the p.o with the help of ME29N.After one week some body has deleted the attachment file & attached another file which was not a appropriate file. Without unreleasing how the system is allowing to change the attachment file.Is there any setting available so that it will not allow to change the attachment file.
    nrk

    Hi
    Do you hv DMS (Document Management System) module ?
    Vijay

  • Problem in attaching file

    Hi,
    I write the code for sending mail using javamail, it works fine for text message but when I attach any file the file content get inserted in mail and for images or pdf file not displayed proper, please help me out .
    Dnyanesh

    Hello Ashish,
    I used same code as u mentioned, but its not working correctly,
    I want to send mail to any email address through my progarm then how could use IMAP for receiving mail,
    I am attaching my code, please see if any correction, try to help me out if possible
    //**********************Code***********************************/
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import javax.activation.*;
    public class mail
         public static void main(String[] args)
              try
              Properties properties=new Properties();
              properties.setProperty("mail.transport.protocol", "smtp");
              properties.setProperty("mail.smtp.host","host");
              Session session = Session.getDefaultInstance(properties,null);
              Transport transport = session.getTransport();
              transport.connect();                                             
              Address address = new InternetAddress("");//receiver's address
              Message message = new MimeMessage(session);
              message.setFrom(new InternetAddress(""));// sender's address
              message.setRecipient(Message.RecipientType.TO, address);
              message.setSubject("Test Mail");
                   MimeMultipart multipart = new MimeMultipart("attachment");
                   MimeBodyPart messageBodyPart = new MimeBodyPart();
                   messageBodyPart.setText("Attachment here");
                   MimeBodyPart messageBodyPart1 = new MimeBodyPart();
                   FileDataSource source = new FileDataSource("filename");// attaching file
                   messageBodyPart1.setDataHandler(new DataHandler(source));
                   messageBodyPart.setFileName("Hello.txt");
                   messageBodyPart.setDisposition("attachment");
                   messageBodyPart.setHeader("Content-ID","Hello.txt");
                   multipart.addBodyPart(messageBodyPart);
                   multipart.addBodyPart(messageBodyPart1);
                   //put parts in message
                   message.setContent(multipart);
                   transport.sendMessage(message, message.getAllRecipients());
              transport.close();
              catch(Exception e)
                   System.out.println("Exception in file:"+e);
    }

Maybe you are looking for