Attached txt file is displayed with sapoffice intead of notepad

Hi,
i´ve developed a bsp page that uploads files using fm SO_DOCUMENT_INSERT_API1.
When i try to display a txt file uploaded as above explained (with transaction FB03) the document is displayed with sapoffice and not with notepad as i expected.
Why is this hapenning?
What do i have to do so that a txt file is opened with notepad?
i´m able to upload a pdf and display it afterwards in fb03  with acrobat reader.
i´m able to upload a doc and display it afterwards in fb03  with msword.
but with a txt file it does not work.
Best regards.
Edited by: Pablo Casamayor on Nov 19, 2011 12:02 PM

You should be doing something like this to open a text file in Notepad:
Message Edited by smercurio_fc on 09-12-2007 01:07 PM
Attachments:
Example_BD.png ‏2 KB

Similar Messages

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • How to get Text from (.txt) file to display in the JTextArea ?

    How to get Text from (.txt) file to display in the JTextArea ?
    is there any code please tell me i am begginer and trying to get data from a text file to display in the JTextArea /... please help...

    public static void readText() {
      try {
        File testFile = new File(WorkingDirectory + "ctrlFile.txt");
        if (testFile.exists()){
          BufferedReader br = new BufferedReader(new FileReader("ctrlFile.txt"));
          String s = br.readLine();
          while (s != null)  {
            System.out.println(s);
            s = br.readLine();
          br.close();
      catch (IOException ex){ex.printStackTrace();}
    }rykk

  • Read numbers from a .txt file and display them in a graph

    How can I get Labview 7 to read from a txt. file containing a lot of
    coloumns with different datas? There`s only two of the coloumns that are
    interesting to me, the first, that contains the time of the measuring, and
    one in the middle, that contains the measured temperatures. I want Labview
    to read this datas and display them graphicly.
    Thanks from Stale

    Here's one way.
    You can also use the help-> find examples and search for "text".
    2006 Ultimate LabVIEW G-eek.
    Attachments:
    Graph.vi ‏21 KB

  • Attaching xlsx files to email with CL_BCS and CL_DOCUMENT_BCS

    Hi
    I have made a program that can send an email with attachments from GOS (documents attached to sales orders and invoices). This program works almost perfect. It seems my program can attach any 3 letter file types like DOC, PDF, JPG, AVI, EXE, XLS, but not filetypes with more than 3 letters like XLSX.
    I creeate a document with CL_DOCUMENT_BCS->CREATE_DOCUMENT
    I attache the files with CL_DOCUMENT_BCS->add_attachment
    and finally i send the email with CL_BCS methodts.
    The problem is CL_DOCUMENT_BCS->add_attachment paramter I_ATTACHMENT_TYPE of type SOODK-OBJTP - this data type is only 3 chars.
    How can I attach XLSX files whit these methods?
    Best regards

    Hi Thomson,
    Thats true ABAP email API does not support 4 chars file types.
    Since Office 2007 is released on the market the new extensions (docx, xlsx,...) lead to several questions in the SAP DMS area. So it might happen that Office 2007 applications raise some warning messages because the local copy of an original has only the 'old' extension xls or doc. Even if they were created with Office 2007 and new file formats.
    Reason:
    Please note that SAP Document Management generally support the file format of Office 2007. But due to the fact that this change in file format is a very new one and the latest SAP Releases ERP2004 and ERP2005 were released some time before, the customizing field 'Suffix' could not be enlarged to four digits. So it is only possible to maintain suffix values like 'doc' or 'xls' and therefore the 'old' extensions were used if you display or edit an original. For further information please take a look at the SAP note 1147660, which was created by the Office Integration colleagues.
    Possible Solution:
    What can be offered to you is a possible workaround, which was sent for this behavior to achieve that the local copied files have a extension like .xlsx or .docx. For this workaround the following steps are necessary:
    1. We have to create new workstation applications for the new file extensions with the mime-types of the new office applications (XLX, WRX and PPX).
    2. We have to customize them with %AUTO% %NO-LEAVE% instead of %SAP-OFFICE-INTEGRATION.OUTPLACE% %MAXSIZE%
    3. We have to use a BADI on BEFORE_CHECKOUT event to determine if workstation application is one of the XLX or WRX or PPX. If it is, we have to set the target temporary file extension to the corresponding 4 characters of the new extensions. This means that we can display "USER01.xlsx", in the user local PC, as a real office 2007 file.
    However please note that this is just a possible solution and means to be a modification to the standard system.
    Generally, it is recommended to maintain the following settings for working with Office 2007 and the new formats.
    u2022 In transaction DC30, maintain the new file extensions (e.g. *.docx) or . as a general file format entry. This will avoid that you cannot add originals with the new file format to your document info records. This is very important if you have implemented SAP notes 948177 and 967839 which bring a tighter file format check into your system.
    u2022 Further, test the behavior if you set the 'Do not rename temporary files' flag in transaction DC30. This will lead to the behavior that the file name is not changed if you check out or display the original file. Maybe this could also help to avoid that the original file-name is changed or corrupted.
    Also, please refer to blog by Ander Fischer; [https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/12030]
    Hope it helps you.
    Thanks
    Arbind Prasad

  • How to write csv or txt file through utl_file with UTF-8 Encoding

    Hi All,
    I need your help to write the data from DB to csv or txt file with UTF-8 encoding through utl_file.
    Database character set:AL32UTF8
    Database version:10G
    All the columns in the DB are of varchar2 type.
    Please let me know if there is any way of doing it.

    What was wrong with the info provided in the link(s) given?
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions027.htm#SQLRF00620]

  • Convert Script output data to Text(.txt) file & send mail with attachment.

    Hi All,
    Requirement: I shulb be able to conver th Script output data to Text(.text) file & send a maill with attachment with this text file. Formant of text file should be like output of Print priview.
    Plese sugget with Function modules to cover as Text file.
    I am able to converting the Script output data to PDF and sending mail with attachment. So I don't want PDF file now.
    Thanks in advance.

    Hi, Thanks for responst.
    We can convert the Scirpt output to PDF file by using OTF function module and the PDF file looks like Print Privew output.
    Same like this I want Script out in NOTEPAD (.txt). Is that possible, Plz sugget with relavent Function Modules.
    Thanks.

  • Attach DMS file to EQ with the lastest version

    Hi,
    We are implementing DMS,
    Q1, when I create document 'TEST1' using CV01N with initial version 00, then I attached this document to an EQ. then I update the document TEST1 and save as a new version 01. since the EQ has the attachment of  TEST1 version 00, now if the user view the doc, they will see the old version 00 not 01.
    My question is ... is there a way to always show the lastest version of the doc. without have to go and make the adjustment in EQ master ?
    Q2, do you know if there's any documentation or book that I can read up on how the DMS works ? I took DMS class about 3 yrs ago and forgot most of the information
    Q3, I'm also looking to use EDMS as I think it's user friendly for our users. I have downloaded EDMS to my laptop and in the process of testing it. Do you know if there's any documentation of have it works ?
    Thank you,
    Sam (SDG&E)

    Hi Sam,
    regarding your questions I can provide you the following input and hope that it could be useful:
    1. Display of latest version
    In case that you are creating a new version you have to made sure that the link to the EQ is taken over to version 01. This can be maintained in the customizing of transaction DC10 for each document type under 'Define object links'. Here you can see and select the EQUI object. In its detail view you will find the field 'when new version'. Here you can define if the links are copied automaticall or after user confirmation or never to the new version 01.
    If the link is handed over to the new version then I would recommend you to set the value '1' in field 'Document version' in the same customizing screen in DC10 as before. This value will grant that from object side always the current versions are displayed first. This means if there is version 00 and version 01 then the latest version '01' only will be displayed in the links.
    For further information on the logic of current and all version display please see the following link too:
    http://wiki.sdn.sap.com/wiki/display/PLM/Logicforcurrentandall+version
    For further control of the link display on object side you can only use BADI DOCUMENT_OBJ1.
    2. Documentation on DMS
    Generally you will find all necessary information on DMS behavior in the SAP online documentation under http://help.sap.com under area 'Cross-Application-Components'.
    Regarding a book I can offer you the SAP press book for PLM. Because DMS is part of the PLM module and in this book you will find also chapters about the DMS functionalities.
    3. EasyDMS documentation
    As you have installed EasyDMS on your laptop you should be able to find the documentation or help files under the installation directory of EasyDMS.
    Best regards,
    Christoph

  • Attach  txt file

    begin
    Gen_Ces_Mail.email_files('[email protected]' -- van adres
    , '[email protected]' -- naar adres
    , 'test mail' -- onderwerp
    , 'message: test message' -- bericht
    , cesFiles('/usr/lib/oracle/xe/app/oracle/admin/XE/dpdump/test.txt)
    end;
    Can anybody help me with this?
    Error:
    Error starting at line 1 in command:
    begin
    Gen_Ces_Mail.email_files('[email protected]' -- van adres
    , '[email protected]' -- naar adres
    , 'test mail' -- onderwerp
    , 'message: test message' -- bericht
    , cesFiles('/usr/lib/oracle/xe/app/oracle/admin/XE/dpdump/test.txt)
    end;
    Error report:
    ORA-06550: line 6, column 46:
    PLS-00103: Encountered the symbol "/usr/lib/oracle/xe/app/oracle/admin/XE/dpdump/test.txt)
    " when expecting one of the following:
    ( ) - + case mod new not null others select <an identifier>
    <a double-quoted delimited-identifier> <a bind variable>
    table avg count current exists max min prior sql stddev sum
    variance execute multiset the both leading trailing forall
    merge year month DAY_ hour minute second timezone_hour
    timezone_minute timezone_region timezone_abbr time timestamp
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    regards,
    Kasban.E

    create or replace PACKAGE GEN_CES_MAIL AS
    PROCEDURE email_files(from_name VARCHAR2,
    to_names VARCHAR2,
    subject VARCHAR2,
    message VARCHAR2 DEFAULT '',
    html_message VARCHAR2 DEFAULT '',
    cc_names VARCHAR2 DEFAULT NULL,
    bcc_names VARCHAR2 DEFAULT NULL,
    attach cesFiles,
    clob_attach cesCLOBs DEFAULT NULL,
    blob_attach cesBLOBs DEFAULT NULL);
    PROCEDURE email_files(from_name VARCHAR2,
    to_names VARCHAR2,
    subject VARCHAR2,
    message CLOB,
    html_message VARCHAR2 DEFAULT '',
    cc_names VARCHAR2 DEFAULT NULL,
    bcc_names VARCHAR2 DEFAULT NULL,
    attach cesFiles,
    clob_attach cesCLOBs DEFAULT NULL,
    blob_attach cesBLOBs DEFAULT NULL);
    PROCEDURE email_files(from_name VARCHAR2,
    to_names VARCHAR2,
    subject VARCHAR2,
    message VARCHAR2 DEFAULT '',
    html_message CLOB,
    cc_names VARCHAR2 DEFAULT NULL,
    bcc_names VARCHAR2 DEFAULT NULL,
    attach cesFiles,
    clob_attach cesCLOBs DEFAULT NULL,
    blob_attach cesBLOBs DEFAULT NULL);
    PROCEDURE email_files(from_name VARCHAR2,
    to_names VARCHAR2,
    subject VARCHAR2,
    message CLOB,
    html_message CLOB,
    cc_names VARCHAR2 DEFAULT NULL,
    bcc_names VARCHAR2 DEFAULT NULL,
    attach cesFiles,
    clob_attach cesCLOBs DEFAULT NULL,
    blob_attach cesBLOBs DEFAULT NULL);
    PROCEDURE email_files(from_name VARCHAR2,
    to_names VARCHAR2,
    subject VARCHAR2,
    message VARCHAR2 DEFAULT '',
    html_message VARCHAR2 DEFAULT '',
    cc_names VARCHAR2 DEFAULT NULL,
    bcc_names VARCHAR2 DEFAULT NULL,
    attach cesCLOBs);
    PROCEDURE email_files(from_name VARCHAR2,
    to_names VARCHAR2,
    subject VARCHAR2,
    message CLOB,
    html_message VARCHAR2 DEFAULT '',
    cc_names VARCHAR2 DEFAULT NULL,
    bcc_names VARCHAR2 DEFAULT NULL,
    attach cesCLOBs);
    PROCEDURE email_files(from_name VARCHAR2,
    to_names VARCHAR2,
    subject VARCHAR2,
    message VARCHAR2 DEFAULT '',
    html_message CLOB,
    cc_names VARCHAR2 DEFAULT NULL,
    bcc_names VARCHAR2 DEFAULT NULL,
    attach cesCLOBs);
    PROCEDURE email_files(from_name VARCHAR2,
    to_names VARCHAR2,
    subject VARCHAR2,
    message CLOB,
    html_message CLOB,
    cc_names VARCHAR2 DEFAULT NULL,
    bcc_names VARCHAR2 DEFAULT NULL,
    attach cesCLOBs);
    PROCEDURE email_files(from_name VARCHAR2,
    to_names VARCHAR2,
    subject VARCHAR2,
    message VARCHAR2 DEFAULT '',
    html_message VARCHAR2 DEFAULT '',
    cc_names VARCHAR2 DEFAULT NULL,
    bcc_names VARCHAR2 DEFAULT NULL,
    attach cesBLOBs);
    PROCEDURE email_files(from_name VARCHAR2,
    to_names VARCHAR2,
    subject VARCHAR2,
    message CLOB,
    html_message VARCHAR2 DEFAULT '',
    cc_names VARCHAR2 DEFAULT NULL,
    bcc_names VARCHAR2 DEFAULT NULL,
    attach cesBLOBs);
    PROCEDURE email_files(from_name VARCHAR2,
    to_names VARCHAR2,
    subject VARCHAR2,
    message VARCHAR2 DEFAULT '',
    html_message CLOB,
    cc_names VARCHAR2 DEFAULT NULL,
    bcc_names VARCHAR2 DEFAULT NULL,
    attach cesBLOBs);
    PROCEDURE email_files(from_name VARCHAR2,
    to_names VARCHAR2,
    subject VARCHAR2,
    message CLOB,
    html_message CLOB,
    cc_names VARCHAR2 DEFAULT NULL,
    bcc_names VARCHAR2 DEFAULT NULL,
    attach cesBLOBs);
    PROCEDURE email_files(from_name VARCHAR2,
    to_names VARCHAR2,
    subject VARCHAR2,
    message VARCHAR2 DEFAULT '',
    html_message VARCHAR2 DEFAULT '',
    cc_names VARCHAR2 DEFAULT NULL,
    bcc_names VARCHAR2 DEFAULT NULL,
    filename1 VARCHAR2 DEFAULT NULL,
    filetype1 VARCHAR2 DEFAULT 'text/plain',
    filename2 VARCHAR2 DEFAULT NULL,
    filetype2 VARCHAR2 DEFAULT 'text/plain',
    filename3 VARCHAR2 DEFAULT NULL,
    filetype3 VARCHAR2 DEFAULT 'text/plain');
    END GEN_CES_MAIL;

  • Word files are displayed with junk

    Hello,
    I am running Weblogic 6.1 SP2. It shows the word files with junk in it. How can I
    fix this problem?
    Thanks,
    Meghana

    It is probably not a problem with the WebLogic server itself; I've done Word
    files etc. from WL without an issue. Are you doing via FileServlet, your own
    JSP, etc. Does it work from Apache? If so, use telnet to compare headers.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Michael Smith" <[email protected]> wrote in message
    news:[email protected]...
    >
    This problem still occurs on WLS 7.0 as well.
    "Cameron Purdy" <[email protected]> wrote:
    Use telnet to do a GET to WL and compare the results to a GET from
    another
    server. There's gotta be a dif in the header that confuses IE (not hard
    to
    do ....)
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Eddie Sheffield" <[email protected]> wrote in message
    news:[email protected]...
    Cameron Purdy wrote:
    I am running Weblogic 6.1 SP2. It shows the word files with junk
    in
    it. How can I fix this problem?What Word files? How are you accessing them? Via a Servlet? JSP?
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for WeblogicSince I'm having the same problem I'd like to hear a solution as well.I
    just have a simple link to a Word document that lives on the server.No
    fancy processing or dynamic generation of the document or anything.
    There is a mime mapping defined in the web application deployment
    descriptor (viewed with the console tool) for "application/msword"with
    a file extension of "doc" It works fine from Mozilla - click the link
    and it asks if I want to save or open. But in IE 6 it just immediately
    displays the file contents in the browser as if it were plain text,so
    it comes out as junk. Using the same browser and clicking links toword
    docs on other web servers works fine - I get the save/open dialog and
    clicking open pops up Word as expected.
    Thanks for any ideas!
    Eddie Sheffield
    Senior Java Developer
    G3 Systems, Inc.
    P:540.951.4300
    F:540.951.4311
    http://www.g3.com

  • IOS 4.2 email attachment word file not displaying the full document

    I have just downloaded iOS 4.2 and have noticed that an issue that bugged me on the iPad has now made it's way to my iPhone.
    Every day I receive an email with an A4 size word file attached, that contains a full page table. When I viewed the attachment on my iPad (running iOS 3.2) the last column of the table would be cut off. If I viewed the same file on my iPhone (running iOS 4 or earlier), I could see the whole document.
    The issue didn't annoy me when it was only on the iPad as it was more important for me to view the file on the iPhone, but now the issue has crossed over to the iPhone with the update to 4.2, the last column of the table in the document is being cut off. Changing the layout of the file is not an option.
    Any ideas?

    I am having the same issue, getting the message "Presentation can't be opened." since updating ipad and keynote to latest version.
    Have apple commented on this yet?

  • Help File not displaying with in SAP

    Hi
    Im trying to get the help file to work in SAP.
    i Have looked at where SAP is fetching the file and i have placed it there.
    But when i go into SAP and press F1 i get an error message ...
    "Navigation to the webpage was canceled
       What you can try:
         Retype the address. "
    Can anyone please help me with this one as to why it is not working?
    Thanks

    Dear Jonathan,
    Could you please try the following steps :-
    o Change the Help Settings from 'Shared Folder' to 'Local
    Installation' under Help => Help Settings.
    o Business One will then look for the Help folder on the local B1
    Client and not on the B1 Server.
    o This will only work if the B1 Client has the Help folder locally
    installed.
    o If not this could be manually copied from SBO_SHR directory to
    the client.
    o Alternatively all the B1 Clients will need to be reinstalled.
    Regards,
    Rakesh Pati
    SAP Business One Forum Team

  • Attach a file on iPad with iOS 7

    How do I attach a PDF, word or excel doc to an email using my iPad? I only seem to have the option to attach a photo now

    IOS is a different kind of system than MS.  Start from the app where the file resides, such as pages, or numbers, etc.  Then find the output in the app, and you can send it as an e mail.  In IOS you cannot simply attach files to an e mail  like you are used to. 
    It takes a hile to get used to, but generally works ok.  If you are attemtping to attach multiple items to an e mail, you need a more complicated solution.

  • Email attachment with .txt file (first line blank in the file)

    Hi all ,
    Iam trying attach .txt file to email , the file that iam accessing from server  . But first line blank (extra) even though i dont have blank line in original file .Can any help me out to resolve this issue?
    <u>Example</u> original file
    12345     aa    pq
    <u>Email attachment file</u>
                                        -> This line
    12345     aa    pq
    This is my code:
    REPORT  ZTEST_FILE  .
    DATA:BEGIN OF t_upload occurs 0,
           matnr LIKE zwplcsmev-matnr,
           zwgehrrg LIKE zwplcsmev-zwgehrrg,
           zwgehrct LIKE zwplcsmev-zwgehrct,
           zwgbev LIKE   zwplcsmev-zwgbev,
           zwpldt LIKE zwplcsmev-zwpldt,
           zwacdt LIKE zwplcsmev-zwacdt,
         END OF t_upload.
    *DATA:  maildata type sodocchgi1.
    *DATA:  mailtxt type table of solisti1 with header line.
    *DATA:  mailrec type table of somlrec90 with header line.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:REC(80) TYPE C.
    DATA g_mask(20) TYPE c VALUE ',., ..'.
    DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:P_ERROR(3).
    DATA:P_REFO(3).
    DATA:   gd_error TYPE sy-subrc,
            gd_reciever TYPE sy-subrc.
    DATA:   t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
            t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            w_cnt TYPE i,
            w_sent_all(1) TYPE c,
            w_doc_data LIKE sodocchgi1.
    selection-screen begin of block b1 with frame title text-001.
    parameters:p_file type localfile.
    parameter:p_email type ad_smtpadr.
    selection-screen end of block b1.
    --At Selection-Screen- -
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'TB_LIMIT_WS_FILENAME_GET'
          EXPORTING
            def_filename     = p_file
            mask             = g_mask
         mode             = 'S'
            title            = 'INPUT FILE'
          IMPORTING
            filename         = p_file
          EXCEPTIONS
            selection_cancel = 1
            selection_error  = 2
            OTHERS           = 3.
      IF sy-subrc <> 0.
           MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    START-OF-SELECTION.
      PERFORM process_file.
      if p_error = 'X' AND P_REFO <> 'X'.
      PERFORM populate_message_body.
      ENDIF.
      IF P_REFO = 'X' AND P_ERROR <> 'X'.
      it_message = 'Please find Attached file'.
      APPEND it_message.
      PERFORM send_attachment tables it_message
                                 it_attach
                          using  p_email
                         'Crest to Plc Data'
                                          'TXT'
                                          p_file
                                 changing gd_error
                                          gd_reciever.
      ENDIF.
      Instructs mail send program for SAPCONNECT to send email(rsconn01)
    PERFORM initiate_mail_execute_program.
    END-OF-SELECTION.
    *&      Form  process_file
          text
    FORM process_file.
    *CONSTANTS: con_cret TYPE x VALUE '0D',  "OK for non Unicode
                con_tab TYPE x VALUE '09'.   "OK for non Unicode
      DATA :l_path TYPE  string.
      l_path = p_file.
    CONSTANTS:  con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB
      con_cret type c value cl_abap_char_utilities=>newline.
    OPEN DATASET P_FILE  FOR INPUT IN TEXT MODE encoding default.
    if sy-subrc = 0.
    do.
    read dataset p_file into IT_ATTACH.
    IF SY-SUBRC  NE 0 .
    EXIT.
    ELSE.
    T_UPLOAD = IT_ATTACH.
    CONCATENATE con_cret it_attach  INTO it_attach .
    append it_attach.
    clear it_attach.
    P_REFO = 'X'.
    APPEND T_UPLOAD .
    clear t_upload.
    ENDIF.
    ENDDO.
    else.
    p_error = 'X'.
    ENDIF.
    ENDFORM.                    "process_file
    *&      Form  populate_message_body
          text
    FORM populate_message_body.
    w_doc_data-obj_name = 'TEST'.
      w_doc_data-obj_descr = 'Crest to Plc Data'.
      w_doc_data-obj_langu = sy-langu.
      it_message = 'File Not Found'.
      APPEND it_message.
    t_receivers-receiver = p_email.
      t_receivers-rec_type = 'U'.
      append t_receivers.
      call function 'SO_NEW_DOCUMENT_SEND_API1'
           exporting
                document_data              = w_doc_data
                document_type              = 'RAW'
                put_in_outbox              = 'X'
           tables
                object_header              = it_message
                object_content             = 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.
      commit work.
        SUBMIT rsconn01 USING SELECTION-SET 'SAP&CONNECTINT' AND RETURN.
      else.
        MESSAGE s027(vv) WITH 'E-mail not sent'.
      endif.
    ENDFORM.                    "populate_message_body
    *&      Form  send_attachment
          text
    FORM send_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.
      w_doc_data-doc_size = 1.
      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[].
      clear t_attachment.
    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.
        commit work.
        SUBMIT rsconn01 USING SELECTION-SET 'SAP&CONNECTINT' AND RETURN.
      else.
        MESSAGE s027(vv) WITH 'E-mail not sent'.
      endif.
    Populate error return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.                    "send_attachment

    Just copy the code below and execute . I just checked and found the exact values on attachment with no blank lines. This is more simple than the one u have written , just include ur data upload logic . For ITAB values to be attached i have written a simple logic to retrive from EKPO. Just copy this code and execute. u will understand then.
    I understand that ur initial requirement was to attach the file directly and not to upload and attach. If u still want to go for the old requirement then check out the code(2nd program of the two that i have sent) that i have sent u on ur previous post.
    REPORT  ZEMAIL_ATTACH                   .
    TABLES: ekko.
    PARAMETERS: p_email   TYPE somlreci1-receiver
                                      DEFAULT '[email protected]'.
    TYPES: BEGIN OF t_ekpo,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
          wa_ekpo TYPE t_ekpo.
    TYPES: BEGIN OF t_charekpo,
      ebeln(10) TYPE c,
      ebelp(5)  TYPE c,
      aedat(8)  TYPE c,
      matnr(18) TYPE c,
    END OF t_charekpo.
    DATA: wa_charekpo TYPE t_charekpo.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
            t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            w_cnt TYPE i,
            w_sent_all(1) TYPE c,
            w_doc_data LIKE sodocchgi1,
            gd_error    TYPE sy-subrc,
            gd_reciever TYPE sy-subrc.
    *START_OF_SELECTION
    START-OF-SELECTION.
      Retrieve sample data from table ekpo
      PERFORM data_retrieval.
      Populate table with detaisl to be entered into .xls file
      PERFORM build_TXT_data_table.
    *END-OF-SELECTION
    END-OF-SELECTION.
    Populate message body text
      perform populate_email_message_body.
    Send file by email as .TXT speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_message
                                          it_attach
                                    using p_email
                                          'Example .TXT documnet attachment'
                                          'TXT'
                                          'filename'
                                 changing gd_error
                                          gd_reciever.
      Instructs mail send program for SAPCONNECT to send email(rsconn01)
      PERFORM initiate_mail_execute_program.
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp aedat matnr
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekpo.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  BUILD_TXT_DATA_TABLE
          Build data table for .txt document
    FORM build_txt_data_table.
      CONSTANTS: con_cret TYPE x VALUE '0D',  "OK for non Unicode
                 con_tab TYPE x VALUE '09'.   "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
       con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
       con_cret type c value cl_abap_char_utilities=>CR_LF.
      CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
             INTO it_attach  SEPARATED BY SPACE . "con_tab.
    CONCATENATE con_cret it_attach  INTO it_attach." Use this if req.
      APPEND  it_attach.
      LOOP AT it_ekpo INTO wa_charekpo.
        CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
                    wa_charekpo-aedat wa_charekpo-matnr
               INTO it_attach SEPARATED BY SPACE ."con_tab.
       CONCATENATE con_cret it_attach  INTO it_attach." Use this if req.
        APPEND  it_attach.
      ENDLOOP.
    ENDFORM.                    " BUILD_txt_DATA_TABLE
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    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.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                    WITH output = 'X'
                    AND RETURN.
    ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
           Populate message body text
    form populate_email_message_body.
      REFRESH it_message.
      it_message = 'Please find attached a list test ekpo records'.
      APPEND it_message.
    endform.                    " POPULATE_EMAIL_MESSAGE_BODY
    execute this code and i hope that will help u.
    regards,
    Barath.

  • Netinstall with txt file to name the computers.

    Hi,
    I am new to ther OSX Server, I managed to clone a macbook with netinstall. Since I am going to clone 34 macbooks for my students with same image I need to name them and bind them to OD.
    To name the computer I hav created a txt file with tab delimited columns which look like this:
    00:0D:93:49:FD:E1 ->tab Computer_Name ->tab Host_Name
    00:0D:93:49:FD:E2 ->tab Computer_Name ->tab Host_Name
    Can some one please verify that the txt file will work with the netinstall to specify computer names?

    *Klanflo wrote:*
    *Can some one please verify that the txt file will work with the netinstall to specify computer names?*
    This is the correct textual format. What Apple forgets to tell you is the file needs +UNIX line endings+, not Macintosh line endings. I use TextWrangler to save the file in UNIX format. Works like a charm.

Maybe you are looking for

  • How many ipads for business use can be connected to one itunes account

    I have nine ipads that i want our service techs to use. How many ipads can i connect to one itunes account to restrict access or is there another way to limit the personal use?

  • How to Recover RPD in 10g Urgent

    Hi Gurus, I was using my OBIEE 10g RPD and i created some columns and i click on Check Global consistence it work does not have any errors. Then when i click on Save button the RPD is not responding. I dont have any backup of the Code and today is th

  • Issue with WRT350N

    I setup offline files on my laptop, I edited the files and got an access denied error when trying to synchronize. The only issue with that is, I setup this user to have R/W Access. Any ideas?

  • Remote Test and Demo Systems

    Would like comments from prior users of Remote Test and Demo Systems (or DPA?) where you get remote access to an SAP maintained system for the purpose of testing your application's interfaces with SAP ERP and/or BW. - how do you obtain this access -

  • Akamai in app folder should I erase?

    I found in my apps folder Akamai - with a bunch of accompanying files. What is it? There seems to be an uninstall file with it. Do I need it? Or is this something tracking me? thanks bob