Convert XML to text file and sending the same via Mail receiver adapter

Dear All,
I have a requirement like....
I am getting a XML file as a result of mapping and it needs to be converted to a TEXT file and
the converted file needs to be sent to a mail address in text format.
Any body has idea how to achieve this?
Thanks in advance for your help.
Regards
Hari

>
HP CReddy wrote:
> Dear All,
>
> I have a requirement like....
>
> I am getting a XML file as a result of mapping and it needs to be converted to a TEXT file and
> the converted file needs to be sent to a mail address in text format.
>
> Any body has idea how to achieve this?
>
> Thanks in advance for your help.
>
> Regards
> Hari
use the StructXML2Plain or XML2Plain from the standard MessageTransformBean
Add the module to you Mail adapter before the mail adapters standard module itself
Ref: http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/content.htm

Similar Messages

  • Want to update a text file and reflect the same on iview immediately

    Dear friends,
    I have a text file in a repository path
    I could read each line and do some task.
    My query is for each line task, i would like to update a file (for me it is log file) and reflec the same on a iview in the same page
    sample code appreciated
    regards
    Kantha

    If the user backs up their device to either iCloud or Mac/PC, they can restore the app data from that backup.
    There's no need to do what you intend.

  • Issue : Read a text file and print the same

    Hi, My requirement is to read a text file and print it the same way.
    import java.io.BufferedReader;
    import java.io.FileReader;
    public class CatFile {
    public static void main(String[] args) throws Exception
         FileReader file = new FileReader("D:/Test/Allfiles.txt");
         BufferedReader reader = new BufferedReader(file);
         String text = "";
         String line = reader.readLine();
         while (line != null)
              text += line;
              line = reader.readLine();
         System.out.println(text);
    The text file i used contains
    A
    B
    C
    but my output is ABC.
    What change should be made to print it the same way in the txt file ?

    Hi EJP,
    I modified the code based on your suggestion and now its working as expected. Thanks
    Modified code :
    import java.io.BufferedReader;
    import java.io.FileReader;
    public class CatFile {
    public static void main(String[] args) throws Exception
         FileReader file = new FileReader("D:/Test/Allfiles.txt");
         BufferedReader reader = new BufferedReader(file);
         String text = "";
         String line = reader.readLine();
         while (line != null)
              System.out.println(line);
              line = reader.readLine();
              text += line;
    }

  • How to create xml file from Oracle and sending the same xml file to an url

    How to create xml file from Oracle and sending the same xml file to an url

    SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
    Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way.

  • 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

  • Zipping multple files and sending the Zipped folder to target location using Biztalk

    Hi all,
    I have requirement like
    Seperate Xml files will be coming as incoming message to Biztalk
    Biztalk need to send a zipped folder contining all these xml to target location
    any link or component i can use to meet this requiremant  plese help
    regards,
    Vineeth

    Create or use the publicly available custom component for unzipping the received message and for send use another component to replace all attachments of a multi-part message
    (multiple parts to multiple files to zip) for its zipped equivalent. If not multiple message use any zipping API to zip the multiple 
    files to zip file and send the zipped file in send port.
    BizTalk Pipeline Custom Component Message Unzippper
    Zip Files in a Custom Pipeline Component
    Multi-Part Message Attachments Zipper Pipeline Component
    BizTalk Multipart Message Attachments Zipper is a pipeline component
    List of custom Pipeline component you can use
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • How can i read the text files and buffer the data in Vector?

    hi. I have been running into this problem for days, but with no luck and losing right direction.
    The problem is : I am trying to read a text file and buffer the data into a
    Queue for each user.
    the sample text file is as below:( 1st column is timestamp, 2nd is user_id, 3rd is packet_id, 4th is packet_seqno, 5th is packet_size)
    0 1 1 1 512
    1 2 1 2 512
    2 3 1 3 512
    3 4 1 4 512
    4 5 1 5 512
    5 6 1 6 512
    6 7 1 7 512
    7 8 1 8 512
    8 9 1 9 512
    9 10 1 10 512
    10 1 2 11 512
    11 2 2 12 512
    12 3 2 13 512
    13 4 2 14 512
    14 5 2 15 512
    15 6 2 16 512
    16 7 2 17 512
    17 8 2 18 512
    18 9 2 19 512
    19 10 2 20 512
    20 1 3 21 512
    21 2 3 22 512
    22 3 3 23 512
    23 4 3 24 512
    24 5 3 25 512
    25 6 3 26 512
    26 7 3 27 512
    27 8 3 28 512
    28 9 3 29 512
    29 10 3 30 512
    30 1 4 31 512
    31 2 4 32 512
    32 3 4 33 512
    33 4 4 34 512
    34 5 4 35 512
    35 6 4 36 512
    36 7 4 37 512
    37 8 4 38 512
    38 9 4 39 512
    39 10 4 40 512
    40 1 5 41 512
    41 2 5 42 512
    42 3 5 43 512
    43 4 5 44 512
    44 5 5 45 512
    45 6 5 46 512
    46 7 5 47 512
    47 8 5 48 512
    48 9 5 49 512
    49 10 5 50 512
    50 1 6 51 512
    51 2 6 52 512
    52 3 6 53 512
    53 4 6 54 512
    54 5 6 55 512
    55 6 6 56 512
    56 7 6 57 512
    57 8 6 58 512
    58 9 6 59 512
    59 10 6 60 512
    60 1 7 61 512
    61 2 7 62 512
    62 3 7 63 512
    63 4 7 64 512
    64 5 7 65 512
    65 6 7 66 512
    66 7 7 67 512
    67 8 7 68 512
    68 9 7 69 512
    69 10 7 70 512
    70 1 8 71 512
    71 2 8 72 512
    What I wanna do is to read all the data above and buffer them in a queue for each user( there are only 10 users in total).
    I already created a class called Class packet:
    public class packet {
        private int timestamp;
        private int user_id;
        private int packet_id;
        private int packet_seqno;
        private int packet_size;
        /** Creates a new instance of packet */
        public packet(int timestamp,int user_id, int packet_id,int packet_seqno, int packet_size)
            this.timestamp = timestamp;
            this.user_id=user_id;
            this.packet_id=packet_id;
            this.packet_seqno=packet_seqno;
            this.packet_size=packet_size;
    }then I wanna to create another Class called Class user which I can create a queue for each user (10 users in total) to store type packet information. the queue for each user will be in the order by timestamp.
    any idea and sample code will be appreciated.

    Doesn't sound too hard to me. Your class User (the convention says to capitalize class names) will have an ArrayList or Vector in it to represent the queue, and a method to store a Packet object into the List. An array or ArrayList or Vector will hold the 10 user objects. You will find the right user object from packet.user_id and call the method.
    Please try to write some code yourself. You won't learn anything from having someone else write it for you. Look at sample code using ArrayList and Vector, there's plenty out there. Post in the forum again if your code turns out not to behave.

  • We have three discussions forums with same subject. whenever a post gets new reply in one forum, it should automatically trigger workflow functionality to check conditions and send the same reply to other synchronized forums.

    we have three discussions forums with same subject. whenever a post gets new reply in one forum, it should automatically trigger workflow functionality to check conditions and send the same reply to other synchronized forums.
    Rajiv Kumar

    Hi,
    More details about your discussions forum will make others easier to find a corresponding solution on your requirement.
    If you mean there are three Discussion Board list waiting for synchronizing, I would suggest you create an Event Receiver for the three Discussion Board list.
    Here is a link with code demo about how to copy items from one Discussion Board to another including Replies:
    http://spcodes.blogspot.com/2013/03/programmatically-copy-items-from-one.html
    Here is a step by step sample on creating a simple Item added event receiver for Custom List in SharePoint 2010:
    http://msdn.microsoft.com/en-us/library/ff398052.aspx
    More information on Event Receiver for your reference:
    http://msdn.microsoft.com/en-us/library/gg749858(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/ff408183(v=office.14).aspx
    Feel free to reply if there are still any questions. 
    Best regards
    Patrick Liang
    TechNet Community Support

  • Attaching Text file and sending mail

    Hi all,
              I am trying to attach a text file (ASCII file) and send using mail.
              I am not able to get proper data in attachement.Can anyone suggest me which type should i use
              to get the data in proper format.
              i was using RAW file. I found we dont have specific Text format.
             Its possible for XLS format, i need only text file to be attached.
    Thanks,
    Rajesh
    Edited by: rajesh pattnaik on Apr 16, 2009 3:03 PM

    Hi,
    After bringing your final alv data in the final internal table,
    go through this link , i also had an same requirement to send data after converting to excel file and
    send it as an attachment to mail id outside Sap,
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/to%252bsend%252b2%252bint%252btables%252bdata%252bas%252btwo%252battachments%252bto%252bmail%252bid%252boutside%252bsap%252bsystem
    I did this object and it was working fine using that function module.
    Hope it helps
    Regrds
    Mansi

  • How to get the value from a JavaScript and send the same to Java file?

    Hi.
    How to get the value from a JavaScript (this JS is called when an action invoked) and send the value from the JS to a Java file?
    Thanks and regards,
    Leslie V

    Yes, I am trying with web application.
    In the below code, a variable 'message' carries the needed info. I would like to send this 'message' variable with the 'request'.
    How to send this 'message' with and to the 'request'?
    Thanks for the help :-)
    The actual JS code is:
    function productdeselection()
    var i=0;
    var j=0;
    var deselectedproduct = new Array(5);
    var message = "Are you sure to delete Product ";
    mvi=document.forms[0].MVI;
    mei=document.forms[0].MEI;
    lpi=document.forms[0].LPI;
    if(null != mvi)
    ++i;
    if(null != mei )
    ++i;
    if(null != lpi)
    ++i;
    if(null != mvi && mvi.checked)
    deselectedproduct[++j]="MVI?";
    if(null != mei && mei.checked)
    deselectedproduct[++j]="GAP?";
    if(null != lpi && lpi.checked)
    deselectedproduct[++j]="LPI?";
    if( 0!=j)
    if(i!=j)
    for (x=0; x<deselectedproduct.length; x++)
    if(null != deselectedproduct[x])
    message =message+ "-" +deselectedproduct[x];
    alert(message);
    else
    //alert(" You cannot remove all products!");
    return false;
    return true;
    }

  • How to read the contents of a text file and populate the data in a table ?

    Hello All,
      Can anyone advise on how to acheieve the above ? I am trying to read in a text file (CSV) and have the contents populated to the respective UI elements in a table. Any help is greatly appreciated.
    from
    Kwok Wei

    Hi,
    Let us consider you have list of names(Seperated by delimeter) in a text file and you want to display in  a table.
    1. Create Context Node "Names" and context attribute "Name"
    2. Create Table and bind to the above context.
    3.Write the following code in the "Init method.
    try{
    FileReader f =new FileReader("");
    BufferedReader r=new BufferedReader(f);
    String names=r.readLine();
    Vector Names=new Vector();
    // Use Tokenizer and store all the names i a vector//
    for(int i=0;i<Names.size();i++){
    IPrivate<<VieName>>.INameElement ele=wdContext.createNameElement();
    ele.set<<Name>>( Names.get(i).toString());
    wdContext.NodeName().addElement(ele);
    Regards, Anilkumar
    Message was edited by: Anilkumar Vippagunta

  • Reading from a text file and displaying the contents with in a frame

    Hi All,
    I am trying to read some data from a text file and display it on a AWT Frame. The contents of the text file are as follows:
    pcode1,pname1,price1,sname1,
    pcode2,pname2,price2,sname1,
    I am writing a method to read the contents from a text file and store them into a string by using FileInputStream and InputStreamReader.
    Now I am dividing the string(which has the contents of the text file) into tokens using the StringTokenizer class. The method is as show below
    void ReadTextFile()
                        FileInputStream fis=new FileInputStream(new File("nieman.txt"));
                         InputStreamReader isr=new InputStreamReader(fis);
                         char[] buf=new char[1024];
                         isr.read(buf,0,1024);
                         fstr=new String(buf);
                         String Tokenizer st=new StringTokenizer(fstr,",");
                         while(st.hasMoreTokens())
                                          pcode1=st.nextToken();
                               pname1=st.nextToken();
              price1=st.nextToken();
                              sname1=st.nextToken();
         } //close of while loop
                    } //close of methodHere goes my problem: I am unable to display the values of pcode1,pname1,price1,sname1 when I am trying to access them from outside the ReadTextFile method as they are storing "null" values . I want to create a persistent string variable so that I can access the contents of the string variable from anywhere with in the java file. Please provide your comments for this problem as early as possible.
    Thanks in advance.

    If pcode1,pname1,price1,sname1 are global variables, which I assume they are, then simply put the word static in front of them. That way, any class in your file can access those values by simply using this notation:
    MyClassName.pcode1;
    MyClassName.pname1;
    MyClassName.price1;
    MyClassName.sname1

  • Any way to embed a text file and retain the link?

    Hi everyone,
    I am embedding the contents of a text file using "Insert > Choose...". This works wonderfully, but it appears to just insert the contents and gives me no way to update the text if the original text file changes. In Word, I can insert the text file and have it retain the link, then I have the ability to update the field (or all files in the document) with updated wording from my source files.
    In case you're wondering, I'm exploring using Pages for authoring the user guides for my company's software. We include command usage statements in our documentation and we have a workflow that runs each command, capturing it's help output into a text file, then we include this in the user guide document. Obviously, having the ability to update the user guide document with updated usage syntax is a required piece of functionality. I would like to use Pages instead of Word, but I'm not sure it can do this.
    Thanks in advance!
    Brian

    No, Pages can't do it. It doesn't keep a link to the original text document. You have to replace the text when you have made changes.

  • Searching a text file and printing the line if found!

    Hi, Im fairly new to JAVA and have been googling this for hours and havent found any results that
    have helped me...
    Im looking to search a text file for a value that is in a that is delimited by colons
    eg 45787 : 398948 : 398884 : 398984
    IF that value is found I need to print this entire line and move it into a string.
    I can work out the delimit part, the problem for me is a)searching the text file
    and b) tell java to print that line only??
    Any help would be very very much appreciated
    Cheers
    James

      public void printCourses() throws Exception
                stuinput[] courseObjArray = new stuinput[10]; //Make sure this is the same as the ammount in the text
                   Scanner sc = new Scanner(new File("testfile.txt"));
                   int i=0;
                   boolean found = false;
                   while(sc.hasNextLine())
                   //Delimit this line with scanner
                   Scanner sc1 = new Scanner(sc.nextLine());
                   sc1.useDelimiter(":");
                   courseObjArray[i] = new stuinput(sc1.next(),sc1.next());
                   i++;
                   }//while
                   for(int i1 = 0;i1 < courseObjArray.length;i1++)
                   System.out.println(courseObjArray[i1].courseCode);
                   System.out.println(courseObjArray[i1].courseName);
                   System.out.println(courseObjArray[i1].courseName);
                   System.out.println("-----------------");     
                   String courseCode2 = "courseObjArray[i1].courseCode";
                   if (courseCode2  == "12345")
                        System.out.println("working");
                   else{System.out.println("Not Found");}
           }hmmm just wondering why could this method always return a "Not Found"....if the text file had a whole bunch of values like this
    12345:Course1
    12344:Course2
    12343:Course3
    isnt it surposed to return 1 "Working"?? because there is a 12345 in on of the line, in the semi colon delimited line with 2 values, one being the course code, one being the course name??
    Given that there is 10 lines (from Array Object)

  • Code to pickup app.server file and Email the same!!!

    Hi,
    I need to write an ABAP code to pickup a file in application server and Email the same file to the intended receipients--
    Can i get the code pls?

    Hi Simran,
    Please search the forum. There are many sample codes available for reading data in application server and mail sending.
    User statements OPEN DATASET, READ DATASET and CLOSE DATA SET to get the application server data. Check F1 on these. You will come to know many interesting things.
    Below is the sample code for mail sending.
    DATA: li_reclist  TYPE STANDARD TABLE OF somlreci1,
          li_objpack  TYPE STANDARD TABLE OF sopcklsti1,
          li_content  TYPE STANDARD TABLE OF solisti1,
          lwa_reclist TYPE somlreci1,
          lwa_objpack TYPE sopcklsti1,
          lwa_content TYPE solisti1,
          lwa_doc     TYPE sodocchgi1,
          l_lines     TYPE i.
    REFRESH: li_reclist[], li_objpack[],
             li_content[].
    CLEAR: lwa_reclist, lwa_objpack,
           lwa_content, lwa_doc.
    lwa_reclist-receiver = "Give ur mail ID here.
    lwa_reclist-rec_type = 'U'.
    APPEND lwa_reclist TO li_reclist.
    "Here Loop at ur internal table and populate the data
    lwa_content = 'Please Check with your sales team for more details'.
    APPEND lwa_content TO li_content.
    CLEAR l_lines.
    DESCRIBE TABLE li_content LINES l_lines.
    READ TABLE li_content INTO lwa_content INDEX l_lines.
    lwa_doc-doc_size = ( l_lines - 1 ) * 255 + STRLEN( lwa_content ).
    lwa_doc-obj_langu  = 'E'.
    CONCATENATE 'Sales order' vbak-vbeln 'deleted.' INTO lwa_doc-obj_descr
             SEPARATED BY space.
    CLEAR lwa_objpack-transf_bin.
    lwa_objpack-head_start = 1.
    lwa_objpack-head_num = 0.
    lwa_objpack-body_start = 1.
    lwa_objpack-body_num = l_lines.
    lwa_objpack-doc_type = 'RAW'.
    APPEND lwa_objpack TO li_objpack.
    *Sending the mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        DOCUMENT_DATA                    = lwa_doc
    *   PUT_IN_OUTBOX                    = ' '
       COMMIT_WORK                      = 'X'
    * IMPORTING
    *   SENT_TO_ALL                      =
    *   NEW_OBJECT_ID                    =
      TABLES
        PACKING_LIST                     = li_objpack
    *   OBJECT_HEADER                    =
    *   CONTENTS_BIN                     =
       CONTENTS_TXT                     = li_content
    *   CONTENTS_HEX                     =
    *   OBJECT_PARA                      =
    *   OBJECT_PARB                      =
        RECEIVERS                        = li_reclist
    EXCEPTIONS
       TOO_MANY_RECEIVERS               = 1
       DOCUMENT_NOT_SENT                = 2
       DOCUMENT_TYPE_NOT_EXIST          = 3
       OPERATION_NO_AUTHORIZATION       = 4
       PARAMETER_ERROR                  = 5
       X_ERROR                          = 6
       ENQUEUE_ERROR                    = 7
       OTHERS                           = 8
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks,
    Vinod.

Maybe you are looking for

  • How can I see up AppStore/Software Updates for multiple computers using the same account?

    I have several computers in my household which all use the same App Store account for purchases & software updates. How can I view all those installs while not being in front of all computers? Recently an iMac crashed from a software update. I want t

  • System Lanscape Directory : how change URL for Web AS Java ?

    Hi, In the SLD Administration (http://sapcm.company.com:8001/sld) in the menu "Technical Systems", my WEB AS java has a wrong URL : msapcm:50100. Where can I change this URL to have sapcm.company.com:50100 ? I think is the same problem when I develop

  • IPod function / standby bug?

    I'm not sure if this is my fault, or the phone's, but since I can't find any settings relating to it. Sometimes when my phone goes into standby (i.e. the display shuts off and it locks) it starts playing whatever the 'now playing' song is in the iPod

  • Cannot open raw pic from A Panasonic G5.

    Hi, I cannot open raw pics from a Panasonic G5, it's Lightroom 5. Thanks!

  • Premiere Pro 6 AAF export variable rate error. Why?

    Hello, I'm trying to export an AAF out of Premiere Pro 6 and it says variable rate error. I've been scouring to try and find a reason for this error and so far no luck. The footage in the timeline is REDEpic footage. The framerate is 23.976. Many of