Alternative for 'group by' needed

Remove group by and sum using Itab
Hello,
One report has a select clause  which is retrieving SUM (field) AS field in the field list and USING group by 6-7 fields...
I want to remove this group by clause, take all records ( without sum ) into another internal table, sort it by these 6 fields ( will define them at the start of structure), loop through it and then use AT NEW for these 6 fields and use collect for summing the field.
Please give mee some hints or if there is any other alternative.?
Please advice.
Thanks,
Rupalee.

HI,
You need to use the SORT and Internal Table Events ..
SORT ITAB BY FIELD1 FIELD2.
LOOP AT ITAB.
  L_SUM = L_SUM + ITAB-FIELD3.
  AT END OF FIELD2.
     MOVE DATA TO ITAB2.
     APPEND ITAB2.
  ENDAT.
ENDLOOP.

Similar Messages

  • Alternative for group by

    Hi guys i need some help with the logic. As an example, i have table with Account and product columns. So each Account can have multiple products. Now i need SQL to see Accounts that have only Product.
    One way of doing it is by doing a groupby and having count(Account) =1. I need an alternative for this. Please help me with your ideas. Thanks in advance.

    Alberto Faenza wrote:
    Is there any reason why you don't want to use group by or just your curiosity to find alternatives?Simple case would be: "I need to select everything from account table where account has multiple products". And between:
    SELECT  *
      FROM  YOUR_TABLE
      WHERE ACCOUNT IN (
                        SELECT  ACCOUNT,
                          FROM  YOUR_TABLE
                          GROUP BY ACCOUNT
                          HAVING COUNT(*) > 1
    /and
    SELECT  *
      FROM  (
             SELECT  ACCOUNT,
                     COUNT(*) OVER(PARTITION BY ACCOUNT) CNT
               FROM  YOUR_TABLE
      WHERE CNT > 1
    /I prefer the latter.
    SY.

  • OUD DPS alternative for DSEE Group Filters

    Hi,
    I would like to know what is an alternative for group dn filter within OUD DPS mode against DSEE DPS. How can we set up this functionality within OUD DPS mode, any pointers will be helpful. I would like to create a network group which will allow access to users having association to a particular group.
    Thanks.
    group-dn-filters                        :  cn= Access Group,ou=groups,o=example.com 
    group-search-bind-dn                    : uid=access-group-user,ou=People,o=example.com 

    Hi Sylvain,
    The use case is something like this :
    We've several LDAP Servers specially for reporting purpose, based on the functionality as listed below members of "cn= Access Group" group will have access to the LDAP Server only, any other users will be redirected to other connection handlers and a different ldap within dsee dps. The group bind dn user as listed below will verify the membership.
    Could you let me know how to accomplish this with Access Control as there will not be any re-routing among the Network Group if things are defined at the Access Level? Can we do this on OUD DPS level?
    group-dn-filters                        :  cn= Access Group,ou=groups,o=example.com
    group-search-bind-dn                    : uid=access-group-user,ou=People,o=example.com

  • Need alternatives for my code...

    Hello experts,
    I am currently modifying a code where it seems it doesnt pass the data to be fetched into the variables v_usnam and v_ppnam. I checked BSAK table and there is a data on it. Anyway, when I tries to remove the AT NEW statement, it worked. But I need an alternative for AT NEW. Below is the code guys. Thanks you so much...
    AT NEW belnr.
          CLEAR: v_usnam, v_ppnam.
          SELECT SINGLE usnam ppnam FROM bkpf
            INTO (v_usnam, v_ppnam)
            WHERE bukrs = p_bukrs
              AND belnr = it_bsak-belnr
              AND gjahr = it_bsak-gjahr.
        ENDAT.
        it_alv-ppnam = v_ppnam.
        it_alv-usnam = v_usnam.

    If you don't want to declare an entire addtional structure as I told earlier, you can try this too.
    DATA: l_index LIKE sy-tabix.
    LOOP AT it_bsak.
      l_index = sy-tabix.
      AT NEW belnr.
        READ TABLE it_bsak INDEX l_index.
        CLEAR: v_usnam, v_ppnam.
        SELECT SINGLE usnam ppnam FROM bkpf
                                  INTO (v_usnam, v_ppnam)
                                 WHERE bukrs = p_bukrs
                                   AND belnr = it_bsak-belnr
                                   AND gjahr = it_bsak-gjahr.
      ENDAT.
      it_alv-ppnam = v_ppnam.
      it_alv-usnam = v_usnam.
    ENDLOOP.

  • Two questions:  how do Skype and iChat compare for group video?  quality, reliability, cost, etc are important.  2) Is my MobileMe ID what I need to use in the window in making an iChat buddy?  It only says AIM above the window, online tutorial differs.

    Two questions:  1) How do Skype and iChat compare for group video?  Quality, reliability, cost, etc are important.  2) Is my MobileMe ID what I need to input in the window in making an iChat buddy?  It only says AIM above the window, online tutorial differs, saying MobileMe, AIM, GoogleTalk (Jabber) all work. Thnx

    Hi,
    IChat uses better Video Compression than Skype does.
    On a top flight Mac you can send a 640 X 480 pixel frame up to 30 frames a sec.
    Skype can't match this.
    iChat in Video is Peer to Peer. (you can actually Log out of the Buddy list)
    Skype seems to borrow something from everyone's bandwidth to make connections.
    What do you mean by Business account Tracking ?
    iChat Adds (or can add) the First Name, Last Name of your Buddies and create an Address Book Entry
    Whether you mark those cards connected with a  company is up to you.
    (I have heard of issues with earlier version of iChat and the Address Book that "saw" the Company Name as the part of the Name and linking several Screen Names to the one name
    Audio on a Mac using Skype tend to be the same as the streaming needs are less.
    However you have to rely on any PCs audio abilities from PCs which may not be to the same standard.
    Mac to PCs in iChat and AIM can be difficult though.  (It should work but it rarely as simple as Plug and go)
    Skype may suit your needs better on ocassions.
    9:11 PM      Thursday; May 5, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
    , Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Re need advise for groups

    Hi guys.
    Doing a reinstall of Arch 32 bit and had some problems with gnome before where it was not rendering themes properly for my user and looked ugly lol.
    Anyways I would like some advise on what groups I need and should add for my user account. This is a one user machine.

    the groups you add for your user is very dependent on what you're running on your system.  It's hard to say exactly which ones you'll want without knowing what you want to do on your system. The wiki page has some good info on various groups and what they do, it should help you better figure out what you want. http://wiki.archlinux.org/index.php/Groups

  • Editing the display time for grouped objects

    Hello, I am having issues editing the display time for grouped items. I am using Captivate 7 and I love how now the grouped items only show as one item in the timeline because it reduces the number of rows visiblein the timeline for each object on a slide. However, now that the grouped objects no longer individually appear in the timeline, I can't make any display adjustments to the grouped objects as a whole.
    Has anyone else had this issue and is there a work around? My main issue is that if I have to extend or shorten the audio for the slide, and I have assigned an advanced action to the grouped object, in order to adjust the grouped object to match the audio, I have to now ungroup, make the adjustment, regroup, then reset the advanced action using the new group name. It is frustrating and time consuming.

    To expand and view the grouped items on the timeline, you need to click the Arrow symbol next to the group name. Once you expand, you can select the individual object and adjust the timings.
    Alternatively, you can select the individual object of the group on the slide and adjust the timings from the Timing accordion. You can do this without ungrouping.
    Sreekanth

  • How  to add a new option for group by in a excel report

    Hi,
    there is a enhancement in a excel report
    I need to add a new option for group by
    help me
    Regards,
    Raghu

    k

  • What are the Flash alternatives for iphone and ipad?

    Hello,
    I would like to know what could be the Flash alternatives for iphone, ipod, and ipad. I would like to create iphone applications that have 3D animation I usually create with Flash.
    But since Apple does not support the use of flash, I need to know what applications or programming languages I must use to create movies or animations for iphone or ipad.

    I would like to create iphone applications
    Then you need to go here:
    http://developer.apple.com/programs/iphone/

  • Calculation of Depreciation for Group Asset

    Hi Experts,
    I am getting a problem while doing depreciation for group asset
    Ex:  80,000;  Rate 10%
    total depreiaiton p.a is Rs 8000/-
    as per the Indian standards if it is below 180 days it should take Rs 4000/-, but in my system it is showing Rs 3333.33
    my depreciation start date & capitlization date is 01.11.2007.
    Regards,
    Satya Vani.

    Dear,
    Reshma.
    Looking at your Questions let us take explanation for Group Assets :-
    1 ) We need to create new different asset class for Group Class in OAOA. Then permit the depreciation area for only Group Asset in OAYM as it is in your current scenario India  is Depreciation Area 15 Just select your company code in OAYM and check the Grp Asset field for respective area 15. Then go to OAAX here we have to maintain the assets classes particularly for Group Assets. So check your Group Asset classes for Group Assets. Cerate different Group asset classes for your said requirement.
    In these depreciation areas, it is then possible to make an assignment to a group asset.  You make this assignment in the specifications for the depreciation area in the asset master record.  When you post an acquisition to this kind of asset, the system duplicates the line items from this depreciation area on the given group asset.
    2 ) According to me you have to create different depreciation keys for Group Asset classes. Assign the Depreciation keys to your newly created Group Asset Classes in OAYZ and make sure you are deactivating 01 area which is Book Depreciation area.
    3 ) As far as I know this is the only functionality available to handle Group Assets. How ever SAP does not have any standard Group Assets functionality. SAP does not supply asset classes to be used solely for group assets. It is we have to determine as per varying Business Process.
    I hope this will clear your doubt makes you to understand. Please revert back for further clarification. Welcome you.
    Regards,
    Pankaj A Bhalerao.
    Edited by: pankaj_ab on Feb 3, 2010 8:26 AM

  • Issue on migration of tax depreciation balances for group assets

    Dear Experts,
    My client is using group assets for tax depreciation report India.
    The SAP implementation was done in 2006 during the data migration the
    client was not clear of the values both individual asset wise and
    group asset wise to migrate to tax depreciation area. So the tax
    depreciation for some of the assets are migrated with some
    (non caluclated) value.
    Now the client want to see the tax depreciation group asset wise or if
    possible individual asset wise.For this the group asset need to be
    created and assigned to each individual asset in the asset master
    record.
    The fiscal year variant is v3, april to march with 4 quaters June,
    Sep, Dec, Mar.
    Now when the data migration for the current year come into picture
    I can use AS81/AS82 for loading current year opening balance and
    accumulated depreciation for all the group of assets as a whole. Or
    I can use AS91/AS92 to load balances into tax depreciation of
    each asset individually. But I am not sure whether this is correct.
    And also what to do with the previous years balances. I am very
    confused. Somebody suggest good solution.
    When I create a legacy asset or group asset in AS91 and AS81
    respectively the fields in the Takeover values screen are grayed
    out and do not allow mw to input values. But I am able to enter
    values by clicking the button Transactions in the Takeover values
    screen and able to enter a value date , transacton type and amount
    for tax depreciation area. Here again I am not convinced using 100
    transaction type for current year opening balance. I used
    transaction type 652(Unplanned tax depreciation on current year
    acquisition) for accumulated current year dpereciation upto second
    quarter septemeber 2008.
    In asset explorer under "Planned values" tab the opening balance
    must be visible under Fiscal year start column but it is displayed
    under change column as I entered values for tax depreciation area
    in AS81 in Transaction screen with asset value date as 01.04.2008
    transaction type 100 and amount as xxxxxx and value date 30.09.2008
    652 xxxxxxxx.
    Need expert guidance on this
    Rgds
    Komal

    Dear Experts,
    Your inputs are awaited.
    Rgds
    Komal

  • Query for Group by & order by

    Hi all,
    I have a table name as angdata77 having attributes like asigno..
    i want to retrieve data from angdata77 by using both group by & order by clauses.. for total count..
    am using the query as
    select asigno,count(*) from angdata77 group by asigno order by asigno;
    Is there any other query for retrieving the data from angdata77
    Thanks in Advance,
    Venkatesh J.

    885756 wrote:
    Ya it's good.. Performance also good while retrieving data...
    I want to know other Possibilities also sir...There will be no better alternative for this, because this is the most simple and straight forward way to get the output you are looking for..
    Go ahead without any confusion... :)

  • Location of security xml files for groups

    We are having some issues migrating security(only) from one sysmte to another in EPM 11.1.2 for a planning application. Is there any other way to migrate security?
    Where are the xmls for each group's security stored?

    John,
    We are working with Oracle on an MSAD issue in one of our environments. One of their suggestions is to recreate the essbase.sec file. Since all security needs to be rebuilt from scratch after this happens(and we have A LOT of security), we were wondering if we could somehow save all the groups etc if we locate the xml's for the same. Would it be possible to save all the security for groups etc in shared services somehow?

  • Alternative for WBS BOM

    hello
    In standard BOM for PP in T-code eg cs01 I can write alternative. But if I want to create WBS BOM with T-code cs71 I can't see such field for alternative. I checked in help.sap.com that alternative for WBS BOM are not used. I don't know why but there is not alternative filed in CS71.
    So is there any other way to get alternatives for WBS BOM like modification, exit etc.
    I checked SAP notes for this but I can't find.
    Any help?

    hello
    Thank you for your answers.
    I have business process where I need WBS alternative. Why? Because of history of changes. My client wants to have 2 versions of one WBS BOM. One for history only and second for operative work. After some changes in WBS BOM and finish the project my client wants to analyse historical version which is created when project starts and the last operative version of the same WBS BOM.
    @Uddhab
    >If we prepare two BOM for a single WBS and attach the same in the WBS, then 2 requirement will flow and there will additional >quantity in the production.
    Yes, if we attach. I want to attach only one WBS BOM so I don't multiply quantity.

  • Alternative For tabIndex

    Hi Friends,
    I am using JDeveloper 11.1.2 .In my application I need to achieve tab order. In adf I can't find the tab index.I need the alternative for tab index in adf.Any type of suggestions always welcome.
    Thanks ,
    Arun D.

    Hi..
    Check
    Controlling tab order in an ADF Form
    http://blogs.oracle.com/shay/entry/controlling_tab_order_in_an_ad
    How-to control the keyboard tab behavior in a LOV field
    http://blogs.oracle.com/jdevotnharvest/entry/how-to_control_the_keyboard_tab_behavior_in_a_lov_field
    ADF Faces setting the tab order between fields

Maybe you are looking for