How to add a textline to an xml structure using xslt

Hi,
I am having a requirement where i need to add a textline to an xml.
scenario: IDOC-File  and output format is an xml.
Output should be like this:
&&##AOC0MB000#AD15543390#BOIFCO#Z
<?xml version="1.0" encoding="ISO-8859-1"?>
<messages>
     <batch>0800062844</batch>
     <message>
          <type>VPR</type>
          <action>A</action>
          </body>
     </message>
</messages>
The line that has been added to xml is the data that will be coming from IDOC. How can we append the textline to the xml using xslt.Will document() in xslt works for doing this?

The required format in ur scenario is not an xml format, so u should not save the file in xml format. U may write an adapter module at receiver to achieve this.
How can we append the textline to the xml using xslt
This is not possible as the output of xsl transformation is an xml file.
Regards,
Prateek

Similar Messages

  • How to update XML file using XSLT

    Hi there,
    I have a "small" issue with exporting data to an XML file using XSLT.
    A two steps process is needed to import data from a non-hierarchical XML file into ABAP, change the data, and then update the XML file with new values. The problem is not trivial, since the format of the XML file is a complex one: there are many interdependent elements on the same level, pointing to each other by using id and ref attributes. Based on these values the data can be read and written into an internal table. I use XSLT and XPath for that. So the inbound process is done and seems to work correctly. I have to mention that the file contains much more data than I need. I am working only with a small part of it.
    Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT? I can pass only the internal table to the transformation, so how do I access the XML file in order to update it? I have tried to use the <B>xsl:document()</B> function to access the content of the file store locally on my PC, but it fails each time by throwing and URI exception. I have tried the absolute path without any addition and the path with the file:/// addition. Same result. Please advise.
    Many thanks,
    Ferenc
    P.S. Please provide me with links only if they are relevant for this very matter. I will not give points for irrelevant postings...

    Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT?
    XSLT approach:  check these online tutorial
    http://www.xml.com/pub/a/2000/08/02/xslt/index.html
    http://www.xml.com/pub/a/2000/06/07/transforming/index.html
    ABAP approach:
    for example you have the xml (original) in a string called say xml_out .
    data: l_xml  type ref to cl_xml_document ,
            node type ref to if_ixml_node  .
    create object l_xml.
    call method l_xml->parse_string
      exporting
        stream = xml_out.
    node = l_xml->find_node(
        name   = 'IDENTITY'
       ROOT   = ROOT
    l_xml->set_attribute(
        name    = 'Name'
        value   = 'Charles'
        node    = node
    (the above example reads the element IDENTITY and sets attribute name/value to the same)
    like wise you can add new elements starting from IDENTITY using various methods available in class CL_XML_DOCUMENT
    so how do I access the XML file in order to update it?
    you have already read this XML into a ABAP variable right?
    Sorry couldnt understand your whole process, why do you need to read local XML file?
    Raja

  • How to add interface to customlize MXML Component when use Flex Builder 3?

    How to add interface to customlize MXML Component when use
    Flex Builder 3?

    David,
    I don't believe you can add the interface via the creation
    dialog in FlexBuilder 3. You can always manually add the
    "implements" property to your MXML Component root tag. Something
    like this: <mx:VBox implements="com.mycorp.IMyInterface">
    If you want autogeneration of the interface, then create an
    ActionScript class with that interface and then copy the generated
    functions and setter/getters into the script block of your MXML
    component.

  • How to add additional disks on vmware OEL4 and use it for Oracle 10gR2?

    I created a virtual machine on vmware workstation 6 and installed OEL4.
    during first install I created 20 GB disk but now I want to add more disks.
    from vmware documentation I tried to add more 8 gb disk to the virtual host.
    under devices I see two lines;
    Hard Disk (SCSI 0:0) 20.0 GB
    Hard Disk (SCSI 0:2) 8.0 GB
    but I must be missing some step since I can not see 20 + 8 gb at df;
    [root@antuhost ~]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sda1              13G  9.7G  2.3G  82% /
    none                  506M     0  506M   0% /dev/shm
    /dev/sda2             4.9G  851M  3.8G  19% /homeThank you.

    Oh the check the answer from Re: How to add additional disks on vmware OEL4 and use it for Oracle 10gR2?

  • String to XML conversion using XSLT

    Hi all,
    I have a scenario when my source input XML is in the form of a string which needs to be transformed into an XML target fields.
    I am using XSLT mapping to do that and its working but unfortunately, input XML contain xml declaration <?xml version='1.0'?>. Because of which it fails.
    I need to remove this. Can any body please suggest how to do this?
    Any help will be appriciated.
    Regards
    -Kulwant

    Hi,
    Refer these links
    XI/PI: Convert Flat File to Deeply Nested XML Structures Using Only Graphical Mapping
    Regards,
    Surya

  • How to add a digital signature in xml publisher report

    The problem is: There is a existing pick slip report.This is a xml publisher report and the data source is RDF. We have to add digital signature there. Now this signature is stored in a table with type Long Raw and format BMP. XML Publisher do not support Long Raw and BMP format. It supports BLOB and jpg format.
    Could you please guide how to add this signature in the existing RDF with datatype as BLOB and format as jpg.
    Please provide the steps with example.

    Hi,
    Have a look at this thread.
    Implementing electronic signatures on an existing AP check run
    Re: Implementing electronic signatures on an existing AP check run
    Regards,
    Hussein

  • How to add extra blank space in xml

    I open the xml file in notepad I get this
    <XXON_EXT_BANK_ACCOUNT_NAME>創名聯合會計師事務所                                        </XXON_EXT_BANK_ACCOUNT_NAME>
    But when I open the xml file in html format the blank space is gone.
    How can I add extra blank space in xml?

    Hi
    Why do you need the extra space for?
    This difference in display that you see between your browser and notepad/notepad++
    will not affect your generated report.
    Bogdan 

  • How to add styles to image in XML view ?

    Is it possible to add styles to Images in XML view ?
    <Image alt="alternate text " src = " " />
    I tried adding sytle= "align : right " but its not working. I just want to align this element in the view to the right.

    Hi Micheal,
    Pleas see the below code.
    View:
    <core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
      controllerName="testing.imageXml" xmlns:html="http://www.w3.org/1999/xhtml">
      <Page title="Image">
      <content>
      <Image id="img1" alt="alttextimage" src="images/img1.jpg" />
      </content>
      </Page>
    </core:View>
    Controller:
    onBeforeRendering: function() {
      this.getView().byId("img1").addStyleClass("myimage");
    Index.html :
    <!DOCTYPE HTML>
    <html>
      <head>
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
      <script src="resources/sap-ui-core.js"
      id="sap-ui-bootstrap"
      data-sap-ui-libs="sap.m,sap.ui.commons"
      data-sap-ui-theme="sap_bluecrystal">
      </script>
      <script>
      sap.ui.localResources("testing");
      var app = new sap.m.App({initialPage:"idhome1"});
      var page = sap.ui.view({id:"idhome1", viewName:"testing.imageXml", type:sap.ui.core.mvc.ViewType.XML});
      app.addPage(page);
      app.placeAt("content");
      </script>
      <style>
      .myimage{float:right !important; width:300px; height:200px;}
      </style>
      </head>
      <body class="sapUiBody" role="application">
      <div id="content"></div>
      </body>
    </html>
    Output :
    Regards,
    KK

  • How to read the attribute of the xml file using jaxb

    Thanks,
    Buddy as i have a issue i have to read the xml file using jaxb and xml file contains this data and i have read the attribute like name , desc and action for a particular menu name pls tell the code how to do this it will be a great favour to me
    thanx in advance
    Rasool
    <contextmenu>
    <menu name='Lead' >
    <menuitem name='newlead' desc='New Lead' action='/leads.do?dispatch=insert' />
    <menuitem name='editlead' desc='Edit Lead' action='' />
    <menuitem name='leadinfo' desc='Lead Information' action='' />
    </menu>
    <menu name='Cases' >
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    </menu>
    <menu name='Contact' >
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    </menu>
    </contextmenu>

    What my program do is to get the encoding of XML files and convert them to UTF-8 encoding files, while I need this "encoding" information of the original XML document thus I can convert...
    After reading specifications and JDOM docs, the truth turns to be disappointed, no function is provided to get this information in JDOM level 2(the current released one), while it's promissed that this function will be provided in JDOM level API....
    Thanx all for your help and attention!!!

  • How to delete a perticular node from xml file using java code

    Hii All,
    Now i am trying to delete a perticular node from xml file.Like...
    XML file:
    <Licence>
    <SERVER>
    <was id="1">1</was>
    <was id="2">2</was>
    </SERVER>
    </LICENCE>
    I am working in messaging service using JABBER framework with whiteboard facility.
    Here Some commands i have created to add,modify,delete nodes from xml file.They Are
    1.If u want to add a new node then.
    create Licence.SERVER <ss id="3">ddd</ss> lic.xml
    (here u want to add a new node called "ss" under Licence.SERVER.
    And lic.xml is tyhe xml file name where it was saved.
    2.If u want to delete a node(Suppose <was id="1">),then the command should be
    delete Licence.SERVER.was:id='"1" lic.xml
    A problem arises that here it find two was attributes.And it delete the last was attribute,not the requested node.
    PLEASE HELP ME IN SOLVING THIS CODE..
    ------------------------------------

    Looks like you clicked on "Post" before you pasted in the code you were talking about.

  • How to add a link to an interactive svg using edge commons library

    Hi,
    I've been playing around with this wonderful Edge Commons interactive SVG tutorial
    My question is : How to add an external link "url" to an interactive svg using edge commons library ?
    Edge commons example file :
    http://edgedocks.com/market/interactive-svg-example-project-edge-commons
    Edge commons  video tutorial :
    http://www.youtube.com/watch?v=4UEB6gaLKuw
    I have adapted this tutorial to an interactive map, http://madudesign.com/works/france/ every thing is going fine until I couldn't figure out to link a particular url on each part of the region of the map.
    I managed to figure out how to change colors on the different parts of the map on mouse over and mouse out but I'm not quite comfortable with JavaScript since I don't use it every day...
    I have tryed to link to an url by passing it on the illustrator layer and via the onclick event (event.target.id) to a simple url
    http://redpen.io/6svh5u
    then working in Edge and publishing on the browser the link returns me a weird url line by replacing the original url slashes "//" by "_x2F_" and I must have misunderstood the proper JavaScript line to open that link from there...
    for example on my actual exemple "http://madudesign.com/works/france/"
    the first top region of France is normally a link to "http://www.google.com" and it returns "http:_x2F__x2F_www.google.com" plus the complete path to the file too...
    I don't know how to get around this trick and have back for each region a particular clean link from the event target id of the svg...
    thank-you for any help
    matt
    link to my edge animate file if needed :
    http://madudesign.com/works/france/carte_de_france.zip

    I got an answer from the Edge Commons dream team and I am very grateful to them :
    "The problem that you bumped into was that you hadn't included a valid URL so far. We weren't sure if you wanted to include them within the SVG file or if you wanted to implement the functionality within Edge Animate. We came up with a solution for the latter one, with a simple switch in the js code:
    You have to type in the appropriate URL of course for all the cases."
    I have to share the final result:
    http://www.madudesign.com/works/france/france_map/
    And the zipped project file:
    http://www.madudesign.com/works/france/france_map.zip
    Thanks to Daniel & Simon
    Matt

  • How to add a report into the SAP-SCRIPT .using PERFORM ......ENDPERFORM

    My question is that How to add a report into the SAP-SCRIPT .
    by using PERFORM ......ENDPERFORM
    I don't know how to used it .

    Hi Sandeep,
    Please check this link
    http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
    http://www.allinterview.com/showanswers/37425.html
    Calling ABAP Subroutines: PERFORM
    You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.
    PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    The values of the SAPscript symbols passed with /: USING... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See the example below on how to access the variables.
    The internal table OUT_TAB contains names and values of the CHANGING parameters in the PERFORM statement. These parameters are local text symbols, that is, character fields. See the example below on how to return the variables within the subroutine.
    From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program QCJPERFO is called. Then the simple barcode contained there (u2018First pageu2019, u2018Next pageu2019, u2018Last pageu2019) is printed as local variable symbol.
    Definition in the SAPscript form:
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    Coding of the calling ABAP program:
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY u2018PAGEu2019.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018NEXTPAGEu2019.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018BARCODEu2019.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = u2018|u2019. "First page
    ELSE.
    OUT_PAR-VALUE = u2018||u2019. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = u2018Lu2019. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Best regards,
    raam

  • How to add hash table values to SQL Table using Powershell

    Hi,
    I have sharepoint list with four(column1, column2, column3,column4)columns.I am reading the list column values and adding to hashtable. Now I want to add values from hastable to SQL table with four(column1, column2, colum3,column4)columns using powershell.
    I have written the following script for single column but I would like to know how to add values for multiple columns.
                if(($key -eq "Column1") )
                   $SqlQuery = "INSERT INTO [TableName] ([Column1]) VALUES ('" + $HashTable.Item($key) +"')"
                   #Set new object to connect to sql database
                   $connection = new-object system.data.sqlclient.sqlconnection
                   $Connection.ConnectionString ="server=SQLServerName;database=SQLDBName;Integrated Security = True;"
              $connection #List connection information 
                   $connection.open() #Open Connection
                 $Cmd = New-Object System.Data.SqlClient.SqlCommand
                 $Cmd.CommandText = $SqlQuery
                   $Cmd.Connection = $connection
                  $SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
                  $SqlAdapter.SelectCommand = $SqlCmd
                  $DataSet = New-Object System.Data.DataSet
                  $SqlAdapter.Fill($DataSet)
                  $DataSet.Tables[0]
                  $connection.Close()
    Can anybody please help me out to accomplish the task? Any help would be greatly appreciated.
    AA.

    Hi AOk2013,
    Not knowledgable on PowercShell, based on my understanding on HashTable in Java, Some modification you can make in your code to achieve your requirement.
    If the Keys in HashTable are "Column1","Column2","Column3","Column4", you can reference below.
    if(($key -eq "Column1") ) #what is the purposed of this if ?
    #$SqlQuery = "INSERT INTO [TableName] ([Term]) VALUES ('" + $HashTable.Item($key) +"')"
    #specify the real column names in the table
    $SqlQuery = "INSERT INTO [TableName] ([ColumnA],[ColumnB],[ColumnC],[ColumnD]) VALUES ('" + $HashTable.Item("Column1") +"','"+ $HashTable.Item("Column2") +"','"+$HashTable.Item("Column3") +"','"+$HashTable.Item("Column4") +"')"
    #Set new object to connect to sql database
    $connection = new-object system.data.sqlclient.sqlconnection
    $Connection.ConnectionString ="server=SQLServerName;database=SQLDBName;Integrated Security = True;"
    $connection #List connection information
    $connection.open() #Open Connection
    $Cmd = New-Object System.Data.SqlClient.SqlCommand
    $Cmd.CommandText = $SqlQuery
    $Cmd.Connection = $connection
    $SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
    $SqlAdapter.SelectCommand = $SqlCmd
    $DataSet = New-Object System.Data.DataSet
    $SqlAdapter.Fill($DataSet)
    $DataSet.Tables[0]
    $connection.Close()
    Since your question is regarding PowerShell, I would suggest you post it in a dedicated
    PowerShell Forum. It is more appropriate and more experts will assist you.
    If you have any feedback on our support, you can click
    here.
    Eric Zhang
    TechNet Community Support

  • How to add new group entry in Cisco Vpn using powershell

    I am working on a powershell script to connect cisco vpn using powershell, I am able to connect to vpn but not sure how to add new group to vpn. I am using the following script$vpn_profile = 'Test'
    $username = 'TestUser'
    $userPassword = ConvertTo-SecureString -String "Password" -AsPlainText -Force
    $credentials = new-object -typename System.Management.Automation.PSCredential -argumentlist
    $username,$userPassword
    $password = $credentials.GetNetworkCredential().Password
    Set-Location 'c:\Program Files (x86)\Cisco Systems\VPN Client'
    .\vpnclient.exe connect $vpn_profile user $username pwd $password
    Write-Host "You Are Connected"
    cd "C:\"

    Have you entered .\vpnclient.exe /? to see if it will return information about other switches you can use with this executable? Other than connect, I was able to track down a few without actually having the executable (http://www.scribd.com/doc/40108893/Cisco-VPN-Client-Command-Line).
    That said, I do not believe that there is a switch that will help you create a connection. These are either done manually through the GUI, or can be likely be added by supplying a properly formatted file in the proper place.
    If you're using the version of the Cisco VPN client I think you are, then your connection settings, or profiles, are stored in individual .pcf files somewhere on your computer (likely in the Cisco directory). These are simple, text-based files. Find one
    on your computer, save it with another name, and then modify it manually. If you really want to use PowerShell, then use this opportunity to learn how to create and edit basic text files using PowerShell. If you have a standard connection file, then you can
    put that file onto remote computers any number of ways. If a .pcf file exists in the proper place when the VPN client is opened, then it likely will not prompt for a new connection.
    Update: Added more info; clarified

  • How to add custom ringtones on new iPhone 5, using iTunes 11.04 on Mac OS 10.7.5

    how do I add custom ringtones on new iPhone 5, using iTunes 11.04 and Mac OS 10.7.5?

    Are you meaning rintones that you create from existing files?
    If so - then Google and you will get lots of hits on 'how to'.
    Once you have the ringtones in your iTunes library then make sure in iTunes prefs>General tab - the Tones option is selected. Once your device shows in the Devices list make sure you select from the Tones tab in the Devices window the tones you want to d/l.
    MJ

Maybe you are looking for

  • S2S between Cisco ASA 5505 and Sonicwall TZ-170 but not able to ping across

    Hi, I am helping out a friend of mine with his Site-to-Site VPN between his companies Cisco ASA another company's SonicWall TZ-170.  I have checked the screenshots proivded by the other end and tried to match with ours.  The Tunnel shows but we are n

  • How do i have a table repeat information in all levels...

    Hi, Hoping i am going to do a good job explaining what i need to do.. Basically I have a table with 3 groups State level Agency level Producer level table with calculation that calculates the ratio... and sums based on the sproc I want the table to r

  • LDAP Error code 65 - givenName

    I have tried dozens of things and reviewed many metalink documents, but none of them seem to zero in on my exact issue. Can someone please tell me why it is unable to map the givenName attribute. I have verified that inetOrgPerson is the correct obje

  • Global variables in Java Mapping

    Hi, I have a java mapping function in PI 7.1 that transforms an XML document to a legacy data structure which eventually is written to a flat file. The file name is required to be sequenced for each mapping run. For example, 1. The first message gene

  • Document type to purch org

    Hello guru's I want to restrict the certain document types for some purch organisation while creating PO.  is it possible, if yes how can i...????/