Help me to add numbers

hi all,
  can anybody tell me the logic to impliment following thing in zreport.
eg= number = 12345.
addition = 1 + 2 + 3 + 4 + 5.
result = 15.
please give me the logic to add digits of the number.
thanks in advance.
regds.
Vinod.

Hi Vinod,
The below code will satisfy your requirement.
give any number as parameter, it will give the sum of all digits.
REPORT zkk_sum.
parameters: p_num type i.
data: v_num(30) type c,
        v_length type i,
        v_sum type i,
        v_count type i.
move p_num to v_num.
v_length = strlen( v_num ).
do v_length times.
v_count = v_count + 1.
v_sum = v_sum + ( v_num+v_count(1) ).
enddo.
write:/ 'The Sum of ', p_num, 'is ', v_sum.

Similar Messages

  • Please can you help my Register of names... I want a formula that simply adds numbers in a horizontal row of cells that increase as I add them. Thanks..

    Please can you help my Register of names... I want a formula that simply adds numbers in a horizontal row of cells that increase as I add them. It can not be a range of selected cells  because as I add new cells they are not in the range. Thanks..

    Hi Dave,
    Any formula that references its own row will return the error message you see unless it is in a Header column.
    Convert columns B, C and D to Header Columns, and Jerry's formula will work just fine:
    One caution, though—multiple header columns are a known factor in slowing Numbers down as the table gets larger. You can avoid adding header columns by specifying a 'fixed' range of cells from wich to get the sum and count values in C2 and D2.
    Make sure the range includes at least one 'extra' column. As more runs are added, add columns by inserting them before this 'extra column. If the new columns are inside the range specified in the formula, Numbers will adjust the formula to add the new columns. If they are outside the range, you will need to edit the formulas yourself.
    Note revised formula:
    To add four more runs, click on any cell in column L, then press option-left arrow four times to insert four new columns. Note the change in the formula:
    The last column is always included in the formula, but never gets counted (or summed) because its content is interpreted as a Text value, not a number.
    Note: Except for the change formulas and added columns, this is your original table, with one Header row and one Header column.
    Regards,
    Barry
    Regards,
    barry

  • APERTURE - ADD NUMBERS

    How can I add numbers to the foots.
    I asked the help section, but I cannot find
    Import  (Importübersicht)
    nor name files (Datei benennen).
    I would like to add a name and a number.
    Thanks.

    Do you want to add numbers when importing the photos or afterwards?
    When importing, use the "Rename Files" brick in the Import panel. You may have to add this brick from the "Import Settings" drop-down panel.
    Then use one of the presets that will add an index or counter:
    If the images have already been imported, try the "Metadata" menu:  Metadata > Batch Change > "Custom name with index" or similar.
    All these methods will change the version name in Aperture, but not the original filenames.  If you actually want to change the filenames of the originals, try "Apply to original files" when batch changing the version names.

  • Is there a way to disable/restrict access to Help Restart with Add-ons Disabled or just to Help altogether?

    I have students who use Help>Restart with Add-ons Disabled to disable add-ons, reset things, and go into Safe Mode. I'd like to be able to disable their ability to do so. Is this possible? I am also using a product called Fortres 101, which is a file security application. I can use it to limit file access to read only or even no access. If there are certain files that Firefox uses to allow access to these options, then maybe I can use these file names and make them read only or no access.

    Note that you would only have to hold down the Shift key while starting Firefox to start in Safe Mode.
    Any restriction added via an extension can easily be bypassed by knowledgeable users.
    See also:
    *http://mike.kaply.com/2012/04/10/customizing-firefox-disabling-safe-mode/
    *http://mike.kaply.com/2013/01/11/disabling-safe-mode-in-firefox-17/

  • Help:  How to add a library item to hide the default Window menu

    Hi,
    In this post: Help: How to add a library item to hide the default Window menu, it described how to create an menu that will hide the default window menu.
    I'd like to know if there a way to put this component into library so that others can directly inherit this menu in other FORMS and how to implement it.
    Jimmy

    Hi,
    I found the solution and the post was not properly phrased. There is no need to add menu into library. All we need is to put the compiled menu into Oracle AS and add the menu name the menu module of the given form.
    Thanks.
    Jimmy

  • Can I use iPad to record excel inventory figures? I have excel on my mac. But run around taking inventory on iPad. Want to add numbers on pad as I go. Please advise oh smart Apple peeps!

    Can I use my iPad to record excel inventory figures? I have excel on my Macbook Air and have Mavericks on it. But I use the iPad when I run around taking inventory. The computer is just too large and cumbersome to carry while walking around. I Want to add numbers to my excel docs whilst right on my ipad as I go through inventory.
    Is there a way to get my excel doc into my iPad and open it to add numbers?
    And, because Mavericks is now the system that allows iPad (ios) devices to talk to Mavericks on macs, isn't this supposed to now be doable?
    And, woe is me if not yet at this time. If so, is there an Application some smart person created that will allow me to transfer from mac to ipad and back to mac and excel numbers I input?
    Muchos gracias!

    You will need Numbers (On your Mac) and then you can do what you wish.

  • Plz help: how to Add a lens profile ? (mac)

    hello
    i am having problems with the lens profile.
    i am working with raw images and when i open in phoshop cs6 (on Mac) and click on lens correction
    cant detect what lens i m using (is the canon 16-35 mm) it just gives me option from other canon lens but not this one
    when i click search online - doesnt work as well.
    i even downloaded the Adobe lens profile downlaoder and find the profile for the lens and downloaded it but still doesnt apper in photoshop lens correcton.
    when i open the image in lens correction in the info box under the image gives all the correct info what camera and lenses are used !! but why there isnt any lenses avalable to select when tried to edit the image??
    please help how to Add a lens profile from Adobe lens profile downlaoder or how to add in anather way  canon lenses.
    thank you

    can anyone help please?

  • Help, need to add a delete button to my application?

    i have a little application that you can add numbers and friends email too
    i would like to add a minus selection/entry button?
    do any of you guys have any ideas?
    stop();
    //create a new sql connection
    var conn:SQLConnection= new SQLConnection();
    //add an event handeler for the open event
    conn.addEventListener(SQLEvent.OPEN, openHandler);
    //create the database if it doesn't exist, otherwise just opens it
    var dbFile:File =File.applicationDirectory.resolvePath ("exemplu.db");
    conn.openAsync(dbFile);
    function openHandler(event:SQLEvent):void {
    //create a new sql statement
    var sql:SQLStatement=new SQLStatement();
    //set the statement to connect to our database
    sql.sqlConnection=conn;
    //parse the sql command that creates the table if it doesn't exist
    sql.text= "CREATE TABLE IF NOT EXISTS contacte(" +
    "id INTEGER PRIMARY KEY AUTOINCREMENT, " +
    "nume TEXT, " +
    "telefon INTEGER)";
    //add a new event listener to the sql when it completes creating the table
    sql.addEventListener(SQLEvent.RESULT,retrieveData);
    //call the execute function to execute our statement
    sql.execute();
    function retrieveData(event:SQLEvent = null):void {
    //create a new sql statemant
    var sql:SQLStatement = new SQLStatement();
    sql.sqlConnection=conn;
    //this sql command retrieves all the fields from our
    //table in the database and orders it by name
    sql.text =  "SELECT id, nume, " +
    "telefon " +
    "FROM contacte ORDER BY nume";
    //add a new event listener if there is data
    //to display it
    sql.addEventListener(SQLEvent.RESULT, selectHandler);
    sql.execute();
    function selectHandler(event:SQLEvent):void {
    //first we clear our list
    lister.removeAll();
    //the we create a result variable that holds
    //all our contacts
    var result:SQLResult=event.target.getResult();
    //we check if results is not empty
    if (result!=null&&result.data!=null) {
    //and we add a new item to our list for
    //each contact in our database
    for (var i:Number = 0; i < result.data.length; i++) {
    lister.addItem ({ label:result.data[i].nume + "-" +result.data[i].telefon
    , nr:result.data[i].id });
    plus.addEventListener(MouseEvent.CLICK,adder);
    xu.addEventListener(MouseEvent.CLICK,closeapp);
    back.addEventListener(MouseEvent.MOUSE_DOWN,drag);
    //because my buttons are not real buttons
    //but movieclips i need to set the
    //buttonMode property to true
    plus.buttonMode=true;
    xu.buttonMode=true;
    function adder(e:MouseEvent):void{
    //remove the eventlistener and move to the
    //next frame
    plus.removeEventListener(MouseEvent.CLICK,adder);
    nextFrame();
    function closeapp(e:MouseEvent):void {
    //close the application
    NativeApplication.nativeApplication.exit();
    function drag(e:MouseEvent):void {
    //drag the application
    this.stage.nativeWindow.startMove();
    this is on the second key frame-
    //this line restricts the user input
    //to just numbers in the phone input box
    //add a new event listener to our plus button
    plus.addEventListener(MouseEvent.CLICK,adder2);
    function adder2(e:MouseEvent):void {
    //create a new sql statement variable
    var sql:SQLStatement=new SQLStatement();
    sql.sqlConnection=conn;
    //the next sql command creates a new entry
    //in the table contacte from our database
    sql.text =  "INSERT INTO contacte(nume, " +
    "telefon)" +
    "VALUES(@nume, " +
    "@telefon)";
    //to insert variables into sql commnads
    //we use the parameters definition
    sql.parameters["@nume"]=nume.text;
    sql.parameters["@telefon"]=tel.text;
    //add a new event listener that calls the
    //function that retrieves the data
    sql.addEventListener(SQLEvent.RESULT,retrieveData);
    sql.execute();
    //go to frame no. 1
    prevFrame();
    //remove the eventlistener from our plus button
    plus.removeEventListener(MouseEvent.CLICK,adder2);

    use:
    minus_btn.addEventListener(Event.MouseEvent,CLICK, clear)
    function clear(e:MouseEvent){
    var sql:SQLStatement = new SQLStatement();
    sql.sqlConnection = conn;
    var s:String = "DELETE from contacte WHERE nume= :numeparam AND telefon=:telefonparam";
    sql.text = s;
    sql.parameters[":numeparam"] = whatever;
    sql.parameters[":telefonparam"] = whatever else;
    //add listeners if you want
    sql.execute();

  • I have worked many hours on an iphoto book and I am up to page 29.  I cannot add any more pages and I need to!  Please help!!  "Add page" is not working!!!

    I have worked many hours on an iphoto book and I am up to page 29.  I cannot add any more pages past that and I need to!  Please help!!  "Add page" is not working!!!

    Fixed it thanks to similar questions and answers to them.  Thanks all!

  • Help please with Page Numbers & Facing Pages in Book Layout

    I am having some dramas with my book project which is 168 pages including cover.  I have created 22 different documents for the chapters and other pages.  I had everything in a book and have been able to create a PDF, but then I needed to remove the cover so it can be printed separately and to change the page numbering to start at 1 after the contents page.
    When I added numbers after the Contents page, it pushed all the pages out of order - ie what was previously sitting on the left was now sitting on the right etc.
    Removing the cover also impacted on individual spreads.
    Since then I have:
    - Updated my program to resolve an issue where Indesign kept shutting down when I tried to change page numbers.
    - Recreated the book twice, but find the spreads are all out of whack as I add them - doesn't appear to be auto paginating.
    - Called Adobe and got given tutorials that have not helped me resolve the issue because I have followed the tutorials but it hasn't resolved the issues I am having.
    Is there a way that you can stop autopagination and tell the pages which side they need to be on?  I currently have one chapter finishing on an even number of pages and the next starting on an odd, even though there are an even number of pages in that chapter, which is bizarre?  How do I fix this please?
    I would sincerely appreciate anyone who can tell me how to fix this.  I have read and watched so many tutorials showing how to set it up but there doesn't appear to be any that help with trouble shooting when you have followed the process but something bizarre happens.
    Is there a way that you can dictate the sides that the pages should be on?  Can you turn off the auto pagination anywhere?  This is an urgent request.
    Thanks,
    Hayley
    PS  I started in CS6 and am now using CC.

    A few things to consider:
    Not all books are the same, but many begin on page one, which is a right page, and as it follows, all odd pages will be on the right with even pages on the left. If your book had the cover as part of the book, I wonder if that meant that your first page was on the left?
    Books leaves hold two pages (front and back), and therefore book page counts need to be divisible by two. You say your book is 168 pages including the cover, which you moved to another document, leaving 167 book pages. If you were counting the back page, that might make for a 166 page book, which would be OK, but depending on how it will be printed, the page count may need to be divisible by 4, 8, 16, or higher, and the printer may need to add blank pages to get to the correct page count. Can you tell us how your book will be produced?
    Many people like to keep  their chapters in even-numbered page count, so that new chapters may start on the right. This sometimes requires you to have a blank left-sided page at the end of some chapters. This blank page is sometimes labeled "This page intentionally left blank" or some such wording (so as to let the reader know there wasn't a misprint), but isn't strictly necessary. Sometimes an ornament in the center of the page will do the same job.
    Do you think these are things you would like to have in your book, or are you opposed to them for any reason? The answers may narrow the advise you get from the forum users.

  • Please help! Will iWorks Numbers work with XLS or Excel Spreadsheets

    A friend of mine wants me to make her a spreadsheet and I use a PC with MS Office Excel. My question is... Will she be able to use and view a .xls spreadsheet on her new Mac? She has either Iworks Numbers 2008 or 2009. I'm not absolutely sure. I know it's a new computer. The spreadsheet will be fairly basic and the formulas will be simple addings for misc. expenses.
    Please let me know if this will work.

    Thanks! The spreadsheet I made is a basic list for expenses that automatically adds the entered amounts in each column to sum up the individual expense. I also have a column on the right that adds the amounts entered in each row. Lastly I have one cell which provides a grand total of all expenses combined.
    From your reply I'm afraid I will have to make a road trip. As my friend lives quite a distance from me. I was hoping to simply create and email the Excel file to her. With my formulas to you think they will conflict with Iworks Numbers? How much different is Mac Numbers to Excel? I have never seen or used it. The formulas I used are simple =SUM(X:X)formulas and the first calculating cell I have set is not A1 but D4 etc.
    I'm sorry to have so much to ask but will the layout stay the same and what will happen to any protection settings I set?
    Thanks again for all your time and help to everyone who replied! It's much appreciated!

  • Help with update,add, delete records

    Hi every one,
    This is a problems that I have been trying to figure out for
    a little while now and I hope you all can help me out. So this is
    the situation.
    I am useing CFX XLS 2 Query to create a query from an excel
    doc I have. Now my problem is how can I loop through and delete the
    records that no longer are in the spreadsheet?
    So in other words my client will be uploading a new XLS each
    day, this xls will have some new data, some of the same and some
    will be gone. So I need the system to check and see if the
    stocknumber is there, if it is it will just update that record, now
    if the record is new it will add the record but for the life of me
    I can't figure out how it can delete record.
    I had thought maybe doing a select where the stock numbers
    dont match but that didnt work out too well :)
    Thanks for any help you may be able to provide

    You could consider using ValueList() to create a list of
    stocknumbers from your excel query, then do something like this:
    <cfset sCurrentStockNumbers =
    ValueList(myQuery.stocknumber)>
    <cfquery name="removeStockNumbers"
    datasource="myDataSource">
    DELETE from myTable
    WHERE stocknumber NOT IN (<cfqueryparam
    value="#sCurrentStockNumbers#" list="Yes">)
    </cfquery>

  • Help Can not add music to library

    When i go to file- add file to library- and select the file(playlist) from windows media play it doesnt do anything no error message or anything. I am not good with computers so i need help. All the songs are mp3's. I dont know what to do.

    When i go to file- add file to library- and select the file(playlist) from windows media play
    Make sure that you are adding actual files - not a windows media player 'playlist'.
    1. Locate where you store the music files that you want (on your computer)
    2. Select the file(s) or album folder
    3. Move the file(s) to your iTunes library on your computer (usually: C: My Documents/My Music/iTunes/iTunes Music)
    4. In iTunes: File > Add File to library ....Or Add Folder to library > locate the files, select them and add.
    Note: It's best to chose a Media Player that you fancy the most to handle your media. If you use two media players to play the same files - then it may cause a conflict between them resulting in duplicate files, files that are not found and automatic renaming of files etc.
    Good luck

  • Can you help me to add my MP620?

    Hi PAHU,
    Hi Kappy,
    Hi all,
    I've tried w/o success to setup my MP620 over Wifi after upgrading from Leopard to Snow Leopard.
    PAHU and Kappy, you helped me to configure my printer over my "internet sharing network" with Leopard... I still have the same configuration: an iMac connected to the Internet via 3G USB Modem, a Wifi network through the integrated iMac Airport - generated by the internet sharing option. Printer IP set up according to the private network 10.0.2.10...
    The changes are that I've updated the OS to 10.6.1 with Canon Printer Drivers Update 2.1.
    Even with those latest update, I couldn't see the printer in the "Add Printer>default" window.
    So, I decided to download the latest driver from Canon and all other useful goodies.
    I still do not see the Wifi Printer in the Add Printer window BUT the scan works fine, and when I use "Canon IJ Printer Utility" I have access to the printer via Wifi and can do the maintenance!
    If "Canon IJ Printer Utility" can see the printer why Snow Leopard can't? Where are my mistakes?
    Thanks for your help!
    Stef

    Hi Pahu,
    Hi all,
    I didn't reverse to you since Pahu wrote his feed-back because suddenly I managed to add the printer with MAC address on the Internet sharing generated WiFi network. I also let the question open on purpose because I felt that it was not really... ok.
    One day, out of the bleu, the printer appeared under the add printer menu (I let the window open overnight). I added it quickly and was very happy to be able to print remotely. This good news pushed me to upgrade the MBA to Snow Leopard 10.6 then 10.6.1 + Canon printer drivers 2.1. I connected the printer directly and it was just perfect. Not long after that, I tried to print from the iMac and then get a pop-up message: "communication failure" ??? I decided (may be a bit I a rush) to delete and then add the printer again... wrong decision! Since then, I haven't be able to add the printer back. It still works fine with the USB cable and from the MBA (over WiFi generated from the iMac's Internet sharing) but still impossible to get it works wirelessly from the iMac. Meanwhile I have updated the driver to 10.26.1.0, the scanner works fine, the printer utility finds the wireless printer and I can clean the heads, check the ink levels, print the test pages,... but no wireless printer queue are available!
    Any advices?
    Stef

  • Need help to Open my Numbers worksheets!

    I am trying to open a Numbers Worksheet that I worked on as recent as two days ago and a box pops up and it says that I have to have the newer version of Numbers to open it. When I click on the newest version of Numbers in the App Store, it says that I have already installed it. Help!

    Make sure you are trying to open the document with the version of Numbers that is in your main Applications folder, not the version of Numbers that is in a subfolder named iWork '09.
    It is likely that any icons you have on your dock are still pointing to the old version. So, even though you think you ae using the new version, actually you activating the old version.
    The old and new Numbers can coexist happily on your Mac.  You just need to take care that you are using the correct version to open any particular document.
    SG

Maybe you are looking for

  • Updation of Table EDPAR

    Hi all , Can anybody tell how table EDPAR can be updated or changed any transaction for that ?? Thanks in Advance , Vivek K

  • My mom's iPad 2 is not able to be re-activated after I restore it for my brother, it's new owner. Help?

    My mom is giving her old iPad (iPad Second Generation) to my older brother (a new apple user, hehe). However, after I restored everything he wasn't able to activate it, because it asks him to type the first my mom's Apple Id (s•••••@me.com). The is t

  • Business Objects Merge Dimension

    Dear All, I have three data providers in Webi as per mentioned below Query1- emp no,emp name,city Query2- emp no,dept no,dept name Query3- dept no,loc As per user requirement I need to show the data in webi report mentioned below empno     emp name 

  • Simple sqlloader query

    How can I pass dynamic file name from a directory to sqlldr as data file name. I have the following file, d:\test\test_01.dat The file name changes to test_02 then to test_03 or may be test_xyz.dat, how can I pass this dynamic file name to sqlldr scr

  • Problems with saving in InDesign

    why InDesign didn't save my file? and how to locate a recovery file if there is any?