Showing the total in the alv

Hi,
I have an ALV that I have displayed in a view , the ALV contains few columns , I want to show the total of the fields. Please suggest how to do it.

hi
have a look at following [article|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/4063c42a-2549-2c10-fab6-a8c99d98b9b5]
might help you.
regards
manas dua

Similar Messages

  • How to find out the total, subtotal in alv report

    hi dears,
    how to find out the total, subtotal in alv report?
    pls tell me logic ,
    i will be waiting for eply
    regards
    eswar

    Hi,
    <b>ALV Grid List with sub-totals</b>
    REPORT z_demo_alv_sort.
    * This program lists orders (VBAK) with sort and sub-total for        *
    * 'sold-to-party' (KUNNR) and 'Sales organization' (VKORG)            *
    TABLES : vbak.
    TYPE-POOLS: slis.                      " ALV Global types
    SELECT-OPTIONS :
      s_vkorg FOR vbak-vkorg,              " Sales organization
      s_kunnr FOR vbak-kunnr,              " Sold-to party
      s_vbeln FOR vbak-vbeln.              " Sales document
    SELECTION-SCREEN :
      SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max.
    PARAMETERS p_max(2) TYPE n DEFAULT '20' OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    DATA:
      BEGIN OF gt_vbak OCCURS 0,
        vkorg LIKE vbak-vkorg,             " Sales organization
        kunnr LIKE vbak-kunnr,             " Sold-to party
        vbeln LIKE vbak-vbeln,             " Sales document
        netwr LIKE vbak-netwr,             " Net Value of the Sales Order
        waerk LIKE vbak-waerk,             " Document currency
      END OF gt_vbak.
    INITIALIZATION.
      v_1 = 'Maximum of records to read'.
    START-OF-SELECTION.
      PERFORM f_read_data.
      PERFORM f_display_data.
    *      Form  f_read_data
    FORM f_read_data.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE gt_vbak
               FROM vbak
                 UP TO p_max ROWS
              WHERE kunnr IN s_kunnr
                AND vbeln IN s_vbeln
                AND vkorg IN s_vkorg.
    ENDFORM.                               " F_READ_DATA
    *      Form  f_display_data
    FORM f_display_data.
      DEFINE m_fieldcat.
        add 1 to ls_fieldcat-col_pos.
        ls_fieldcat-fieldname   = &1.
        ls_fieldcat-ref_tabname = 'VBAK'.
        ls_fieldcat-do_sum      = &2.
        ls_fieldcat-cfieldname  = &3.
        append ls_fieldcat to lt_fieldcat.
      END-OF-DEFINITION.
      DEFINE m_sort.
        add 1 to ls_sort-spos.
        ls_sort-fieldname = &1.
        ls_sort-up        = 'X'.
        ls_sort-subtot    = &2.
        append ls_sort to lt_sort.
      END-OF-DEFINITION.
      DATA:
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv,
        lt_sort     TYPE slis_t_sortinfo_alv,
        ls_sort     TYPE slis_sortinfo_alv,
        ls_layout   TYPE slis_layout_alv.
      m_fieldcat 'VKORG' ''  ''.
      m_fieldcat 'KUNNR' ''  ''.
      m_fieldcat 'VBELN' ''  ''.
      m_fieldcat 'NETWR' 'X' 'WAERK'.
      m_fieldcat 'WAERK' ''  ''.
      m_sort 'VKORG' 'X'.                  " Sort by vkorg and subtotal
      m_sort 'KUNNR' 'X'.                  " Sort by kunnr and subtotal
      m_sort 'VBELN' ''.                   " Sort by vbeln
      ls_layout-cell_merge = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                is_layout   = ls_layout
                it_fieldcat = lt_fieldcat
                it_sort     = lt_sort
           TABLES
                t_outtab    = gt_vbak.
    ENDFORM.                               " F_DISPLAY_DATA
    ***************** END OF PROGRAM Z_DEMO_ALV_SORT **********************
    Regards
    Sudheer

  • 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

  • Hi, im using itunes store and i bought some songs and, apple send me a receipt, and it says that its bill to : store credit, and the total of the oder is 1.98 $. so do i have to pay it, or what ?

    Hi, im using itunes store and i bought some songs and apple send me a email, and it says it was a receipt. It also said that its bill to : Store credit, and the total of the order is 1.98 $. So do i have to pay this or its just a proove of purchase ?

    Launch iTunes. From the menu bar click Store / View My Account
    Click: Edit Payment Information
    Make sure you have the correct Security Code.
    Then click: Done
    And try resetting your Apple ID password.  https://iforgot.apple.com/cgi-bin/WebObjects/DSiForgot.woa/wa

  • How to display the total at the end of the column in the report.

    Hi all,
    Could any one please intimate, how to display the total at the end of the column. For example, i have a column, "sales" as the Key figure, and it has the data for all the transactions. Now, i would like to display the total at the end of the report, below the same column.
    Similarly, for all the other columns in the report, i need to display the total for all the columns in the report.
    Thanks & Regards,
    A.V.N.Rao

    Hi All,
    Thanks for many suggestions. I tried by providing the "Total" under "Calculate Results as" and also "Counter for all detailed values" under "Calcuate Single Values as", in the  "Calculations" tab of the key figure, but i am unable to get the information. Again, i am providing the requirement below:
    CHAR - A   CHAR - B   TIME CH. - 1 KF -1  KF- 2 KF - 3
    1                     RAM        2012           1         50      50
    2                     SAM         2012          2         100    200
    Result                                               3           150   250
    Assume KF -1 as  "Qty." KF-2  as "Price" KF-3 as "Sales".
    Please intimate the solution.
    Thanks & Regards,
    A.V.N.Rao.

  • Add opening balance and transactions in the total of the general ledger

    How can we add all the opening balances and all the transactions of each vendor in the total of the general ledger in SAP Business One 2005 PL45 when we select several vendors ?
    At first sight, there is no system variable in SBO 2005 for this.
    Thierry.

    Hi
    What is your selection criteria:
    At the bottom , there is an option --Sort and summary
    Sort by posting only ;
    Sort by -BPCode ... Summary(yes)
    This should help you
    Bishal

  • Deleting the totals in the view

    Hi,
    Is there any way to eliminate the totals in the demand planning view? How could it be done?
    Thanks a lot

    Sorry , replied with wrong content
    Message was edited by:
            Jan Pasha

  • How can I autofill the "Amount" field in my eCommerce form using the "Total" from the shopping cart?

    I've found the tags to display the shopping cart summary elsewhere on the site, so I know there's a way to display the total, but I can't figure out a way to fill in the required "Amount" field in the eCommerce form used to process payments. I'd like that "Amount" field to be filled in automatically using the total in the shopping cart. Can anyone help? Thanks!

    You can use the shopping cart summary tag with custom layout.
    Here's the sample:
    <input type="text" value="{module_shoppingcartsummary template="/ModuleTemplates/Shop/cartsummary.tpl"}">
    Inside the shopping cart summary custom layout is a tag for total amount:
    {tag_currency}{tag_totalAmount} or {tag_totalAmountWithCurrency}

  • Why resource cost in Oracle does not equal the total on the routing of Usage.

    why resource cost in Oracle does not equal the total on the routing of Usage.

    Hi Judy,
    I could not reproduce your issue. Is your Project Server patched with the latest SP and CU?
    Also can you reproduce this unexpected behavior with another project?
    Can you split your screen from the resource usage view, display the resource form and click right on the grey part selecting "schedule"? Then you'll have the scheduled start and finish dates for the resource's assignments. This is to be sure that
    you are not missing any parts of the assignments due to a wrong zoom in the timephased grid.
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • Problem in the total of the Query

    Hi people.
    I have a Query where there is 3 itens for exemple with the same value.
    Document A=3Km   Document B=3Km   Document C=3Km   and the total i configurated to show the same value=3Km
    But when I take of the driw down where will show only one line, the query show the total 9Km instead of 3Km.
    The query lost the parameter I have put to show the same value.
    Do you know how I can do to show the same value=3Km when I have the query wothout driwdoun?
    Thanks.

    Hello,
    Just try if this works..In your Amount formula, click on Aggregation tab, select Exception aggregation as Maximum or Minum  and select Reference characteristic as the lowest level in your hierarchy.
    Thnaks.
    With regards,
    Anand Kumar

  • Problem with the total in the Query

    Hi people,
    In my report I have the colums "Shipping cost Number" and  "Delivery Number" where I can have 1:N.
    Obs.: This kind of report is based on a InfoSource that has the total by Shipping Number and not by Delivery number. So, for not triplicate the shipping values (for some cases) it was necessary create a new colum "shipping cost by delivery", besides "shipping cost", and calculate based on "% Delivery" (*)
    (*) % Delivery = Quantity Delivery line / Total of Quantity Delivery.
    Folow the situation:
    .....Shipping Cost Number"..."Delivery Number"...  Shipping Cost"..."Shipping Cost by Delivery"..."Quantity Delivery"..."% Delivery"
    .....1475441...........................84262109.................500,00................500,00....................................2,000.....................100,00
    Subt........................................................................500,00................500,00....................................2,000.....................100,00
    .....1475558...........................84262081................5.000,00..............1.846,09.................................35,120.....................36,92
    .....1475558...........................84262117................5.000,00..............2.102,61.................................40,000.....................42,05
    .....1475558...........................84262125................5.000,00..............1.051,30.................................20,000.....................21,03
    Subt.......................................................................5.000,00..............5.000,00.................................95,120....................100,00
    Considering :
    The "total of Shipping Cost" was calculated to represent the same value.
    The "total of Shippin cost by Delivery" was calculated to represent de SUM of the colum, instead of to calculate based on "% delivery"
    When I take of the colum "Delivery Number", many colums get the total wrong:
    % delivery..........wrong......correct
    Ship 1475441.....2,06.........100,00
    Ship 1475558....97,94........100,00
    In this case, the report is calculating incorrectly (Ex. for the first line: (2,000 / 97,120) instead of (2,000 / 2,000)
    shipping cost.....wrong..........correct
    Ship 1475441.....500,00.........500,00
    Ship 1475558....15.000,00.....5.000,00
    In this case, the report is disconsidering the configuration (taking the first value) that I put to calculate de total
    Shipping Cost by Delivery......wrong..........correct
    Ship 1475441.........................10,30............500,00
    Ship 1475558.........................14.961,10.....5.000,00
    In this case, it is the consequency of the calculation above.
    ***Summary
    ....Shipping Cost Number"..."Shipping Cost"..."Shipping Cost by Delivery"..."Quantity Delivery"..."% Delivery"
    ....1475441...........................500,00................10,30......................................2,000.......................2,06
    ....1475558..........................15.000,00............14.691,10...............................95,120.....................97,94
    Please, I need very much to find out some solution for this problem of "total" when we take of some colum.
    Thank you,
    Rosana

    Hi Rosana,
    I think exception aggregation will be usefull in you case.
    Check the below links which gives info about exception aggregation
    http://wiki.sdn.sap.com/wiki/display/BI/Exceptionaggregationin+queries
    http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/605f1751-a701-2a10-b791-9da5ba4f2a64
    http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/00cd3483-1573-2910-7aba-b81a36ce0ec2
    Hope this helps,
    Sri....

  • Any method to mask the "Total" in the form of Delivery?

    I have tried to create a picture box to mask the "Total" value (UI),when I resize the form , the picture box become transparent!!! Is it prossible to mask a field in the form using UI?

    Just access the total textfield and make it visible = false;
    oForm.Items.Item("29").Visible = false; //The field
    oForm.Items.Item("30").Visible = false; //The label
    If that doesn't work try setting the left property to something that will never come into view no matter how large you make the window... Something like this
    oForm.Items.Item("29").Left = 5000; //The field
    oForm.Items.Item("30").Visible = 5000; //The label

  • To get the TOTAL at the top

    I have a report spec. for which I have to write a SQL query which should print the total aggregate at the top.
    For ex. For Dept 10 which has salaries 1000,2000,3000
    Deptno Salary
    10 Total of Sal for dept 10
         1000
         2000
         3000
    20 Total of Sal for Dept 20
    Total Final Total (individual grouping totals)
    Please suggest the SQL for getting individual totals at the top
    Regards,
    Gaurav Srivastava

    select decode(grouping(empno), 1, decode(grouping(deptno), 1, 'TOTAL', to_char(deptno))) DEPT,  sum(sal) sal
    from emp
    group by grouping sets ((deptno, empno),(deptno), ())
    order by emp.deptno, grouping(emp.empno) desc;
    DEPT         SAL
    10          8750
                2450
                5000
                1300
    20         10875
                 800
                2975
                3000
                1100
                3000
    30          9400
                 950
                1600
                1250
                1250
                2850
                1500
    TOTAL      29025

  • Report Script - How to get the total on the any number of rows selected

    Hi,<BR>I am using Essase and report script for the reporting purpose. In this i would like to know how to get the sum of all the rows selected. I know we can use the calculate row, but it has to be done with print row to display the newly created row. But i am using alphablox where this print row is not working. Is there any other alternative is there to get the sum of any number of rows, and displaying them??<BR>Please help me.<BR><BR>Regards<BR>R.Prasanna

    Pls check the structure and index.
    EMP_ID NUMBER(9) NOT NULL,
    EMP_CD           NUMBER(3),
    EMP_NO VARCHAR2(250 BYTE) NOT NULL,
    FROM_EFF_DT DATE NOT NULL,
    TO_EFF_DT DATE,
    CREATE INDEX IDX_EMP_NO ON EMP
    (EMP_NO)
    NOLOGGING
    TABLESPACE INDEXES
    PCTFREE 20
    INITRANS 10
    MAXTRANS 255
    STORAGE (
    INITIAL 56K
    NEXT 1784K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    FREELISTS 4
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT
    NOPARALLEL;

  • How to show the total in group footer in group header?

    Hello,
    I am having difficulties while showing the total of a group footer in the group header. The total in the group footer is correct, but when i am placing the formula in the header it is giving me 0.
    I am having 2 formulas to get the total which i placed in the footer:
    1.
    whileprintingrecords;
    numbervar sumpctx := sumpctx + {@Sum OB};
    2.
    whileprintingrecords;
    global numbervar sumpctx;
    numbervar DispSales;
    DispSales := sumpctx;
    sumpctx := 0;
    DispSales;
    now, I want to add the 2 formula in the header, but it is giving me 0 value, But in the group footer it is showing the correct value.
    I tried to do:
    Sum ({@Sum OB}) and it is giving that the field can not be summarized.
    The group Name is @Entity which is grouped by.
    @Entity :
    if {Customer.NAME}="NONE" THEN
    " OB"
    ELSE {Customer.NAME}
    Thanks in advance for yopur help.
    Regards

    Hi,
    What i was trying to say there is a hierarchy in report design and records are processed in that way.
    Report header/footer - only once
    Page header/footer -once in a page
    detail -n no of times ,n-no of rows of data
    First report header will be processed,then page header n detail,after that report and page footer.
    If u insert a group,then the order will be-
    report header,page header,group header,detail,group footer,detail,report and page footer.
    When u r in group header,all the records are not processed,that results the sum as zero.
    But when u create a formula,it calculates the sum first and then u put it there.
    I hope this time it will be helpful for u.
    Regards,
    Misra P.

Maybe you are looking for

  • Shay Shmeltzer : How To Build a Simple UIX Search Form

    Shay, I need your help here. I need to filter MessageChoice entries by doing setWhereClauseParam on the appropriate VO (The one that acts as a source for the LOV mode for MessageChoice). Say, this VO is in the 'root' level of AM_A. Everything from he

  • NF750 with Dual Monitors using Internal Video issue

    I'm currently trying to get this motherboard to output using both the builtin DVI, and HDMI for a dual monitor setup. Unfortunately what is happening is, first, while in windows with current output to DVI, connecting the HDMI, the monitor is not dete

  • Casting in JTree

    I am trying to respong to a JTree selection. I have the following lines... DefaultMutableTreeNode node = DefaultMutableTreeNode) tree.getLastSelectedPathComponent(); Object nodeInfo = node.getUserObject(); I get an Exception when I try and cast the O

  • Table control - doubt?

    I have given my code here, I dont know why the data from the table is not displayed in the table control. table control name - TABLE_CONTROL internal table name - TCTRL Flow logic:    PROCESS BEFORE OUTPUT. MODULE STATUS_0100. LOOP at tctrl into zalv

  • Changing language for spell cheking

    Is there a way to change the setting for spell checking in another lenguage?. say for instance to spanish? ive been trying to change it trough the system preference to work w/ pages but it just wont work it keeps trying to spell check in english....