Error in Text file while sending in email

Dear Friends,
I am sending data from Internal Table in Text file via email from ABAP program . But the data format is coming incoreect .
For E.g. if the data is 'morning' the text file is generating data as ' m o r n i n g '. It is placing blanks between two letters .
Please suggest me a solution .
The Function code is as follows
FORM send_file_as_email_attachment tables pit_message
                                          pit_attach
                                    using p_email
                                          p_mtitle
                                          p_format
                                          p_filename
                                          p_attdescription
                                          p_sender_address
                                          p_sender_addres_type
                                 changing p_error
                                          p_reciever.
DATA: ld_error    TYPE sy-subrc,
        ld_reciever TYPE sy-subrc,
        ld_mtitle LIKE sodocchgi1-obj_descr,
        ld_email LIKE  somlreci1-receiver,
        ld_format TYPE  so_obj_tp ,
        ld_attdescription TYPE  so_obj_nam ,
        ld_attfilename TYPE  so_obj_des ,
        ld_sender_address LIKE  soextreci1-receiver,
        ld_sender_address_type LIKE  soextreci1-adr_typ,
        ld_receiver LIKE  sy-subrc.
  ld_email   = p_email.
  ld_mtitle = p_mtitle.
  ld_format              = p_format.
  ld_attdescription      = p_attdescription.
  ld_attfilename         = p_filename.
  ld_sender_address      = p_sender_address.
  ld_sender_address_type = p_sender_addres_type.
Fill the document data.
  w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
  w_doc_data-obj_langu = sy-langu.
  w_doc_data-obj_name  = 'SAPRPT'.
  w_doc_data-obj_descr = ld_mtitle .
  w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
  CLEAR w_doc_data.
  READ TABLE it_attach INDEX w_cnt.
  w_doc_data-doc_size =
     ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
  w_doc_data-obj_langu  = sy-langu.
  w_doc_data-obj_name   = 'SAPRPT'.
  w_doc_data-obj_descr  = ld_mtitle.
  w_doc_data-sensitivty = 'F'.
  CLEAR t_attachment.
  REFRESH t_attachment.
  t_attachment[] = pit_attach[].
Describe the body of the message
  CLEAR t_packing_list.
  REFRESH t_packing_list.
  t_packing_list-transf_bin = space.
  t_packing_list-head_start = 1.
  t_packing_list-head_num = 0.
  t_packing_list-body_start = 1.
  DESCRIBE TABLE it_message LINES t_packing_list-body_num.
  t_packing_list-doc_type = 'RAW'.
  APPEND t_packing_list.
Create attachment notification
  t_packing_list-transf_bin = 'X'.
  t_packing_list-head_start = 1.
  t_packing_list-head_num   = 1.
  t_packing_list-body_start = 1.
  DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
  t_packing_list-doc_type   =  ld_format.
  t_packing_list-obj_descr  =  ld_attdescription.
  t_packing_list-obj_name   =  ld_attfilename.
  t_packing_list-doc_size   =  t_packing_list-body_num * 255.
  APPEND t_packing_list.
Add the recipients email address
  CLEAR t_receivers.
  REFRESH t_receivers.
  t_receivers-receiver = ld_email.
  t_receivers-rec_type = 'U'.
  t_receivers-com_type = 'INT'.
  t_receivers-notif_del = 'X'.
  t_receivers-notif_ndel = 'X'.
  APPEND t_receivers.
  CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
       EXPORTING
            document_data              = w_doc_data
            put_in_outbox              = 'X'
            sender_address             = ld_sender_address
            sender_address_type        = ld_sender_address_type
            commit_work                = 'X'
       IMPORTING
            sent_to_all                = w_sent_all
       TABLES
            packing_list               = t_packing_list
            contents_bin               = t_attachment
            contents_txt               = it_message
            receivers                  = t_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.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
Populate zerror return code
  ld_error = sy-subrc.
Populate zreceiver return code
  LOOP AT t_receivers.
    ld_receiver = t_receivers-retrn_code.
  ENDLOOP.
Regards
Nilesh

Hi,
Please check this links will help you.
Error in SOST transaction for Mail Triggered from SAP
Re: need help in implementing a note

Similar Messages

  • Zip a text file and send as email attachment

    Hi,
      I have a requirement to zip a text file and send it as an email attacment. I saw many posts with similar discussion on the forum but none gave me a very clear answer. Have anyone done this? If so please help.
    Regards,
    Hari.

    Hi Durairaj,
    I am working in ECC 6.0 and all ZIP classes are available in my system. I am converting the ABAP spool to PDF. My PDF is too long (57MB) that i need to convert it to ZIP  before i send it as a mail attachment. How do i do this?
    Thanks,
    RS

  • How to zip a text file and send as email attachment in SAP version 4.6c?

    Hi Guru,
    How to zip a text file in SAP version 4.6c which doesn't have class CL_ABAP_ZIP?
    Please help.
    Thanks & Regards,
    Ari

    Hi,
    Try this link
    [http://sap.ittoolbox.com/groups/technical-functional/sap-dev/sapr3dev-zip-file-from-sap-1707099?cv=expanded]
    Cheers,
    Surinder

  • How to set content type while sending an email?

    Hello,
    I want to set content type text/html while send an email using org.apache.commons.httpclient api. I am using MultipartPostMethod method. and i am set using object of multipartpostmethod like post.
    and post.setRequestHeader("Content-Type","text/html").
    but it wont work.
    so please give me a proper solution.
    example::
    MultipartPostMethod post = new MultipartPostMethod("url");
    post.addParameter("msgbody","html message");
    post.setRequestHeader("Content-Type","text/html");
    Regards,
    Bhavesh Kharwa

    Actually, I'm writing a "HashMap" from servlet to applet. I have used your suggested content type "application/octet-stream" and another "appication/x-java-serialized-object" to try it. But in applet side, when I use (HashMap)in.readObject(), it always gives me a exception as:"java.util.HashMap; IllegalAccessException". Why?
    Thankd.

  • While send/receive email, I have received an error message "Sending of password d"? However with same login details, I am able to login with other application.

    While send/receive email, I have received an error message "Sending of password d"?
    However with same login details, I am able to login with other application.
    I have changed password still the issue remains as it is.

    https://support.mozilla.org/en-US/kb/cannot-send-messages

  • Error while sending the email notifcation

    Hi All
    I am getting this error while sending the email notifcation.If any one of you have any idea regarding this please suggest
    [2012-09-12T03:55:41.288-10:00] [soa_server1] [ERROR] [SDP-26102] [oracle.sdp.messaging.driver.email] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: OracleSystemUser] [ecid: f5c1f5acbf0bb7a6:22e05768:139ba096e4d:-8000-00000000000006ef,0] [APP: usermessagingdriver-email] Error while writing e-mail message content.[[
    java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
         at java.util.Vector.elementAt(Vector.java:427)
         at javax.mail.Multipart.getBodyPart(Multipart.java:157)
         at javax.mail.internet.MimeMultipart.getBodyPart(MimeMultipart.java:256)
         at oracle.sdpinternal.messaging.driver.email.EmailDriver.getHeaderEncoding(EmailDriver.java:1079)
         at oracle.sdpinternal.messaging.driver.email.EmailDriver.send(EmailDriver.java:670)
         at oracle.sdpinternal.messaging.driver.email.EmailManagedConnection.send(EmailManagedConnection.java:50)
         at oracle.sdpinternal.messaging.driver.DriverConnectionImpl.send(DriverConnectionImpl.java:41)
         at oracle.sdpinternal.messaging.dispatcher.DriverDispatcherBean.onMessage(DriverDispatcherBean.java:296)
         at sun.reflect.GeneratedMethodAccessor2553.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy346.onMessage(Unknown Source)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:574)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:477)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:379)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4659)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:4345)
         at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3821)
         at weblogic.jms.client.JMSSession.access$000(JMSSession.java:115)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5170)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    [2012-09-12T03:55:41.331-10:00] [soa_server1] [WARNING] [SDP-25107] [oracle.sdp.messaging.engine.store] [tid: [ACTIVE].ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: OracleSystemUser] [ecid: f5c1f5acbf0bb7a6:22e05768:139ba096e4d:-8000-00000000000006ef,0] [APP: usermessagingserver] Message ID bac38bd50a1f32a129c5c739335a7855 in Status object does not match previously recorded Message ID b7e259a30a1f32a12c981a3ffd343f6d.
    [2012-09-12T03:55:41.362-10:00] [soa_server1] [ERROR] [] [oracle.soa.services.notification] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@3066bad4] [userId: <anonymous>] [ecid: 0000Jau4qHj9Lex_w9w0yW1GK6Rn000003,1:32530] [APP: soa-infra] <.> Error status received from UMS.[[
    Status detail :
         Status type : DELIVERY_TO_GATEWAY:FAILURE,
         Status Content : Failed to set message headers: java.lang.ArrayIndexOutOfBoundsException: 0 >= 0,
         Addressed to : EMAIL:[email protected],
         UMS Driver : Farm_base_domain/base_domain/soa_server1/usermessagingdriver-email:oracle_sdpmessagingdriver_email#Email-Driver,
         UMS Message Id : b7e259a30a1f32a12c981a3ffd343f6d,
         Gateway message Id : ,
         Status Received at : Wed Sep 12 03:55:41 HST 2012.
    Check status details and fix the underlying reason, which caused error.
    [2012-09-12T03:55:51.492-10:00] [soa_server1] [WARNING] [] [oracle.soa.services.notification] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@3066bad4] [userId: <anonymous>] [ecid: 0000Jau4qHj9Lex_w9w0yW1GK6Rn000003,1:32530] [APP: soa-infra] <.> Could not find notification record corresponding to failed notification : (Channel message id) : b7e259a30a1f32a12c981a3ffd343f6d[[
    Hence it will not be retried.
    Possible cause could be purging of notification data after sending out notification, but before receiving status.
    ]]

    Are you using your email address to send the email notifications if it Is not configured with AD? Have you populated the mail attribute in weblogic console-->realms-->my realms-->users
    In addition are you sure you have configured the 'Email Driver Properties' correctly in EM ?? have you specified the Notification Mode to Email ?
    Please make sure that the outgoing mail server and port along with the username and password are correct.
    Also validate the workflow settings in your EM?
    In addition, please validate that when you logon to BPM worklist using the admin account and click on the name for e.g. weblogic, you see the email attribute populated properly.
    Thanks
    ACM

  • TS3899 I am unable to attach any files while sending mail

    Please tell me how to attach any word or pic or audio file while sending a mail using MAIL in my iphone 4.

    Step 1
    Remove "MacKeeper" as follows. First, back up all data.
    "MacKeeper" has only one useful feature: it deletes itself.
    Note: These instructions apply to the version of the product that I downloaded and tested in early 2012. I can't be sure that they apply to other versions.
    IMPORTANT: "MacKeeper" has what the developer calls an “encryption” feature. In my tests, I didn't try to verify what this feature really does. If you used it to “encrypt” any of your files, “decrypt” them before you uninstall, or (preferably) restore the files from backups made before they were “encrypted.” As the developer is not trustworthy, you should assume that the "decrypted" files are corrupt unless proven otherwise.
    In the Finder, select
    Go ▹ Applications
    from the menu bar, or press the key combination shift-command-A. The "MacKeeper" application is in the folder that opens. Quit it if it's running, then drag it to the Trash. You'll be prompted for your login password. Click the Uninstall MacKeeper button in the dialog that appears. All the functional components of the software will be deleted. Reboot.
    ☞ Quit MacKeeper before dragging it to the Trash.
    ☞ Don't empty the Trash. Let MacKeeper delete itself.
    ☞ Don't try to drag the MacKeeper Dock icon to the Trash.
    Step 2
    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Privacy ▹ Remove All Website Data
    and confirm. Test.

  • Error code text file or Error ring, pros and cons of each

    I'm looking for some community input on the pros and cons of using either the Error Code Text file, or the Error Ring for creating custom errors in an application.  My question comes about as a result of this post.
    I've used the Error Rings exclusively in the past to avoid the extra maintenance steps of bringing the text file along with the LV project and source control.  I assumed the error information was simply converted to ring constant.  But with my linked post above, I'm wondering how deep my mistakes may cut me.
    Please weight in on this with pros/cons, , and any past experiences that may be helpful.

    Actually Hooovahh and Jeff are right. As you can see in that way you can prioritize the error that you need to read or in other case ignore. In the same time you can create the error that you want.
    In this link in the last interaction they upload some pictures where you can see the way for make.
    http://forums.ni.com/t5/LabVIEW/Error-Ring-changing-code-number/td-p/3152761/page/2

  • Detect "end of file" while send n numbers files over a socket?

    Hi!
    I�m trying to find a way to detect "end of file" while send n numbers files over a socket.
    What i'm looking for is how to detect on the client side when the file i�m sending is downloaded.
    Here is the example i�m working on.
    Client side.
    import java.io.*;
    import java.net.*;
    public class fileTransfer {
        private InputStream fromServer;
        public fileTransfer(String fileName) throws FileNotFoundException, IOException {
            Socket socket = new Socket("localhost", 2006);
            fromServer = socket.getInputStream();
            for(int i=0; i<10; i++)
                receive(new File(i+fileName));
        private void receive(File uploadedFile) throws FileNotFoundException, IOException {
            uploadedFile.createNewFile();
            FileOutputStream toFile = new FileOutputStream(uploadedFile);
            byte[] buffer = new byte[4096];
            int bytesRead = 0;
            while ((bytesRead = fromServer.read(buffer)) != -1) {
                toFile.write(buffer, 0, bytesRead);
        public static void main(String[] args) {
            try {
                new fileTransfer("testa.jpg");
            } catch (Exception ex) {ex.printStackTrace();}
    }Server side.
    import java.io.*;
    import java.net.*;
    public class fileTransferSend {
        Socket serv = null;
        OutputStream toClient;
        public fileTransferSend(String fileName) throws FileNotFoundException, IOException {
            StartServer();       
            for(int i =0; i<10; i++)
                send(new File(fileName));
        public void StartServer() throws IOException {
            ServerSocket ssocket = new ServerSocket(2006);
            System.out.println("Waiting for incomming");
            serv = ssocket.accept();
            System.out.println("incomming");
            toClient = serv.getOutputStream();
        private void send(File f) throws FileNotFoundException, IOException {
            if(f.exists() && f.canRead()) {
                FileInputStream fromFile = new FileInputStream(f);
                try {
                    byte[] buffer = new byte[4096]; // 4K
                    int bytesRead = 0;
                    System.out.println("sending: "+f.getName());
                    while ((bytesRead = fromFile.read(buffer)) != -1) {
                        toClient.flush();
                        toClient.write(buffer, 0, bytesRead);
                finally {
                    //toClient.close();
                    fromFile.close();
            } else {
                System.out.println("no files");
        public static void main(String[] args) {
            try {
                new fileTransferSend("test.jpg");
            }catch(Exception e) {e.printStackTrace();}
    I know that the client never reads -1 becuase i doesn�t close the stream.
    Is there anyway to tell the client that the file is downloaded?

    A common (and easy) TCP/IP protocol is to send length, followed by data.
    Because TCP/IP is a stream-oriented protocol, a receiver can never absolutely determine where the first packet ends and the second packet begins. So it is common to send the length of the packet, followed by the packet itself.
    In your case, you could send length of file, followed by file data. It should be fairly easy to obtain file length and send that as a 32-bit (or 64-bit value). Here is an idea (not code) for the receiver:
    receive (4) // where 4 = number bytes to receive
    unsigned length = convert 4 bytes to unsigned integer
    while (length != 0)
    n = receive ( length ) // where n = number bytes actually received, and length = number bytes desired
    Or, you can use the concept of an "Escape" character in the stream. Arbitrarily choose an ESCAPE character of 0x1B (although it could be any 8-bit value). When the receiver detects an ESCAPE char, the next character can be either control or data. So for end of file you might send 0x1B 0x00. If the byte to be sent is 0x1B, then send 0x1B 0x1B. The receiver would look something like this:
    b = read one byte from stream
    if (b == 0x1B)
    b = read one byte from stream
    if (b == 0x00) then end of file
    else place b in buffer
    else
    place b in buffer
    Later.

  • Errors appeared in alert log file should send an email

    Hi,
    I have one requirement to do, as i am new dba, i dont know how to do this,
    sendmail is configured on my unix machine, but dont know how to send the errors appeared in alert logfile should send an email to administrator.
    daily, it has to check the errors in alert log file, if any errors occurs(ORA- errors or WARNING errors) should send an email to administrator.
    please help me how to do it

    Hi,
    There are many methods for interrogating the alert log and sending e-mail. Here are my notes:
    http://www.dba-oracle.com/t_alert_log_monitoring_errors.htm
    - PL/SQL or Java with e-mail alert: http://www.dba-village.com/village/dvp_papers.PaperDetails?PaperIdA=2383
    - Shell script - Database independent and on same level as alert log file and e-mail.
    - OEM - Too inflexible for complex alert log analysis rules
    - SQL against the alert log - You can define the alert log file as an external table and detect messages with SQL and then e-mail.
    Because the alert log is a server side flat file and because e-mail is also at the OS-level, I like to use a server side scell script. It's also far more robust then OEM, especially when combining and evaluating multiple alert log events. Jon Emmons has great notes on this:
    http://www.lifeaftercoffee.com/2007/12/04/when-to-use-shell-scripts/
    If you are on Windows, see here:
    http://www.dba-oracle.com/t_windows_alert_log_script.htm
    For UNIX, Linux, Jon Emmons has a great alert log e-mail script.
    Hope this helps . . . .
    Donald K. Burleson
    Oracle Press author

  • Error while sending PO email as PO is in smartform

    As my PO is in smartform so when I am sendin the email of PO using SAP standard Program  'SAPFM06P', FORM routine ENTRY_NEU'  the processing routines,system is giving the error to open PO form.
    So is there any way to send the email of smartform.
    Thanks in advance

    Hi
    I think some basis related configuartions to be done
    Try like this and inform me
    A cyclic job runs, which processes the messages seen in the SOST queue.
    Are you sure it's not the frequency of the cyclic job, rather than the
    number of messages in the queue, that you are observing? In messages
    that are queued and before the cyclic job runs, "wait for comm. service"
    is the normal status.
    If you mean that there are always 4 items queued in SOST regardless of
    the cyclic send job, then I have no ideas. I would have thought there
    was no way to do that.
    when the send job runs it just never
    picks them up & sends them, while it picks up many others. The send job
    is somehow blind to these; no error message occurs. In this case, I
    'delete' them from the queue (in SOST) and then 'undelete' (drop down
    menu -> /Go to /Deleted Items) them and then re-queue them. THEN they
    actually get picked up & sent when the next cyclic send job executes.
    Regards
    Pavan

  • FTP File need in BIN format not in TEXT to be send in email as attachment

    Dear All,
    <H3>Currrent Working Scenrio:- Program uploading from the desktop (zip file) in bin and attaching and sendng through mail. Its working fine. Below is the code to upload file from desktop</H3>
    data: DATA_TAB TYPE STANDARD TABLE OF T_XLINE,
             name(80) type c value 'c:\abc\desktop\abc.zip'.
    CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
        EXPORTING
          FILENAME   = NAME
          FILETYPE   = 'BIN'
        IMPORTING
          FILELENGTH = SIZE
        CHANGING
          DATA_TAB   = DATA_TAB.
    <h3>Now Current Requirement is to upload file from ftp and send mail as an attachment.</h3>
    Instead of using CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
    <h5>Now i am connecting to FTP and taking file from ftp server and downloading it in form of text. But i need file in BIN format to be send as an attachment with this mail. So i converted text file taken from ftp  to bin by using 'SCMS_TEXT_TO_BINARY'.</h5>
    It is sending the folder name but not the files in the zip folder in ftp. Only 1kb file is sent.
    Used to Take file from FTP to server
    CALL FUNCTION 'FTP_SERVER_TO_R3'
      EXPORTING
        HANDLE               = W_HDL
        FNAME                = WRK_FILE
      CHARACTER_MODE       =
    IMPORTING
      BLOB_LENGTH          =
    TABLES
      BLOB                 =
        TEXT                 = IT_DOWNLOAD
    EXCEPTIONS
       TCPIP_ERROR          = 1
       COMMAND_ERROR        = 2
       DATA_ERROR           = 3
       OTHERS               = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Used to convert text to bin
    CALL FUNCTION 'SCMS_TEXT_TO_BINARY'
    EXPORTING
      FIRST_LINE            = 0
      LAST_LINE             = 0
      APPEND_TO_TABLE       = ' '
      MIMETYPE              = ' '
      ENCODING              =
    IMPORTING
      OUTPUT_LENGTH         =
      TABLES
        TEXT_TAB              = it_download
        BINARY_TAB            = data_tab
    EXCEPTIONS
      FAILED                = 1
      OTHERS                = 2
    Edited by: Ravi Grover on Apr 7, 2011 12:04 PM

    Hi!
    Check sample programs:
    RSFTP002
    RSFTP003
    There is a Function Module called: FTP_COMMAND. In this FM you should send the command "bin".
    Hope it helps.
    Esteban

  • Error 829 in SOST tcode while sending an email attachment ??

    Hi..
    I am using the function module "SO_NEW_DOCUMENT_ATT_SEND_API1" to send an email attachment.
    The program is getting executed successfully but when i see in SOST transaction, i am getting an error message.
    Error number is 829 and it says " Internal error: SO_OBJECT_MIME_GET Exception: 2 "...
    How do i resolve this error   ....??

    Hi,
    Please check this links will help you.
    Error in SOST transaction for Mail Triggered from SAP
    Re: need help in implementing a note

  • Leading Spaces in CSV file while sending Email

    Hi All,
    Iam sending CSV file via email, Iam getting leading space for the first field from column second.
    I have used the below code for appending internal table.
    Concatenating all the fileds with comma separator and aded 'cl_abap_char_utilities=>newline' at the last.
    For first column iam getting correctly, form second column onwards iam getting spaces in front of first field. I have used the FM, SO_NEW_DOCUMENT_ATT_SEND_API1 for sending the email. Please suggest. thanks.

    Hi,
    Concatenate cl_abap_char_utilities=>cr_lf before every line/record of the file.
    This should resolve the issue.
    Thanks,
    Anupam

  • Error importing text file into SQL Server when last column is null

    Hello all. Happy holidays!
    I'm trying to import a text file into a SQL Server table, and I get the error below when it gets to a row (row 264) that has null in the last column. I'm guessing the null jumbles up the delimiters somehow. The nulls are not errors, and I need to import
    them into the table with the rest of the rows. Any idea how I can do that?
    Thanks!
    [Flat File Source [1]] Error: Data conversion failed. The data conversion for column "XYZ" returned status value 2 and status text "The value could not be converted because of a potential loss of data.".
    [Flat File Source [1]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "output column "XYZ" (178)" failed because error code 0xC0209084 occurred, and the error row disposition on "output column "XYZ"
    (178)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.
    [Flat File Source [1]] Error: An error occurred while processing file "ABC.txt" on data row 264.
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Flat File Source" (1) returned error code 0xC0202092.  The component returned a failure code when the pipeline engine called PrimeOutput().
    The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
    WeeLass

    Hi WeeLass,
    The error that” Data conversion failed. The data conversion for column "XYZ" returned status value 2 and status text "The value could not be converted because of a potential loss of data.".” is generally error message, and the error indicates
    that there is data type mismatch issue between the input columns and the output columns.
    Based on your description, the issue is that you trying to convert a column contains empty value from string to integer data type for the output column "XYZ" in Flat File Source [1]. Please note that we cannot type an empty value as integer data
    type column value, so the error occurs.
    To fix this issue, just as you did, we should convert the data type for the output column "XYZ" in Flat File Source [1] back to DT_WSTR or DT_STR, then use a derived column task to replace the current column (UBPKE542). But the expression should
    be like below:
    LEN(TRIM(UBPKE542)) > 0 ? (DT_I8)UBPKE542 : NULL(DT_I8)
    In this way, the data type of the column in SQL table would be int, and the empty value would be replaced with NULL.
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for

  • Overwrite data of master data infoobject

    Hi all, We have one master data infoobject ZASRYHMA. This infoobject does not have any attrbiutes but it has two compounding fields ZSITE and 0DISTR_CHAN. Now customer has a requirement in which value of ZASRYHMA can change for a particular site and

  • Itunes does not recognize both iphone 4s and iPad 2.

    It stated having an invalid from both iPad2 and Iphone 4s. Did everything from the troubleshooting guide but still does not work. Weirdest thing is that other computer's itunes is able to detect my devices. Diagnostic report Microsoft Windows 7 x64 H

  • Why is there the error "The requested protocol does not exist comm:0" ?

    Hi all, I want to read data from a USB serial port of the mobile phone ( Alcatel OT-806D ). The cable connects the phone and the computer. The system running in the PC is Windows XP. I launch a java j2se program which writes a number to the usb seria

  • Monitor Stand for Macbook Pro

    I have a 17" macbook and bought a Kantek monitor stand who claim to handle "today's wide laptops" (must have done more research!) This does not fit, anyone know of monitor stand that is wide enough to hold macbook book 17" laptop in the storage area

  • Problem in RSPO_RETURN_ABAP_SPOOLJOB_RAW

    Hi Friends, I have a problem. I am running reports which has output line more than 255 characters. Firstly I have tried to use RSPO_RETURN_ABAP_SPOOLJOB fm. But I see that I can not get the characters that has index more than 255. So, I wanted to use