How can I sum all the amount per line?

HI,
How can I sum all the amount per line?
EXAMPLE:
[code]
                                         TOTAL:
1,000         2,000     5,200            $8,200
  400         1,200     6,000             7,600
[/code]
THANKS!!

If you are sure of the number of columns that you are gonna get then you can add them to a variable and display.
total = itab-col1 + itab-col2 + itab-col3.
If you dunno how many columns will come , you have to use field symbols.
Say the datatabse table has 16 columns which will contain your price and you have to calculate the sum of all those , then assign them to field symbols and calculate.
Have a look at the following code.
FORM GET_VALUES_FROM_COSS .
  FIELD-SYMBOLS: <FS1> TYPE ANY.
  DATA: V_COMPONENT1 TYPE I.
  V_COMPONENT1=31.  " your field of table from which amount field starts
Cumulate the posting values of all the 16 period buckets as to get
total production order cost. This is to handle the partial posting of
production order values in different periods.
  DO 16 TIMES.
    ADD 1 TO: V_COMPONENT1.
    ASSIGN COMPONENT V_COMPONENT1 OF STRUCTURE COSS TO <FS1>.
    IF COSS-WRTTP EQ '05' AND COSS-KSTAR EQ C_KSTAR1.
      ADD <FS1> TO I_FINAL-PL_LABCOST.
    ELSEIF COSS-WRTTP EQ '04' AND COSS-KSTAR EQ C_KSTAR1.
      ADD <FS1> TO I_FINAL-ACT_LABCOST.
    ELSEIF COSS-WRTTP EQ '05' AND COSS-KSTAR EQ C_KSTAR2.
      ADD <FS1> TO I_FINAL-PL_MATCOST.
    ELSEIF COSS-WRTTP EQ '04' AND COSS-KSTAR EQ C_KSTAR2.
      ADD <FS1> TO I_FINAL-ACT_MATCOST.
    ELSEIF COSS-WRTTP EQ '05' AND COSS-KSTAR EQ C_KSTAR3.
      ADD <FS1> TO I_FINAL-PL_OPCOST.
    ELSEIF COSS-WRTTP EQ '04' AND COSS-KSTAR EQ C_KSTAR3.
      ADD <FS1> TO I_FINAL-ACT_OPCOST.
    ELSEIF COSS-WRTTP EQ '05' AND COSS-KSTAR EQ C_KSTAR4.
      ADD <FS1> TO I_FINAL-PL_FACCOST.
    ELSEIF COSS-WRTTP EQ '04' AND COSS-KSTAR EQ C_KSTAR4.
      ADD <FS1> TO I_FINAL-ACT_FACCOST.
    ELSEIF COSS-WRTTP EQ '05' AND COSS-KSTAR EQ C_KSTAR5.
      ADD <FS1> TO I_FINAL-PL_LABCOST.
    ELSEIF COSS-WRTTP EQ '04' AND COSS-KSTAR EQ C_KSTAR5.
      ADD <FS1> TO I_FINAL-ACT_LABCOST.
    ELSEIF COSS-WRTTP EQ '05'.
      ADD <FS1> TO I_FINAL-OTHER_PL_COST.
    ELSEIF COSS-WRTTP EQ '04'.
      ADD <FS1> TO I_FINAL-OTHER_ACT_COST.
    ENDIF.
  ENDDO.
ENDFORM.                    " GET_VALUES_FROM_COSS
Let us know if u need more inputs

Similar Messages

  • How can i findout all the payement servicetax line items?

    Hello Experts,
    How can i find out all the clearing document numbers which are consisting servicetax in a particular month?
    Ex:lets say,1 st aug to 31 st aug-08/what ever payments i have done that generates a clearing doc.no.right?now my requirement is to findout all the clearing doc nos in a particiular month and that payment shud consist service tax.it is to know the total servicetax sredit amount in a particular month?
    Is it possible to know?
    plz suggest?
    its highly requirement.
    Regards,
    biswa

    Hello Experts,
    How can i find out all the clearing document numbers which are consisting servicetax in a particular month?
    Ex:lets say,1 st aug to 31 st aug-08/what ever payments i have done that generates a clearing doc.no.right?now my requirement is to findout all the clearing doc nos in a particiular month and that payment shud consist service tax.it is to know the total servicetax sredit amount in a particular month?
    Is it possible to know?
    plz suggest?
    its highly requirement.
    Regards,
    biswa

  • How can I delete all the email from a user's account?

    I have a user account with a huge amount of mail (around 50K messages) that Apple Mail can't deal with... it constantly hangs and/or crashes whether I use POP or IMAP to try and delete all the mail from the client.
    How can I delete all the mail from the mailbox on the server? I don't want to delete the account entirely, I just want to empty everything out of it.
    Thanks!

    sudo -u _cyrus /usr/bin/cyrus/bin/ipurge -d 0 -f user/mailboxname
    HTH,
    Alex

  • How can i print all the contect of the code in sapscript window ? ?

    how can i print all the contect of the code in sapscript window ? ?

    Hi,
    Do you mean that you want to print the ABAP code to SAPscrip form ?
    Svetlin

  • How can i print all the tab pages not just the first page (tab)

    how can i print all the tab pages not just the first page (tab)

    You would need to do this programmatically. Here's one way:
    Attachments:
    Example_VI_BD6.png ‏3 KB

  • I am running out of memory on my hard drive and need to delete files. How can I see all the files/applications on my hard drive so I can see what is taking up a lot of room?

    I am running out of memory on my hard drive and need to delete files. How can I see all the files/applications on my hard drive so I can see what is taking up a lot of room?
    Thanks!
    David

    Either of these should help.
    http://grandperspectiv.sourceforge.net/
    http://www.whatsizemac.com/
    Or search 'disk size' in the App Store.
    Be carefull with what you delete & have a backup BEFORE you start, you may also want to reboot to try to free any memory that may have been written to disk.

  • When creating a book how can I get all the photos from an album to show up in the order they were in the album?

    When creating a book in iphoto, how can I get all the photos from the album I want to use to show up in the order that they are in the album?  When I tried to use the option to add my own photos instead of having the program "flow" them, they showed up all mixed up.

    iPhoto puts them in the book in chronological order.  So to get your photos from an album into an iPhoto book in the same order you will need to use the Photos ➙ Batch Change ➙ Date menu option and set them all to the same date with a 1 minute time difference between each. 
    OT

  • TS4124 Hi, do you know how can I upload inelegible songs from itunes to Icloud. They are songs added from original CDs. Another question would be how can I transfer all the music I have in my Ipod Classic to my Itunes or ICloud as I want to back it up.

    Hi, do you know how can I upload inelegible songs from itunes to Icloud. They are songs added from original CDs. Another question would be how can I transfer all the music I have in my Ipod Classic to my Itunes or ICloud as I want to back it up.

    Depends on why it's ineligible.  If it's under 96 Kpbs, try right-clicking on the file and choosing Create AAC Version.  (If you don't see this option, go to iTunes>Preferences, click "Import Settings..." then choose "Import Using: AAC Encoder" and "Setting: iTunes Plus".)  Then rescan your library to see if this version will add to iTunes Match.  Or, after changing your import setting, just re-import the song to your iTunes library.
    If the song is over 200 MB you would have to reduce it's size to make it eligible.

  • How can i display all the query items to a table?

    how can i display all the query items to a table in a jsp file?
    i always have an out of memory error..

    any body??any idea?
    is it possible thru configuration or i have to write a program by the abaper??
    Biswa

  • How can I copy all the comments from my picture/s in fotostream to my picture/s in my library?

    How can I copy all the comments from my picture/s in fotostream to my picture/s in my library?

    Hi, first, you should prevent the iTunes library auto sync with iPhone: Launch iTunes > click Preferences... > click Devices. In the window, check the option 'Prevent iPods, iPhones, and iPads from syncing automatically'. Next, connect your iPhone with your computer via the USB cable. Click the mini menu for iTunes on the very top left and click the option 'Show menu bar'. After then you can see iTunes File, Edit, View, Control, Store and Help menus on the ribbon. Click File > Devices > Transfer purchases from (your iPhone name). You can also access to the File menu by holding down Alt (Option on Mac), Shift and F keys. This is how to get your iPhone purcahsed song transferred to iTunes Library.

  • How can I display all the columns on the screen without scrolling from side to side?

    My clinic software has many columns. How can I display all the columns without having to scroll from left to right all the time?

    If the software you are using doesn't offer the ability to increase or decrease document size, as many do, then the only way is to increase your screen resolution. If that's not possible, maybe you can decrease your font size?  If you can't do any of these, I think you're out of luck!

  • Multiple calendars have appeared on my Iphone and I am unable to sync all of them to my PC, running Windows 7 and Office 2010. How can I sync all the calendars to my PC, or, merge the calendars on the Iphone so there is only 1 calendar to sync?

    Multiple calendars have appeared on my Iphone and I am unable to sync all of them to my PC, running Windows 7 and Office 2010. How can I sync all the calendars to my PC, or, alternatively, merge the calendars on the Iphone so there is only one calendar to sync?

    If the hard drive that crashed is the one that stored the itunes library, be sure to restore the library from Time Machine (mac) or whatever backup you use on windows.  That will get back your music.  I suspect that the replacement drive has an empty itunes library and thus, perhaps, the itunes match used that to sync to its servers.
    Try posting in the iTunes Match forum, you'll probably find more knowledgeable folks there.
    https://discussions.apple.com/community/itunes/itunes_match

  • How can I delete all the files in the Adobe CS4 Master Collection from my machine?

    How can I delete all the files in the Adobe CS4 Master Collection from my machine. I have tried Control Panel but it will not do anything, there are no error messages, it is like as if it is ignoring my instruction. Why should it be so difficult to delete programs one does not want. Any ideas please.

    Moved from Cloud forum to Downloading, Installing forum
    Try running the Adobe Cleaner Tool
    http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html

  • How can you delete all the e mail at one time instead of one at a time?

    How can you delete all the e mail at one time instead of one at a time?

    you'd have to do it from the computer,

  • How can I clean all the junk files from my iMac so that it can run faster?

    How can I clean all the junk files from my iMac so that it can run faster? Its been slowing down ever since I started using it.

    Before doing anything, we might be able to help with your iMac issues here.
    Please download, install and run Etrecheck.
    http://www.etresoft.com/etrecheck
    Copy/paste its report here in another reply thread so that we have a complete profile of your Mac's hardware and installed software.

Maybe you are looking for

  • OnPageRender method Issue in ADF Faces

    Hi, We are using onPageRender method to get user details to use in the page. onPageRender method is working and getting values when we run the page from jDeveloper. The same application when deployed in OC4J, onPageRender method is not working values

  • HT201415 iPad with problemm

    I decided to write a lot more to understand that Apple need to know how and can be disappointed with a product. The exact 12 months made a purchase of a product believed to be top of the line and reconhecidissimo the market. I searched and understood

  • Refresh function - RSS as Rest again

    Hello, Maybe by design but I noticed some strange behaviour When using Refresh(rss!channel!item) (e.g. refresh RSS when used as REST) it doesn't actually refresh the data or at least it's not visible in the gallery displaying the data. No errors, vie

  • Installation Stops Responding

    Hello. I have been trying to install Solaris 10, and I am afraid that I need some assistance. Onto some brand new CD-RWs, I have burned the x86 ISOs. The basic problem is that the installation keeps getting hung. It is very sporadic, freezing at diff

  • Downloading earlier versions of Elements

    Where can I download (buy) earlier versions of Photoshop Elements? I am running an iMac with OS 10.6.8. I used to have Elements 6.0 when I was running Tiger, but have recently upgraded to Snow Leopard. My iMac cannot handle Lion or higher.