How to convert the TEXT file into an XML using plsql code

Hi all ,
I need to convert an TEXT file into an XML file how can i do it
Below is my sample TEXT file .
TDETL00000000020000000000000120131021115854ST2225SKU77598059          0023-000000010000
I want the above to be converted into the below format
<?xml version="1.0" encoding="UTF-8"?>
<txt2xml>
  <!-- Processor splits text into lines -->
  <processor type="RegexDelimited">
  <regex>\n</regex>
        <!--
        This is used to specify that a message should be created per line in
        the incoming file;
        NOTE: this was designed to work with all the processors, however it
        only works correctly with 'RegexDelimited' processors (check the
        enclosing top processor type)
         -->
         <maxIterationsPerMsg>1</maxIterationsPerMsg>
  <!-- For lines beginning with FHEAD (File Header) -->
  <processor type="RegexMatch">
  <element>FHEAD</element>
  <regex>^FHEAD(.*)</regex>
  <processor type="RegexMatch">
  <element>OriginalLine</element>
  <regex>(.*)</regex>
  <consumeMatchedChars>false</consumeMatchedChars>
  </processor>
  <processor type="RegexMatch">
  <element>LineSeq,Type,Date</element>
  <regex>^(\d{10})(\w{4})(\d{14})$</regex>
  </processor>
  </processor>
  <!-- For lines beginning with TDETL (Transaction Details) -->
  <processor type="RegexMatch">
  <element>TDETL</element>
  <regex>^TDETL(.*)</regex>
  <processor type="RegexMatch">
  <element>OriginalLine</element>
  <regex>(.*)</regex>
  <consumeMatchedChars>false</consumeMatchedChars>
  </processor>
  <processor type="RegexMatch">
  <element>LineSeq,TransControlNumber,TransDate,LocationType,Location,ItemType,Item,UPCSupplement,InventoryStatus,AdjustReason,AdjustSign,AdjustQty</element>
  <regex>^(\d{10})(\d{14})(\d{14})(\w{2})(\d{4})(\w{3})([\w ]{13})([\w ]{5})(\d{2})(\d{2})([+-]{1})(\d{12})$</regex>
  </processor>
  </processor>
  <!-- For lines beginning with FTAIL (File Tail) -->
  <processor type="RegexMatch">
  <element>FTAIL</element>
  <regex>^FTAIL(.*)</regex>
  <processor type="RegexMatch">
  <element>OriginalLine</element>
  <regex>(.*)</regex>
  <consumeMatchedChars>false</consumeMatchedChars>
  </processor>
  <processor type="RegexMatch">
  <element>LineSeq,TransCount</element>
  <regex>^(\d{10})(\d{6})$</regex>
  </processor>
  </processor>
  </processor>
</txt2xml>
Thanks

Sorry, that doesn't make much sense.
The XML you gave is a configuration file for txt2xml utility. It doesn't represent the output format.
Are you a user of this utility?

Similar Messages

  • How to convert the text field into currency field

    Hi,
    I have an requirement to converting the text field into currency.
    If I convert directly it gives dump.
    If I convert this to Numeric means it takes the decimals also as whole value.
    Is there any FM to convert the text field into Currency field.
    Please advice me.
    Thanks in advance.

    Hi,
    I am on an SRM sytem, which unfortunately does not have th FM: PSSV_TEXT_INTO_FIELD_CURRENCY.
    But I also need to transfer a string value like '12,99' to a field with type curr.
    Can i Do that manually, or is there another FM?
    I have already checked code with write to or pack/unpack.
    But without success yet.
    Something like this:
    DATA: g_str(11) type c.
    DATA: g_p type p.
    WRITE '12,99' TO g_str CURRENCY 'EUR'.
    is no use for me. Finally I need to move g_str to my curr-field, which causes st22.
    also: PACK g_str to <curr-field or g_p> dumps.
    Help appreciated.
    regards, matthias

  • How to upload the text file into smart forms

    Hi Experts,
    can any one tell me that how to upload  the text file or html file to SAP Script form or smart forms
    i have download the form info from SAPscript form.to text file.
    now i want to upload the text file to smartforms.
    is it possible ? if it is possible, then how can i do that ?
    Thanks in Advance.
    Regards,
    Mani

    <b>For Scripts</b>
    Go to SE38. Put in the program name RSTXSCRP. Execute it.
    Mode(Export/Import) : Import.
    Give the file name from which you want to upload and execute it.
    <b>For Smartforms</b>
    TCode : smartforms.
    Give the form name.
    Utilities-->Upload form.
    Reward points if helpful.
    Thanks
    Aneesh.

  • How to chage the welcome file in web.xml using creator?

    Hi guys,
    I want to set the welcome file in web.xml to index.html but every time I run my project in creator, creator replaces index.html by faces/index.jsp. I need the index.html to check if the browser enables cookies & javascript and then I redirect to index.jsp. If I change the web.xml in a common editor, build the war-file with ant and deploy the project with tomcat, everything is fine. but how can I change it in creator?
    thanks in advance

    Sorry, that doesn't make much sense.
    The XML you gave is a configuration file for txt2xml utility. It doesn't represent the output format.
    Are you a user of this utility?

  • How to read/write text file to db2 by using java code

    Hai
    I created the table to insert a clob data as follows
    db2 => create table ctest(datas clob(65536))
    DB20000I The SQL command completed successfully.
    db2 => describe table ctest
    Column Type Type
    name schema name Length Scale Nulls
    DATAS SYSIBM CLOB 65536 0 Yes
    1 record(s) selected.
    I tried the following java code to insert a clob data.
    public static synchronized Connection getConnection() throws Exception {
    Connection m_connectionDatabase = null;
    try {
    Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
    // Get the connection to the database.
    m_connectionDatabase = DriverManager.getConnection(
    "jdbc b2 ps","","");
    }catch (Exception e) {
    throw new Exception("Failed to connect to the database. ", e);
    return m_connectionDatabase;
    public static void main(String a[]) {
    File file = new File("d:\\a.txt");
    InputStream fis = new FileInputStream(file);
    Connection con = getConnection();
    PreparedStatement pstmt = con.prepareStatement("insert into ctest values(?)");
    //try 1
    pstmt.setAsciiStream(1,fis,(int)file.length());
    // try 2
    pstmt.setCharacterStream(1,fis,(int)(file.length()));
    // try 3
    pstmt.setBinaryStream(1,fis,(int)(file.length()));
    // try 4
    byte[] b = new byte[fis.available()];
    fis.read(b);
    pstmt.setBytes(1, b);
    // try 5
    byte[] b = new byte[fis.available()];
    fis.read(b);
    pstmt.setString(1, new String(b));
    pstmt.executeUpdate();
    pstmt.close();
    fis.close();
    Result:
    If the file size is less than 32kb, it inserted successfully.
    but if more than 32kb, it throws follwing exception
    COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0352N An unsupported SQLTYPE was encountered in position "1" of the input list (SQLDA). SQLSTATE=56084
    at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source)
    at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source)
    at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(Unknown Source)
    at COM.ibm.db2.jdbc.app.DB2PreparedStatement.loadParameters(Unknown Source)
    at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(Unknown Source)
    at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeUpdate(Unknown Source)
    Can any body please help out to insert clob value.
    Thanks in advance
    V.Shan

    Normally I would be happy to help you, but after several years of trying to help here, I've decided not to contribute anymore because of the piss-poor way in which this site is being administered.
    Others are still helping, but more may leave if things don't improve. May I recommend devshed or javaranch?
    http://www.devshed.com/
    http://www.javaranch.com/
    If you would like to complain to the admins of this forum, either click the "Report Abuse" link or the "Feedback" link.
    -- foofoo (shamelessly stolen the text from jverd).

  • How to convert the local file into unicode file?

    Hi All,
    I need read local file (GUI_UPLOAD) and save it as unicode file?
    I've found class CL_ABAP_CONV_OUT_CE but I've no idea how to use it.
    Should I read file in binary mode and then convert it into unicode? AT the and save it (GUI_DOWNLOAD) ?
    Thanks
    Adam

    Hi,
    Check these classes, will help you
    CL_ABAP_CONV_IN_CE : Reading binary data
    CL_ABAP_CONV_OUT_CE : exporting binary data
    CL_ABAP_CONV_X2X_CE : reading and exporting binary data and changing the format
    Regards,
    Satish

  • How to convert the .dmp file into my oracle database

    There is a .dmp file which produced by the oracle for NT.
    How could I use this .dmp file to create my oracle for Linux
    database?
    Please help me to solve this problem.
    Thank you very much!
    The reply Email also send to [email protected] will be
    appreciated.
    null

    You will first need to create your database on your linux
    platform complete with all necessary tablespaces and datafiles.
    If you were going from unix to unix and each platfrom's datafile
    file structure was the same then only the system tablespace
    would need to be pre-created, import would have done the rest.
    However, you are going from nt to unix so the tablespace create
    statements will have invalid paths.
    So, list out the view dba_tablespaces. Create a starter
    database (system tablespace complete with installed options).
    The system tablespace should be the same (or bigger) at the one
    on the nt platform. Then create these same tablespaces on your
    linux platform. Once the database has been created complete with
    all tablespaces then use the import utility to populate your
    database.
    Done.
    Wan-rong Jih (guest) wrote:
    : There is a .dmp file which produced by the oracle for NT.
    : How could I use this .dmp file to create my oracle for Linux
    : database?
    : Please help me to solve this problem.
    : Thank you very much!
    : The reply Email also send to [email protected] will be
    : appreciated.
    null

  • How to convert the javasource file(*.class) to execute file(*.exe)?

    How to convert the javasource file(*.class) to execute file(*.exe)?
    thank you!

    Although i have seen a few programs (that are platform specific) that will embed a small jvm into an exe with your class file, it is generally excepted that you cannot create an executable file using java. The JAR executable file is probably the closest your going to get
    Pete

  • Setting Font for converting multiple text files into PDF using VB 6.0

    Dear All,
    Am converting multiple text files into PDF using VB6.0. Currently, am unable to control the font face and size for the generated files. Below is the procedure am using for each file;
    Public Sub proc_convert_to_PDF(srcFilename As String, destFilename As String)
    Dim p_AcroApp As CAcroApp
    Dim p_VDoc As CAcroAVDoc
    Dim p_DDoc As CAcroPDDoc
    Dim IsOk As Boolean
    Set p_AcroApp = CreateObject("AcroExch.App")
    Set p_VDoc = CreateObject("AcroExch.AVDoc")
    Call p_VDoc.Open(srcFilename, "")
    Set p_VDoc = p_AcroApp.GetActiveDoc
    If p_VDoc.IsValid Then
    Set p_DDoc = p_VDoc.GetPDDoc
    ' Fill in pdf properties.
    p_DDoc.SetInfo "Title", Format(Date, "dd-mm-yyy")
    p_DDoc.SetInfo "Subject", srcFilename
    If p_DDoc.Save(1 Or 4 Or 32, destFilename) <> True Then
    MsgBox "Failed to save " & srcFilename
    End If
    p_DDoc.Close
    End If
    'Close the PDF
    p_VDoc.Close True
    p_AcroApp.Exit
    'Clear Variables
    Set p_DDoc = Nothing
    Set p_VDoc = Nothing
    Set p_AcroApp = Nothing
    End Sub
    What I need;
    1) to be able to set the font face of the destination file ( destFilename)
    2) to be able to set the font size of the destination file ( destFilename)
    Am using Adobe Acrobat 7.0 Type Library
    Kindly Help.
    Thanks in advance

    We didn't say it doesn't work. We said it isn't supported.
    There are a number of other ways to make a PDF. The one which would
    give the most control is if your application directly printed to GDI,
    controlling the font directly. This could print to Adobe PDF.
    You could look for an application that gives control of font for
    printing.
    You could use a text-to-PostScript system and distill the result. You
    could even look for a non-Adobe text-to-PDF.
    Working in the unsupported and dangerous world you chose, the font
    size for text conversion is set (and this is very bad design from
    Adobe) in the settings for Create PDF > From Web Page. There is no API
    to this.
    Aandi Inston

  • How to convert a PDF file into a full editable WORD file?

    Hi,
    I tried to convert a pdf file into word but it is not fully editable. I can edit the title from the main page and that's it. The rest of the word document is saved as image. I tried editing teh pdf file but that one is not working either.
    Please help on how to convert a PDF file into a full editable WORD file.
    Thank you

    Not all PDF files are created equal.  When a PDF file is created with Adobe Tools it is usually "tagged" with information about the fonts the images, the layout etc...    This way when the PDF is saved to a new format like PPT or DOC then the results are usually usable.  However, if you have a PDF file that was not tagged for some reason then run the Accessibility tools on the PDF to acquire some basic tagging.  This may get you a better result.  Also if you have a PDF that is an image, then you may want to run OCR on it.

  • How can I sync text files into iPhone?

    How can I sync text files into iPhone? like doc. txt. for reading or editing

    The native iPhone OS doesn't allow that. I think there are several solutions to this, some of which may be against the AT&T or Apple rules. One legitimate solution is The Missing Sync for iPhone by mark/space (http://www.markspace.com).
    Before I had an iPhone, I owned a copy of The Missing Sync for Windows Mobile. It was a pretty decent app. In my opinion, though, their app for the iPhone is NOT worth the price ($40 new, $25 for a cross-grade).
    Also, check the App Store (if you have 2.0 software)--there may be an app that does this, probably for a lot less $.

  • How to convert a .alsx file into pdf

    How to convert a .alsx file into pdf
    Iam facing this problem since many days please resolve it
    http://www.roothow.com
    Thankls in adavance

    >But, from the windows explorer, if i do a right clic on the word document, with the context menu, i can directly convert to PDF
    This is equivalent to using the PDFMaker facility in Word - that is,
    the Acrobat button. Which is also the same thing that is done when you
    use File > Create PDF > From File in Acrobat.
    What it does is print to a PS file *and* do a lot of additional
    processing to write stuff about links, tags etc. into the PS file.
    >(no tmp PS file is used, cause the links are still working).
    This isn't true, but it's certainly the case that you won't get links.
    There seems to be no API, via any mechanism, still less the "obsolete"
    (Microsoft's view) command line, to use PDFMaker from your program.
    Aandi Inston

  • How to break the PDF file into images?

    How to break the PDF file into images? There should be settings in Photoshop CS 6 that imports PDF file and break it into images.  I have a short instruction:
    2.    Open the file in Photoshop.
    3.    A new window should open to Import PDF.  Click on images, not pages  import pdf into Photoshop.doc
    4.    Select all the files shown (shift + click), Click O.K.  Four files should open on your screen.
      Was anybody successful with that?

    Whether this is available solely depends on the structure of the PDF and whether it actually contains whole images that can be extracted separately. Depending on whatgoing on in the PDF this may simply not be the case and the images have been tiled and split up in multiple "objects" whose appearance can only be retained by rasrerizing the whole page...
    Mylenium

  • Howe to convert i tune files into MP or WAC files

    Howe to convert I Tune files into MP3 or WAV files

    iTunes should be able to do everything for you, however if you wish to use third party software that requires MP3 or WAV files, iTunes can convert to either of those formats from any format it can read.

  • How to embed the html file into form 6i?

    How to embed the html file into form. What control activeX should i use? please help!!!!!!

    You can use web.show_document function for this purpose. See
    form builder help topics for more details.
    Hope this helps.

Maybe you are looking for

  • Shortcuts for Telephony Toolbar Buttons in IC WebClient release 5.2 (2006s)

    Hi. Has anyone done Assigning hotkeys or shortcuts to Telephony Toolbar Buttons in IC WebClient release 5.2 (2006s)??? This function was possible in the previous release until 5.0 (WinClient) as “Function Key Assignment”. And in CRM 5.2 we have a pos

  • Bashrun 1.0 rc2 -- complete rewrite, needs testing

    Dear fellow archers, About two years ago I posted an early version of bashrun on these forums. Bashrun is a versatile application laucher based on bash, using a small, one-line terminal window for it's user interface to provide a simple run-dialog. T

  • File to multiple idoc types

    Hi All, Can anyone explain me how to configure a scenario where I have file sender and 2 idoc receivers. When I have gone through some documentation I came to know that this is not possible using BPM. How true it is ?Please explain.Also explain my ab

  • Saving PDF files in AIR

    Hi there, I'm trying to save a template PDF form file that has been loaded using htmlLoader & filled using AS 3 along with a document-level JavaScript in the PDF file. I can't seem to find a way to save the file to disk. I looked at AlivePDF but it s

  • JBO-25013: Too many objects match the primary key oracle.jbo.Key[33 ]!!!

    Hi all, I have a huge problem... I have two tables in a parent - child relationship. Each has it's own entity and view object with appropriate associations and links. The parent table has an insert trigger which inserts default rows into the child ta