Is there any direct syntax for summing two values

Friends,
                   I just have a problem of summing up two or more similar product_id 's  quantities.
for ex:  assume an Internal Table IT_PRODUCT. consider it has two fields one is PRODUCT_ID ( Primary key in Database ) and the other field is QUANTITY.
IT_PRODUCT.
PRODUCT_ID           QUANTITY
I1001SA101                    10
I1001SA101                    20
my desired output is to sum up the similar product_id' s of the internal table and to have only one summed record in the internal Table.
IT_PRODUCT
PRODUCT_ID           QUANTITY
I1001SA101                    30
Is there any direct syntax to do the same or suggest me some more methods.
Pradeep.

Use COLLECT statement..
Check this code...
DATA : BEGIN OF itab OCCURS 0,
matnr LIKE ekpo-matnr,
menge LIKE ekpo-menge,
END OF itab.
DATA : itab2 LIKE itab OCCURS 50 WITH HEADER LINE.
SELECT matnr menge INTO CORRESPONDING FIELDS OF
TABLE itab FROM ekpo UP TO 20 ROWS.
LOOP AT itab.
  COLLECT itab INTO itab2.
ENDLOOP.
Message was edited by:
        Perez C

Similar Messages

  • Is there any native method for converting String value to Hungarian notat..

    Hello. there.
    This might be very simple question. but I'm just curious about this.
    I am wondering if Java API offer the any native method for converting uppercased string value to lowercase which obey the Hungarian notation.
    What I'm going to do is using Reflection for excuting RFC function on SAP. I was found it is very similar to JDBC Programming.
    Please refer to blow codes.
    //mTable
    JCoTable mTable = function.getTableParameterList().getTable(rtnTblNm);
        for (int i = 0; i < mTable.getNumRows(); i++) {
         mTable.setRow(i);
         HashMap tmpData = new HashMap ();
              for (int j=0; j < mTable.getNumColumns(); j++) {
                     // I want to set key String [userNo] instead of  [USER_NO] here.
              tmpData.put(mTable.getMetaData().getName(j).toLowerCase(), mTable.getString(j));
              result.add(tmpData);
    } Basically, The idea was from ibatis framework [com.ibatis.common.beans.classInfo] dropcase();
    Any idea would be very helpful for me. Thank you.
    Edited by: hosung.seo on Aug 30, 2009 10:42 PM
    Edited by: hosung.seo on Aug 30, 2009 10:50 PM

    ejp wrote:
    Hungarian notation is a representation of logical/arithmetic expressions in postfix form. Not what you're talking about.
    So your title is very confusing to the people here who know what it means, which is probably all of them, because people read threads based on their title.From now on, I will pay more attention when I post an question.
    If the titile as " +Is there any native method for converting String value to camelcase?"+ would be easier to what i'm pointing at.
    As I mentioned in above sorce code, converting [USER_NO] to [userNo] isn't relevant Hungarian notation. yes, it was ambiguous. Agree! :)
    But some answer wasn't fit to converting case or recognizing "underscore" delimiter. I was expecting toCamelCase() such as blew. Thanks.
        public static String toCamelCase(String name) {
            String lowerName = name.toLowerCase();
            String[] pieces = lowerName.split("_");
            if (pieces.length == 1) {
                return lowerName;
            StringBuffer result = new StringBuffer(pieces[0]);
            for (int i = 1; i < pieces.length; i++) {
                result.append(Character.toUpperCase(pieces.charAt(0)));
    result.append(pieces[i].substring(1));
    return result.toString();

  • Is there any direct support for CC? I have been navigating the site trying to find someone to contact by email or phone.

    I'm not sure I want a subscription if I can't get an answer to questions I may have. Not all issues are covered in the Q & As and forums.

    If you have a question you can try asking it here and see if someone has the answer.  If you want to contact Adobe Support directly then you can use chat or phone to contact someone during the hours when those options are available.  I don't think anyone is available during the weekend.
    For contact information... Start Here  If after selecting relevant responses you are unable to find a solution, choose "Still need help? Contact us." and the chat contact option.

  • Is there any function module for getting distribution list name

    Hi all,
    Is there any function module for getting distribution list name when there is same description for two distribution list name.
    or
    help me how to fetch the correct distribution name when there is same description.
    In order to send mails.
    Tell me ASAP.
    thanks
    sagar.

    http://www.sapbrainsonline.com/REFERENCES/FunctionModules/SAP_function_modules_list.html
    list of Fms

  • Is there any way I can merge two accounts on my macbook?

    I have two accounts on my macbook (version 10.6.8), one that i created when i got the laptop and one i created a few years after because i couldn't remember my old password(which i know now). Is there any way to merge the two accounts into one? (itunes, iphoto, apps, etc.)

    Office for Mac or Office 365. I use it on my Mac and although not as polished or feature rich as the Windows version, serves my purpose perfectly. I also regularly switch between Windows at work and Mac editing the same document so cross-compatibility has been fine too: http://www.microsoft.com/uk/mac
    You could always try Open Office which is free: http://www.openoffice.org/porting/mac/

  • Are there any JDBC Drivers for SQL Server 2000?

    Hello Everyone,
    Any news on the JDBC drivers for SQL Server 2000? I know it is not
    certified yet but is there a date when it will be.
    Which versions of WLS will they work with? Any help is appreciated.
    Sincerely,
    --Luis

    Hello Michael,
    Any news on the JDBC drivers for SQL Server 2000? I know it is not
    certified yet but is there a date when it will be.
    Which versions of WLS will they work with? Any help is appreciated.
    Sincerely,
    --Luis
    "Michael Girdley" <[email protected]> wrote in message
    news:3a6549bb$[email protected]..
    Not yet, but they will appear on the web site in about two weeks.
    Thanks,
    Michael
    Michael Girdley, BEA Systems Inc
    Learning WebLogic? Buy the book.
    http://www.learnweblogic.com/
    "Stefano Picozzi" <[email protected]> wrote in message
    news:[email protected]..
    Are there any JDBC Drivers for SQL Server 2000 for Weblogic Server.

  • I am using iPhone 4 : i OS 7. When the phone is in sleep mode i cannot disconnect unwanted incoming call, Is there any upgrade coming for this for iPhone 4 users

    Dears,
    I am using iPhone 4 : i OS 7. When the phone is in sleep mode i cannot disconnect unwanted incoming call, Is there any upgrade coming for this for iPhone 4 users. How this can be sorted

    Hello Bibhore,
    Calls can be declined by hitting the sleep/wake button twice quickly.
    Decline a call and send it directly to voicemail. Do one of the following:
    Press the Sleep/Wake button twice quickly.
    iPad User Guide - When someone calls
    http://help.apple.com/ipad/7/
    Cheers,
    Allen

  • Is there any way to identify the two classes are compiled by same vm

    Is there any way to identify the two classes are compiled by same vm?
    Thank's a lot.

    I think this is the better forum than java compiler. The answer to the question you asked is no.
    But that question is not the best way to address your problem.
    If this were me, I'd use a tool like ASM (http://asm.objectweb.org/) to read in that file, and replace the getToday() method, with one like this
    long getToday() {
        return 20080101;
    }and replace the class file with this new one. (keep the old one, they might be using a class loader that verifies class signatures or something)
    (They said the code you are looking at could have been changed by you - so take the hint and change it back).
    If they've ripped you off, this will restore justice much more cheaply and effectively than involving the lawyers. If they then sue you for breaching the license agreement, that would probably force them to disclose their underhand tactics.
    OTOH, if you're lying to us about the purchase, and needing to pay for upgrades to fix the performance issue, and instead are trying to crack some trial software, then I hope they are using a custom class loader that checks the integrity of the classes.
    If you are being ripped off, why are you not telling us the name of the company? I am not sure who is being ripped off here.
    Bruce

  • Is there any default size for ArrayList

    The default capacity of Vector is 10.
    Is there any default size for ArrayList ??
    Vector v = new Vector();
    System.out.println("==> "+v.capacity()); // output is ==> 10
    java.util.List alist = new ArrayList();
    System.out.println("==> "+v.capacity()); // here the out put is ==> 0
    Regards
    Dhinesh

    No default size for arraylist.initially it's zero.
    I think u r comparing capacity with a size those two are different.
    Size- represents number of elements in the array.
    capacity- the capacity is the size of the array used to store the elements in the list. It is always at least as large as the list size. As elements are added to an ArrayList, its capacity grows automatically.
    it depends on the ensureCapacity() method in the arraylist.

  • Is there any  standard report  for GR / IR to see as on particular date

    Hi ,
    Is there any standard report for GR/ IR  to see as on paricular date.
    please help me. points will be given.
    regards,
    Hari priya

    Hi,
    Please go to MR11.
    It may help you.
    Regards,
    Jigar

  • Is ther any standard report for GR/IR Maintenance Main Tool

    is ther any standard report for GR/IR Maintenance Main Tool ?

    Hi Salsa,
    Use Tcode MB5S --> List of GR/IR Balance.
    Assign pts, if found useful
    Regargds
    Sandeep Acharya

  • Is there any Vga adaptor for the Ipad 2 that is VIDEO IN rather than OUT?

    Is there any Vga adaptor for the Ipad 2 that is VIDEO IN rather than VIDEO OUT? is for a student with visual impairment who needs to view the classroom digital board content from a very short distance, like the distance to an Ipad for example, so the Ipad would be ideal as an interactive monitor with typography and content easy to amplify.
    At the moment, this student has a traditional flat screen monitor taking over the table next to him, so no other child can seat in it, and he has no opportunity to befriend and sporadically joke with anybody else. So much for "inclusion".
    Please do let me know: [email protected]

    Speaking as a teacher ... Why can't he have a student on the other side of him?

  • Is there any transaction code for uploding logo in ALV reports.

    is there any transaction code for uploding logo in ALV reports.

    hi,
    call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = t_header.
                i_logo             = 'Z_LOGO'.
    endform.
    Upload Logo for REUSE_ALV_COMMENTARY_WRITE
    For those who wish to upload and use a picture in your ALV abap reports.
    Steps for uploading Logo :-:
    1. Goto the transaction OAER
    2. Enter the class name as 'PICTURES'
    3. Enter the class type as 'OT'
    4. Enter the object key as the name of the logo you wish to give
    5. Execute
    6. Then in the new screen select Standard doc. types in bottom window
    Click on the Screen icon
    Now, it will ask for the file path where you have to upload the logo
    7. Now you can use this logo in REUSE_ALV_COMMENTARY_WRITE
    or
    Import Logo and Background Picture for Reporting
    In this step, you can import a customer-specific logo and a background picture into the R/3 System. These will be displayed in the header area of reports in HR Funds and Position Management.
    From the SPRO:
    HR Funds and Position Management --> Dialog Control --> Customize Reporting Interface --> Import Logo and Background Picture for Reporting.
    Activities
    1. Enter the Name of your logo/background picture as an object key in the initial screen.
    2. Make sure that the class name is PICTURES, and the class type is OT.
    3. Choose Execute.
    4. Double-click the document type Picture on the Create tab page. A dialog box will appear in which you can enter the path in which the logo/background picture can be found.
    5. Enter the path and choose Open. The logo will be uploaded into the current R/3 System. If the logo/background picture is to be transported into other systems as well, choose Transport.
    6. Return to the initial screen and repeat the procedure after having entered the Name of your background picture as an object key.
    Please note that the logo/background picture can only be displayed in ALV-based reports with an HTML header. Manually programmed reports such as business distribution plans are not based on the ALV.
    If you have selected several initial objects, ALV-based reports in HR Funds and Position Management will automatically use a hiearchical-sequential display. A logo is not displayed here either. Note also that the logo cannot be printed (see print preview in program).
    Make sure that the logo does not exceed a height of 100 pixels because it would mean that the header of the report will be scrollable.

  • Are there any good tool for checking security risks, Code review, memory leakages for SharePoint projects?

    Are there any good tool for checking security risks, Code review, memory leakages for SharePoint projects?
    I found one such tool "Fortify" in the below link. Are there any such kind of tools available which supports SharePoint?
    Reference: http://www.securityresearch.at/en/development/fortify/
    Amalaraja Fernando,
    SharePoint Architect
    Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you. This post is provided "AS IS" with no warrenties and confers no rights.

    Hi Amalaraja Fernando,
    I'm not sure that there is one more tool that combines all these features. But you may take a look at these solutions:
    SharePoint diagnostic manager
    SharePoint enterprise manager
    What is SPCop SharePoint Code Analysis?
    Dmitry
    Lightning Tools Check
    out our SharePoint tools and web parts |
    Lightning Tools Blog | Мой Блог

  • HT4623 I have updated my iphone 5 with IOS7. Now there is an update 7.0.2 on my cell and the size of update file is showing around 21.0 MB. I tried to update it ITunes but it seems it is downloading the entire IOS. Is there any separate update for the sam

    I have updated my iphone 5 with IOS7. Now there is an update 7.0.2 on my cell and the size of update file is showing around 21.0 MB. I tried to update it ITunes but it seems it is downloading the entire IOS. Is there any separate update for the same or I have to download the entire IOS again?

    Well when you download the update with iTunes it will always download the whole new version (in your case 7.0.2) even if its just an bug fix. If you already have 7.0 download the update over-the-air.
    You already wrote that the update is only 21 MB, so its not the whole firmware package of 7.0.2 you get with iTunes.

Maybe you are looking for

  • How to print CWiGraph control in white background and different font?

    I have a CWiGraph control in dialog. I look at your example for printing the CWiGraph control, but I don't want print the exact image like showing on the screen, I like to print the graph in white background, not the same color like graph frame and p

  • Large Pictures in Mail Drop Turn Into Small Thumbnails (Exchange Server)

    When using Mail Drop through Mac Mail, large pictures (>20MB total) are converted to thumbnails with no link to the original file.  This happens when I choose to use Mail Drop for the attachments. The large picture also shows in my sent email as a th

  • Box and Whisker Plots

    how to make box and whisker plots in numbers?

  • AirPort Extreme 802.11n for older Macs?

    Are there any plans for Apple to release some sort of upgrade for older Macs so that we can use 802.11n wireless networking? I have a Power Mac G5 (2.5GHz DP) and a MacBook Pro 17" Core Duo (not Core 2 Duo), so the hardware in my Macs doesn't handle

  • Mac OS 1.4.11 and Nokia X3-00

    My Mac is 10.4.11 and can't be upgraded to Leopard for various reasons. So I'm constrained to NMT 1.3.1 beta which doesn't recognize my Nokia X3-00. How can I transfer music between Mac and Nokia then?