Get the totals in abap with cl_salv_table

Hi people,
i need yor help..
I need to obtain the TOTALS in abap and compare them with another ALV.
The totals is showing in the alv, but i need to see it in my debug or my program in save it in a variable.( lv_total)
DATA: lv_total TYPE REF TO CL_SALV_AGGREGATION.
TRY.
         CALL METHOD lr_aggregations->add_aggregation
           EXPORTING
             columnname  = 'DMBTR'
             aggregation = if_salv_c_aggregation=>total
             RECEIVING
              value      = lv_total.
       CATCH cx_salv_data_error .                        "#EC NO_HANDLER
       CATCH cx_salv_not_found .                         "#EC NO_HANDLER
       CATCH cx_salv_existing .                          "#EC NO_HANDLER
     ENDTRY.
Hope your helps
Thanks

Finally i did it, as you said..
i did the calculation itself over the internal table,.
I just wanted to know if the method gives the totals, with no necessary calculation over the internal table..
Regards

Similar Messages

  • How can I get the total "values" in a hashtable ?

    i know that i can get the total values in a hashtable by hash.elements() method. It returns an
    enumeration with all the values present in this hashtable. this is fine upto here.
    Now the preoblem is:
    According to what rule this enumeration will be returned. I mean..
    If i added in key A with value a,
    then key B with value b;
    then key C with value c;
    then key D with value d;
    (They all are objects of type String)
    now i call ... hash.elements(); Suppose it returns Enumeration enum;.
    Now in what order they all are present in this hashtable.
    Meaning is that if i move arond this enum in what sequence they all will be returned.
    option A ) In the same order as they were inserted in hashtable.
    option B ) According to LIFO;
    option C) There is no fix rules , simply it return all the elements and u cannot judge that the first element in enum was really the first element inserted in the hashtable and the second element of enum was really the second element inserted in the hashtable.
    What do u think..which option is correct ?
    Ny idea will highly appreciated.
    Thanks in advance.
    Sanjeev Dhiman

    hi, i am again..
    boss ! this is not true..u just change the order and or change the keys and something like ...
    "Sanjeev", "hello"
    "Dhiman", "hi"
    "Technosys" ,"Services"
    u will find that its not LIFO..really i was thinking before coding my project that option A is correct and with knowledge i wrote 3 - 4 classes but when i run the programm its starts throwing errors.
    so, i posted this question. I think "apppu" is right.
    I think , firstly hash is calculated for each value and that value is returned which can be received in a fastest way and hence not necessarily in LIFO and FIFO..
    Thanks to u also as u gave ur precious time for me.
    Once again.
    Thank you very much.
    Sanjeev Dhiman

  • How to get the total record count in ODI

    Hi
    I have the interface the are file to DB.
    The format is like this..
    HEADER
    DETAIL
    TRAILER
    Now will write the contains of file to DB,
    But i have to insert the total count ie numberof record written from file to DB in my Trailer record.
    can you tell me how can i get the total count of records in file and write it to trailer?
    Also, I want the interface to rollback the data if something fails will loading the data from file., ie. if there are 100 records in file and 50 got transfer and something fails i want to rollabck the 50 records from DB.???
    Thanks :)

    Hi
    You can design a flow for Full load flow and incremental flow from flat file to Table.
    Create a table at target database like.. (create table with last_execution and palce the V_FULL_LOAD value and LAST_EXECUTION_DT columns in last_execution table)
    Add faltfile as table in model, create a variable as V_FULL_LOAD and make sure that the default values is 01-01-1900
    Create one more variable like V_LAST_EXECUTION_DATE (in this variable write a case statement that if V_FULL_LOAD value is 'Y" then full load should happen and same time you should check that V_FULL_LOAD column is balnk then write insert statment else write update statement to update last_execution_dt column, similar for 'N')
    please provide your *personal mail ID*, i will send a doc file realted to your query.
    we have to tables present in work repository (SNP_STEP and STEP_LOG tables) using tables we can get how many records are inserted/updated and we can find how many records are not transfer and gor error.
    Thanks
    Phani

  • How To Get The Total Delivered Quantity of a Sales Order

    Hello All,
    I have a requirement of getting the total delivery quantity of the sales order .I have checked it in LIps table but I am getting partially delivered quantity for a schedule line item.Can any one tell me how to get the total delivered quantity.
    Regards,
    Pavani.

    Hi
    Check the Table:
    VBEP  - Sales Document: Schedule Line Data.
    Inside the table check the Quantity Fields.
    Regards,
    Sreeram

  • How to get the total execution time from a tkprof file

    Hi,
    I have a tkprof file. How can I get the total execution time. Going through the file i guess the sum of "Total Waited" would give the total time in the section "Elapsed times include waiting on following events:"
    . The sample of tkprof is given below.
    SQL ID: gg52tq1ajzy7t Plan Hash: 3406052038
    SELECT POSTED_FLAG
    FROM
    AP_INVOICE_PAYMENTS WHERE CHECK_ID = :B1 UNION ALL SELECT POSTED_FLAG FROM
      AP_PAYMENT_HISTORY APH, AP_SYSTEM_PARAMETERS ASP WHERE CHECK_ID = :B1 AND
      NVL(APH.ORG_ID, -99) = NVL(ASP.ORG_ID, -99) AND
      (NVL(ASP.WHEN_TO_ACCOUNT_PMT, 'ALWAYS') = 'ALWAYS' OR
      (NVL(ASP.WHEN_TO_ACCOUNT_PMT, 'ALWAYS') = 'CLEARING ONLY' AND
      APH.TRANSACTION_TYPE IN ('PAYMENT CLEARING', 'PAYMENT UNCLEARING')))
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute    442      0.08       0.13          0          0          0           0
    Fetch      963      0.22       4.72        350      16955          0         521
    total     1406      0.31       4.85        350      16955          0         521
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 173     (recursive depth: 1)
    Number of plan statistics captured: 1
    Rows (1st) Rows (avg) Rows (max)  Row Source Operation
             1          1          1  UNION-ALL  (cr=38 pr=3 pw=0 time=139 us)
             1          1          1   TABLE ACCESS BY INDEX ROWID AP_INVOICE_PAYMENTS_ALL (cr=5 pr=0 pw=0 time=124 us cost=6 size=12 card=1)
             1          1          1    INDEX RANGE SCAN AP_INVOICE_PAYMENTS_N2 (cr=4 pr=0 pw=0 time=92 us cost=3 size=0 card=70)(object id 27741)
             0          0          0   NESTED LOOPS  (cr=33 pr=3 pw=0 time=20897 us)
             0          0          0    NESTED LOOPS  (cr=33 pr=3 pw=0 time=20891 us cost=12 size=41 card=1)
             1          1          1     TABLE ACCESS FULL AP_SYSTEM_PARAMETERS_ALL (cr=30 pr=0 pw=0 time=313 us cost=9 size=11 card=1)
             0          0          0     INDEX RANGE SCAN AP_PAYMENT_HISTORY_N1 (cr=3 pr=3 pw=0 time=20568 us cost=2 size=0 card=1)(object id 27834)
             0          0          0    TABLE ACCESS BY INDEX ROWID AP_PAYMENT_HISTORY_ALL (cr=0 pr=0 pw=0 time=0 us cost=3 size=30 card=1)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                       350        0.15          4.33
      Disk file operations I/O                        3        0.00          0.00
      latch: shared pool                              1        0.17          0.17
    ********************************************************************************

    user13019948 wrote:
    Hi,
    I have a tkprof file. How can I get the total execution time.
    call count cpu elapsed disk query current rows
    total 1406 0.31 4.85 350 16955 0 521TOTAL ELAPSED TIME is 4.85 seconds from line above

  • HT2967 I have an iPhone and keep my calendar into it.  I have synced all photos. How do I get the calendar to sync with my MacBook Pro?

    I have an iPhone and keep my calendar into it.  I have synced all photos. How do I get the calendar to sync with my MacBook Pro?

    Enable iCloud on both, and Calendars on the iPhone should sync with iCal on the Mac wirelessly.

  • Do any one know how much it is to get the new ipod touch with the camera if you trade in your old ipod touch?

    do any one know how much it is to get the new ipod touch with the camera if you trade in your old ipod touch?

    Sounds like you need a new battery.  I would make an appointment at the Genius Bar of an Apple store to confirm.  Apple will replace the battery for $79.  A third-party place like the folloing may be less expensive.  Google for more places.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
    You can also replace it yourself if you are so inclined.  For parts and instruction:
    iFixit: The free repair manual

  • How to get the total number of pages printed in a report?

    Hi All,
    I have a requirement where I need to print a frame of fields only in the last page. Unfortunately I cannot use the 'Print Object On' property as it doesnt work in my case. So, I am planning to write a format trigger on the frame to return TRUE if the page is the last physical page. Now, I need to know how to get the total number of physical pages that will get printed in the report so that I can use this to manipulate the frame. I was planning to use the 'Total Physical Pages' built-in, but it seems like I can just use it to print in a field and I can't use this field's value anywhere in the plsql code (formula column function/format trigger) in the report. Is there anyway to get the total number of pages printed in the report which can be used in the report plsql code?
    Thanks,
    Srini.

    i found the solution, thanks

  • How to get the total pages in ALV report?

    Hi guys,
    Since I used page breaks can somebody please help me on how to get the total pages in ALV report?sincerely please...thanks guys.

    automatic display total page.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    r

  • My iPad conveys that it is disabled, and that I need to connect to iTunes.  When I connect to iTunes I get a message that I need to enter my pass code and open my Ipad, but I don't get the screen to open with a password.  How do I fix this?

    My iPad conveys that it is disabled, and that I need to connect to iTunes.  When I connect to iTunes I get a message that I need to enter my pass code and open my Ipad, but I don't get the screen to open with a password.  How do I fix this?

    You will need to restore it. It may not sync, but the iPad's sidebar has to appear you can restore it and it will be as the last time ou synced it to iTunes. For more info:
    iTunes: Backing up, updating, and restoring your iPhone, iPad, or iPod touch software

  • When I receive calls I always get the option to remind me later, but only certain times I get the option to respond with text.  Is there a setting I need to update to always get this option?

    When I receive calls I always get the option to remind me later, but only certain times I get the option to respond with text.  Is there a setting I need to update to always get this option?  Also i can't use location reminders.  Is this because my calendar is in Outlook?

    The only known way to make it work on an external drive is by first installing Windows onto an internal drive, then cloning the install to an external Thunderbolt drive. Thunderbolt is seen as an extension of the internal bus, so Windows doesn't see it as an external device.

  • When I select a title in the iTunes Store and click on Play in iTunes I am sent to the download page for iTunes 10 which I have already. The selected title cannot be found anywhere in my iTunes. How can I get the title in iTunes with possibility to buy it

    When I select a title in the iTunes Store and click on Play in iTunes I am sent to the download page for iTunes 10 which I have already. The selected title cannot be found anywhere in my iTunes. How can I get the title in iTunes with possibility to buy it?

    The issue is that your credit or debit card credentials must be associated with the same country where you reside in order to purchase iTunes content.
    "Although you can browse the iTunes Store in any country without being signed in, you can only purchase content from the iTunes Store for your own country. This is enforced via the billing address associated with your credit card or other payment method that you use with the iTunes Store, rather than your actual geographic location. You can use the iTunes Store in all countries of which you’re a resident, but you’ll either need a separate iTunes Store account for each one, or you’ll need to continually be switching the billing information on your single account. Generally, it’s simpler just to set up an alternative account for these situations, although it’s worth nothing that features like iTunes in the CLoud and iTunes Match are designed to work best when using a single iTunes Store account, as you can only switch accounts with these services every 90 days."
    From here >  The Complete Guide to Using the iTunes Store | iLounge Article

  • How to get the total allocated CPUs, memory and storage in a particualr reservation through vRealize Automation Java SDK?

    I am trying to figure out how to get the total allocated CPUs, memory and storage in a particualr reservation through vRealize Automation Java SDK.

    I am trying to figure out how to get the total allocated CPUs, memory and storage in a particualr reservation through vRealize Automation Java SDK.

  • My Notes will not display and I get the message "Trouble communicating with icloud".  The notes are available directly at icloud

    When I try to open "Notes" I get the message "Trouble communicating with icloud"  The Notes are avaiable direc tly on icloud. just not on my laptop.

    gkmorton wrote:
    My IPad is loked with a message "ICloud Backup-  This Ipad has not been updated in 2 weeks.
    Perform a Reset...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430
    gkmorton wrote:
    I have connectd to my computer and it says there is a new software version available.
    Before Updating... Decide if you want to... If you Update... there is No going Back...
    NOTE:
    It is both Prudent and Recommended to Backup Before any Major Update or Upgrade.
    How to BackUp
    http://support.apple.com/kb/ht1766
    What gets Backed Up
    iTunes http://support.apple.com/kb/ht4946
    iCloud http://support.apple.com/kb/PH2584

  • How can I get the digital booklet included with the albums I am purchasing from iTunes directly on my iPad?

    How can I get the digital booklet included with the albums I am purchasing from iTunes directly on my iPad?  My MacBook died about 6 months ago, so now I just have an iPhone and iPad.  I would like to be able to see the Digital Booklet in my iPad when I download the album.  I do not have any other computer to download the booklet to and sync to my iPad.

    Apparently, you have to download the booklet to iTunes on a computer first, fiddle with the file type, then sync it as a book to your iPad. See http://support.apple.com/kb/HT4194 for details.

Maybe you are looking for

  • Question Regarding Crosstab or Matrix Reporting

    Hi, I have a Requirement Where I have to Create a Cross-tab Report, We use XMLPublisher which is Bundled with R12... our ERP version is :12.1.3 Our XML Publisher is :5.6.3.x.x The Requirement Output is I have Generate a report which should be a Pivot

  • App Store download crashing; any fixes?

    I'm sure this question has been asked a thousand times over, but since none of the existing threads have helped me, I creating a new one. I downloaded PrE 11 off of the Mac App Store and after it installed I tried opening it but it instead gives me t

  • How to hide a cmd.exe window while my app run

    When i start my application whit .BAT, console window show's too. How can i hide this console window?

  • Edit Scene Time Frame Count

    Created a new file & new layer with 300 frames. Only used 150 frames for the animation. How do I edit (trim) the scene / project down to JUST the frames I need (ie 300 to 150) prior to export as swf?

  • Install CS5 and keep CS4...

    I have CS4 and downloaded the CS5 trial. When I try to install CS5 trial, it asks me to close all of my CS4 apps. I don't want it to install over my CS4 apps. Does anyone know if this installer will overwrite CS4?