How to add numbers in XML?567- 5+6+7=18?

I have a requirement in check printing to print the check no at the bottom of the check.
1.     Compute sum of all the digits in the check number and divide it by 9.
E.g.:
1.     0+0+7+0+0+5+7+9 = 28 (SUM)
2.     28 / 9 = 3 (with remainder 1)
3.2.     Compute the difference between 9 and the remainder in step 2. This number is the check digit (Modulus 9).
E.g.:
1.     9 – 1 = 8
2.     8 is the check digit.
If the remainder in Step2=0, then the check digit is 9
So I will display 007005798
In XML or XSL , How can I do this?
Question: Is there any built in SQL function available to compute the sum of individuals of a number?For eg 567-> 5+6+7=18
If I am ending up wrinting a function for the above how can I call that in RTF?
thanks
prasanna

Srini
Can you please help me out..The xml formula works for hardcoded values but not for the actual tag values.
1) I am not finding space to copy the following into the form field:\
You gave:
<?9-((substring(555555555,1,1)+ substring (555555555,2,1) + substring (555555555,3,1) + substring (555555555,4,1) + substring (555555555,5,1) + substring (555555555,6,1) + substring (555555555,7,1) + substring (555555555,8,1) + substring (555555555,9,1)) mod 9)?>
I remodified for my situation:
<?9-((substring(../PaymentNumber/CheckNumber,1,1)+ substring (../PaymentNumber/CheckNumber,2,1) +
substring (../PaymentNumber/CheckNumber,3,1) + substring (../PaymentNumber/CheckNumber,4,1) +
substring (../PaymentNumber/CheckNumber,5,1) + substring (../PaymentNumber/CheckNumber,6,1) +
substring (../PaymentNumber/CheckNumber,7,1) + substring (../PaymentNumber/CheckNumber,8,1) +
substring (../PaymentNumber/CheckNumber,9,1)) mod 9)?>
But the above dont fit into the form field.How to take care of this?
thanks
prasanna

Similar Messages

  • How to add data in xml file

    Hi ALL
    I want to add new fields on seeded EBS page to store their values in hr_api_transaction table whoch contain information of other fields on that page which are seeded
    but that table has one column which stores xml file and that xml file has all information about that page's fields
    how can I store my custom fields values in that xml file ?

    Hi,
    As Andy said,  add data to an xml file is overwriting, if you mean append data to xml file, please look this article:
    http://codesamplez.com/programming/linq-to-xml-tutorial, Since this issue is more related to ASP.net, you could also ask this issue in asp.net forum:
    http://forums.asp.net/
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to add prefixes to xml output?

    Does anyone know a quick and easy way to add a namespace prefix to an xml document when you output it as a string?
    i'm looking for somethinglike this.
    <Order xmlns="http://www.something.com/name">
       <item>sink</item>
    <Order>
    converted into
    <dof:Order xmlns:dof="http://www.something.com/name">
       <dof:item>sink</dof:item>
    <dof:Order>
    I have attempted to use the xmlText method on the XmlObject class passing in an XmlOptions object with setSaveSuggestedPrefixes() set to my hsahmap with the namespace and prefix, however nothing happens. Well, sometimes it works and other times it does not.
    It seems that it works when i programatically build my xml using XmlObject methods, but it fails when i parse an existing xml string into the XmlObject using parse(String).
    Any help would be appreciated. I can't find any detailed help anywhere.
    Thanks
    Jeremy

    You can achieve your requirement using XSLT maaping on XML. Read more about XSLT mapping. Also read more about WordML processing tool by Microsoft.

  • How to retrieve Numbers from xml data

    if I have this data..
    <bids>
    <bid_tuple>
    <userid>U01</userid>
    <itemno>1004</itemno>
    <bid>40</bid>
    <bid_date>1999-03-05</bid_date>
    </bid_tuple>
    <bid_tuple>
    <userid>U03</userid>
    <itemno>1007</itemno>
    <bid>175</bid>
    <bid_date>1999-01-25</bid_date>
    </bid_tuple>
    <bid_tuple>
    <userid>U05</userid>
    <itemno>1007</itemno>
    <bid>200</bid>
    <bid_date>1999-02-08</bid_date>
    </bid_tuple>
    <bid_tuple>
    <userid>U04</userid>
    <itemno>1007</itemno>
    <bid>225</bid>
    <bid_date>1999-02-12</bid_date>
    </bid_tuple>
    </bids>
    stored in xmltype table called bids
    I want to run this query...
    select extract(OBJECT_VALUE,'/bids/bid_tuple/itemno/text()').getnumberval() from bids;
    it give me .. 1.0011E+63
    Which I DO NOT NEED
    I need numbers not string since extract or extract vlaue will return string AND using getNumberVal() will give me this strange result
    I need it since I want to compare the result with data from relational table
    Thanks

    NinaOracle wrote:
    select extract(OBJECT_VALUE,'/bids/bid_tuple/itemno/text()').getnumberval() from bids;That extracts and concatenates all itemno text nodes from the document into a single (possibly long) string.
    With getNumberVal you then try to convert the string to a (possibly big) number, hence the display "issue".
    If you want to break the XML into relational rows and columns, XMLTable is your choice :
    SQL> SELECT x.itemno
      2  FROM bids b,
      3       XMLTable(
      4        '/bids/bid_tuple/itemno'
      5        passing b.object_value
      6        columns
      7         itemno number path '.'
      8       ) x
      9  ;
        ITEMNO
          1004
          1007
          1007
          1007

  • How to add DOCTYPE in XML using jaxp-1.2 ????

    Hi all,
    I know this question has been asked at least 2000 times. But I couldn't find the answer from the previously posted messages.
    I would like to create a new Document (actually a XML document) and to write it out into a file. Of course, to be useful, that document needs a DTD... But I can't find a way to create that DOCTYPE tag.
    In fact, I get this error: org.apache.crimson.tree.DomEx: HIERARCHY_REQUEST_ERR: This node isn't allowed there.
           at org.apache.crimson.tree.XmlDocument.appendChild(XmlDocument.java:661)
           at ServiceManager.PlaylistDOM.createDoc(PlaylistDOM.java:99)
           at ServiceManager.PlaylistDOM.load(PlaylistDOM.java:52)
           at java.lang.Thread.run(Thread.java:536)The code I have is the following:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    try {
        //create a factory and configure it
        DocumentBuilder builder = factory.newDocumentBuilder();
        playlistDoc = builder.newDocument();
        DOMImplementation impl = builder.getDOMImplementation();
        DocumentType doctype = impl.createDocumentType(ROOT_EL, null, "playlist.dtd");
        playlistDoc = impl.createDocument(null, ROOT_EL, doctype);
    catch (ParserConfigurationException pce) {}
    //create the root of the XML file
    Element root = (Element) playlistDoc.createElement(ROOT_EL);
    root.setAttribute(FRAME_ATTR, fNb);
    playlistDoc.appendChild(root);
    //now print it out into XML file
    TransformerFactory tfactory = TransformerFactory.newInstance();
    try {
        Transformer transformer = tfactory.newTransformer();
        DOMSource source = new DOMSource(playlistDoc.getDocumentElement());
        StreamResult res = new StreamResult(new File(filename));
        transformer.transform(source, res);
    catch (TransformerConfigurationException tce) {}
    catch (TransformerException te) {}Thank you for your help

    add both SYSTEM and PUBLIC, then you will find PUBLIC :P
    ================
    If the doctype-public or doctype-system attributes are specified, then the html output method should output a document type declaration immediately before the first element. The name following <!DOCTYPE should be HTML or html. If the doctype-public attribute is specified, then the output method should output PUBLIC followed by the specified public identifier; if the doctype-system attribute is also specified, it should also output the specified system identifier following the public identifier. If the doctype-system attribute is specified but the doctype-public attribute is not specified, then the output method should output SYSTEM followed by the specified system identifier.
    reference: http://java.sun.com/j2se/1.4.1/docs/api/javax/xml/transform/OutputKeys.html

  • How to add bookmarks from .xml file?

    I switched from a PC to an iMac and i'm trying to set up the Safari browser. I was using MSN explorer as my default. I saved the .xml file where all my bookmarks were stored. Is there a way I can import the .xml file so all my bookmarks can load?

    hi,
    check out the following links
    Check this blog to extract from XML:
    /people/kamaljeet.kharbanda/blog/2005/09/16/xi-bi-integration
    http://help.sap.com/saphelp_nw04/helpdata/en/fe/65d03b3f34d172e10000000a11402f/frameset.htm
    Check thi link for Extract from any DB:
    http://help.sap.com/saphelp_nw04s/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/content.htm
    regards
    harikrishna N

  • How to add parameters to xml report header

    All,
    I've added two new parameters to my UUT information dialog (I made my own UUT information dialog) and I'd like to pass them to the header of my xml report.  The style sheet I've chosen to use is "report.xsl" and I've already added the two rows to my header; so what I'd like to do is pass these 2 parameters from the PreUUT callback to my report.
    First question: Is this possible?
    Seconds question: I've struggled finding "reading material" on this topic and am looking for some helpful hints on where to start.  To me this doesnt seem like something that should be that difficult, but maybe I'm mistaken?
    Any help is appreciated.
    Thanks,
    Bill
    John 3:16

    Hi Bill,
    In addition to making changes to the style sheet, we must also include the parameters you want to dispaly in the XML file using the ModifyReportHeader Callback. Please refer to this KnowledgeBase article for more information.
    http://digital.ni.com/public.nsf/allkb/17ABBD0BF2A60D908625774200798869?OpenDocument
    Hope this helps!
    Regards,
    Anjelica W.
    National Instruments
    Applications Engineer

  • How to Add Numbers in an Array

    I understand that you would use a for loop, but I don't know what would come after:
    for(int b=0; b<array.length; b++){ Please help!!!
    I have tried this on my own, but nothing is working!!!
    Thanks in advance
    Edited by: Sevan on Oct 12, 2008 2:12 PM

    I finally figured it out!!!
    Here is what I did:
    import java.util.*;
    public class Grades
        public static final void main(String[] args)
            Scanner scanner = new Scanner(System.in);
            System.out.println("Insert Number of Grades to Average");
            int x = scanner.nextInt();
            int[ ] array = new int[x];
            System.out.println("Insert Grades Below");
            for(int i=0; i<x; i++){
            int r = i+1;
            System.out.println("Grade Number " + r);
            array=scanner.nextInt();
    if(array[i]<=100 && array[i]>=0){
    continue;
    else{
    System.out.println("Error: Only Enter Grades Between 0 and 100");
    return;
    int h=0;
    for(int b = 0; b < x; b++){
    h = h+array;
    double y = h/x;
    System.out.println("The Student's Average is " + y);
    The solution starts 5 lines from the bottom.
    However,
    I feel like there is an easier solution to this problem
    If there is, please let me know!!!
    Thank you

  • Urgent: How to add  reference DTD at receiver side XML?

    Hi!
    I have a problem to transfer IDOC to XML.
    During Migration from Business connector to XI 3.0,
    At original result xml header,
    ....<?xml version="1.0" encoding="ISO-8859-1"?>
    ....<!DOCTYPE Shipments SYSTEM "DTD/Shipment.dtd">
    .................................~~~~~~~~~~~~~~~~~~~~~~~~~~~
    But, thru XI,
    ....<?xml version="1.0" encoding="iso-8859-1"?>
    ....<!DOCTYPE Shipments>
    so, target system can't recognize that result xml.
    we are using mapping program with abap-class, XI3.0 SP14.
    How to add it at xml header in abap class?
    regards
    Message was edited by: ChangSeop Song

    Hi,
    I don't know if this will work
    but I'd try with xslt and <b>doctype-public</b> and <b>doctype-system</b> declarations to do what you want
    in the second mapping (after the abap mapping)
    of the interface mapping that you're using
    Regards,
    michal

  • How to add different versions of layout in XML Publisher Report?

    How to add two versions of layout(RTF) for different languages in xml publisher report template so that user can see the report in two languages? Is that possible?
    If so then what is the procedure to do that? Can anyone help in this regard?

    Soma,
    Refer to [Oracle XML Publisher User Guide|http://download-uk.oracle.com/docs/cd/B25516_14/current/acrobat/115xdoug.zip] manual, Page 5-8 Adding Localized Templates for Additional Languages.
    Regards,
    Hussein

  • I am using numbers in the new iWork. Just bought it 10 days back. I am not able to figure out how to add serial umbers from 1 to 100( for example) also i need to freeze the top header like in windows so that we can browse down without the heading going of

    i am using numbers in the new iWork. Just bought it 10 days back. I am not able to figure out how to add serial umbers from 1 to 100( for example) also i need to freeze the top header like in windows so that we can browse down without the heading going off. Can some one help?

    Hi Jay,
    Be aware that "Freeze Header Rows" and "Freeze Header Columns" apply only to rows and columns that are Header rows or Header columns. You can have up to five Header rows, Five Header Columns (and five Footer rows) on a Numbers Table.
    "Header rows" is a special designation. Besides being able to be frozen, Header and Footer rows are not included in formulas referencing whole columns, making it possible to place formulas such as =SUM(B) at the top (or bottom) of column B without causing a self-reference error, These designated rows are also not included in sorts of the rows in a table.
    Regards,
    Barry

  • How to add two different page numbers in a single page

    How to add two different page numbers in a single page? One is for page number of the whole article, the other one is for page number for each chapter in the article.

    It's quite complicated, see
    Two Page Numbering Schemes in the Same Document.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • ? how to add page numbers in pages 5.2, starting with 2.  Pages '09 had an option to not show folio on page one.  Also any how to do left and right folios for a Tabloid?  Many trhanks

    ? how to add page numbers in pages 5.2, starting with page 2.  Pages '09 had an option to not show folio on page one.  Also any idea how to do left and right folios for a Tabloid?  Many thanks  . . .

    Hello jacquemac,
    Your first question:
    There might be a better way of achieving what you wish to do, but following these steps could help you out.
    You might want to blend in Thumbnails and Invisibles either with (cmd+shift+i and cmd+alt+p) or over the View section in the Menubar.
    1. go for Documents (right end of the Toolbar) -> Section
    2. place your cursor at the very top of your second page and click "Create new Section->Starting with this page" in the side bar on your right.
    (what you are actually doing next is setting the pagenumbers for each section you created. You can see your sections in the Thumbnail view.)
    3. click on your first page (the first and only page of your first section) and mark the checkbox "Hide on first page of section"
    4. click on your second page (the first page of your second section) and  "Insert page number" -> start at 1
    Your second question:
    Im not quite sure i understand what exactly you want to do here. One page, two columns, each column with another page number? As far as i know this is not possible.
    greetings jl

  • How to Add custom Attribute in XML

    How to add Custom attribute recusrivly. With sequence order.
    //Before xml:-
    var myxml:XML=
    <root>
    <leval0 >
    <leval1 >
    <leval2></leval2>
    <leval2></leval2>
    </leval1>
    <leval1 >
    <leval2></leval2>
    <leval2></leval2>
    </leval1>
    </leval0>
    </root>
    ////After xml:
    var myxml:XML=
    <root>
    <leval0 levalid="0" >
    <leval1 levalid="0_0" >
    <leval2 levalid="0_0_0"></leval2>
    <leval2 levalid="0_0_1"></leval2>
    </leval1>
    <leval1 levalid="0_1" >
    <leval2 levalid="0_1_0"></leval2>
    <leval2 levalid="0_1_1"></leval2>
    </leval1>
    </leval0>
    </root>

    //call this method
                trace(addAttribute(myxml));
    //method
                private function addAttribute(node:XML, depth:String = ""):XML
                    if (node.hasComplexContent())
                        var count:int = 0;
                        var prefix:String = 0 < depth.length ? depth + "_" : "";
                        var currentAtt:String;
                        for each (var nodeItem:XML in node.children())
                            currentAtt = prefix + count;
                            nodeItem.@levalid = currentAtt;
                            addAttribute(nodeItem,currentAtt);
                            count++;
                    return node;

  • How to add page numbers in Numbers?

    How to add page numbers in Numbers?
    Is there a simple way like in Excel? Thanks.

    In Numbers '09, use Insert > Page Number
    Place the page number in a page header, and it will appear on each age when in Print View and when the file is prnted.
    May have changed in Numbers 3 (current version).
    Regards,
    Barry

Maybe you are looking for

  • How to upload a File in the Enterprise Portal (JAVA)

    Hi, i have a Question. We test the SAPNW2004sJavaSP9 Trial Version and we will upload a File in the SAP Database via the Enterprise Portal user interface. Where should I just to click...? How i can create a new Repository in the Folder Management ? T

  • HP TouchPad Photo and Videos

    I'm having trouble with my Photos and Videos app on my HP Touch pad.  When I open the app I get lines that look like match sticks instead of my photos.  I had this trouble once before and I had the Geek Squad over and they fixed it within a few minut

  • 10.7 Update not working?

    I updated  my iTunes from 10.6 to 10.7 and now when I click my desktop or start menu shortcut it says 'The item 'iTunes.exe' that this short cut refers to has been changed or moved, so this shortcut will no longer work properly'. I have tried repairi

  • Spotlight Doesn't Search Imported Email Folders

    I recently bought a new Macbook Pro 15in. (first Mac) and used PST Converter Pro to convert about 20,000 emails from Outlook on my PC. From what I can tell, the emails seem to be all there and I can read them just fine. I cannot, however, use Spotlig

  • Change'choose helper application' default win7; top answer too vague

    m$7 chooses windows media default and c/n get it to open pdf files w/o hassle. I want to put Adobe acro XI on list and as default for 'choose helper application'. Top question answer [from your search] sounds quite simple but an hour of struggling an