How to get sum of quantity column in table control

Hi, expert ,
Someone can guide me how to get som of qty column in table control ?
I created a screen with a table control  and has a  qty quantity field .
I want to show total of qty  in a  field .
my code like this ...
PROCESS AFTER INPUT.
  LOOP AT I_tab.
    CHAIN.
       FIELD I_tab-COUNTQTY MODULE  caculate_total_qty .
    endchain.
    MODULE UPDATE_TOTAL_QTY  .
  ENDLOOP.
but, when I Back to the previous screen
It's caculate again so I always get wrong Total quantity .
anyone can help me ...

Hi , Dhina
I have another question .
I use internal table data in table control to update  database table .
The data in the db will be change ,
but each record I want to delete in table control , it's still exist in database .
my code is
WHEN 'SAVE'
     MODIFY YDSGBT53 FROM TABLE I_YDSGBT53 .
     COMMIT WORK .
  END CASE
How  to fix my code and let it can change and delete data in database  ?
or
when I delete record  in table control I must to delete data in the database too .
Edited by: TitusFang on Jun 16, 2011 3:21 AM

Similar Messages

  • How to find out the selected column in Table Control

    Hi all,
          How to find out the selected column in Table Control?
    Thanks & Regards,
    YJR

    Hi,
    Let your table control name in Screen painter be TC1.
    READ TABLE TC1-COLS INTO WA_COLS (some wok area)
                 WITH KEY SELECTED = 'X'.
            IF SY-SUBRC = 0.
              CLEAR: W_DUMMY, W_COL_NAME.
              SPLIT WA_COLS-SCREEN-NAME AT '-' INTO W_DUMMY
                                                   W_COL_NAME.
            endif.
    W_COL_NAME gives you the column name.
    Hope it helps.
    cheers
    sharmistha

  • How to get sum of highlighted column values.

    Is there currently any functionality that allows you to highlight a certain number of column values in the returned result set and to see the sum of the values highlighted.

    Hi,
    Not directly, sorry.
    You could always try highlighting the desired cells, copy/paste them into a column in a spreadsheet like MS Excel or Open Office Calc, then add a sum function into a nearby open cell. The spreadsheet can be added to SQL Developer's Tools|External Tools menu for convenience.
    Regards,
    Gary Graham
    SQL Developer Team

  • How to add column in table control for transaction APPCREATE

    Hi All,
    How can i add the additional column in table control for transaction APPCREATE.
    There is structure PT1045_EXT present behind table control. But not found any customer exit or badi to display on screen.
    Please help...

    You can add new columns
    If you add new columns in tr. PHAP_CATALOG

  • How to get sum for each currency's in ALV Report

    Hi,
    A column has amounts with various currency's.
    May I know how to get sum quantity for each currency in ALV Report?
    Thanks in advance.

    Hi,
    Currency value column should have reference to currency code column.
    Regards,
    Wojciech

  • Getting sum of each column in 2D array

    hi,
    i want to get sum of each column from 2D array. i did public static void main(String[] args) {
              double sum=0.0;
                   int[][] arr={
                             {1,2,8},
                             {2,2,3},
                             {2,2,5},
                             {1,2,8},
                             {1,1,9},
                             {2,2}
                   int i=0,j=0;
                   int len=arr.length;
                   while(j!=len){
                        sum=0;
                        for(i=0;i<arr.length;i++){
                        sum+=arr[i][j];
                        System.out.println("sum is:" +sum);
                        j++;
         }but it doesnot work for jagged array...somebody please help!
    thankx                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Stop assuming the rows in your matrix are all the same length. Arrays know how long they are. Use that information to determine if the current column exists in that row.

  • I would like to know how to get the unrestricted quantity excluding actual customer ordr quantities on a given group of items?

    I would like to know how to get the unrestricted quantity excluding actual customer ordr quantities on a given group of items?

    Hi , Welcome to the HP Forums!
    It is a terrific place to find answers and tips!
    For you to have the best experience in the HP forum I would like to direct your attention to the HP Forums Guide.Learn How to Post and More I grasp you would like to replace the keyboard and would like the part number and where to purchase one. Here is a link to the HP Pavilion 17 Notebook PC HP Pavilion 15 Notebook PC Maintenance and Service Guide .  Please note chapter 3, page 20, item 2 for the replacement keyboard part numbers. You stated you were having a difficulty locating where to purchase the part.  Here is a link to  HP Notebook PCs - Ordering HP Certified Replacement Parts for your convenience. You can also try a Google search with the part number for other vendors that may have one.   To say thanks for replying please click the thumbs up icon below. If this has addressed your query please choose solution provided to help other people locate this information.   Best of Luck!

  • How to get Production Order Quantity

    I have material number and plant. From this information how to get production order quantity that is displayed in the transaction MD04.
    Thanks,
    Vinay.

    Hi Vinay,
    Have you looked FM <b>MD_STOCK_REQUIREMENTS_LIST_API</b>?
    Hope this will help.
    Regards,
    Ferry ianto

  • Can anybody tell me how to get INV available quantity of a item through API

    Hello,experts.
    Can anybody tell me how to get INV available quantity of a item through API?
    And offer any example for this.
    Thanks in advance

    Check from This table : MTL_ONHAND_QUANTITIES and MTL_ONHAND_QUANTITIES_DETAIL.
    Anyway just curious, if you able to access this forum (which requires internet connection), why you can't access TRM and IREP ?

  • How to get the onhand quantity along with zero quantities in Inventory?

    How to get the onhand quantity along with zero quantities in Inventory...Plz reply me as son as possible?

    Hi Akshata,
    In processRequest you can use pageContext.getParameter
    String PartyName = pageContext.getParameter("PartyName");Regards,
    Sujoy

  • How to get tabs into a column on left edge of Firefox window?

    How to get tabs into a column on left edge of Firefox window?
    I've looked extensively for the answer but haven't found it yet.

    I found the Tree Style Tab ad-on does this.
    Mike

  • How to get index of the item from table when user double click on an item

    Can anyone tell me how to get the corresponding index of a table in which
    elements are listed as array of strings? I am looking for the index of the
    item being double-clicked on?
    Thank you in advance
    Cheers,
    NQ.

    Hi NQ,
    Although the question is not thouroughly clear, I can give a few suggestions. You can use the property node for table to refer to any particular row or column of the table. The correpsonding elements in the property node will be "SelStart", "SelSize" etc. Just as a side thought, the index of a table starts with (0,0).
    I am attaching a test file. Please see if it helps you in figuring out what exactly you want. This example VI is just to help you try different options under property node (if you havent already tried)to get what you want.
    Regards,
    Sastry Vadlamani
    Applications Engineer
    National Instruments
    Attachments:
    test.vi ‏27 KB

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • How to add a column in table control

    Hi ,
       Can any one tell me how to add a column in table control? My requirement is to add two columns ( custom fields ) into table control ( It is a standard program). I have added the column in the table and also in the table control. But when I am running the standard program, The newly added column is not there. But I have added in the perticular screen. Change is not reflected.
       Can anyone help me on this please.
    Thanks in advance.
    Regards,
    Lakshmi.

    Hi,
    Ensure the following :
    1. After adjusting the database, you`ll have to use the database utility and activate the table.
    2. If you have changed the standard screen, in tcode se80 -- right click on the program and click activate all. This activates all objects related to that program.
    Now execute the program.
    Reward if helpful.
    Regards

  • How to get selected  row index  of a Table ?

    hi gurus,I'm new  to Webdynpro for abap
    I'm displaying    just Flight details in a Table  so
    how to get selected  row index  of a  Table  and need  to be display in Message manager.

    Hi,
    For getting the row index use the following code.
    DATA lo_nd_node TYPE REF TO if_wd_context_node.
      DATA lo_el_node TYPE REF TO if_wd_context_element.
      DATA index TYPE i.
    * navigate from <CONTEXT> to <NODE> via lead selection
      lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_node ).
      lo_el_node = lo_nd_node->get_lead_selection(  ).
      index = lo_el_node->get_index( ).
    node is the name of the node which is binded to the table.
    For printing the message u can use code wizard.
    Press ctrl-F7. Now Select generate message.
    IN this select the method  REPORT_SUCCESS
    In the code now u can give index to Message text Exporting parameter. Comment receiving parameter.
    Write the whole code in onLeadSelect of the table.
    Regards,
    Pankaj Aggarwal

Maybe you are looking for

  • Capture images (JPEG) from IP-Camera

    Hey there! I have been trying to capture images from an IP-Camera. I understand that this has to be done by using a custom DataSource and I have tried many many example found here on the net, but with no results. I think I've tried every piece of cod

  • PDF Error in Performance Management

    Hi When launching the Performance Management link from Manager Self Service (Role) --> Talent Management --> Performance Management I am getting the PDF error. Seems the page is trying to open the form in PDF, instead I want it to be displayed in htm

  • Array inner class (advice from YoGee)

    Hello, I am trying to write an array of records, I think it is all OK except for when i try to loop out the results. I get an error in the last for loop at for (int x=0; x < records.length; x++) it says record.length has not been initialised.......it

  • Inability to see/open RAW images Elements 5.0

    I have a new laptop -which runs on the Vista OS I put on my copy of PSE 5.0 and can do everything under the sun with JPEG images as I could prior with the now defunct laptop. However I cannot get it to recognize RAW files. I've done the most current

  • Queries not transported to QA?

    Expert's, Here is an issue where the some of the queries have transferred to QA from DEV but one query is not transported to QA.How to analyse this one.But the web template which has used this query is transported.Help to analyse this one.