ALV:   how to display only subtotals lines in theoutput

hi
in the alv list output
if we display subtotals based on 3 feilds out of 10
we see subtotals (sum) based on the end of each field
now i want to display only the lines which are displayed as subtotals in the output
we have parameter
totals_only(1) type c,        " show only totals
in the structrure slis_layout_alv
i have used it but i can see no change in the output

hai
data : GT_SORT             TYPE SLIS_T_SORTINFO_ALV,
ABAP List Viewer
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME = 'ITAB1'
IS_LAYOUT =  GS_LAYOUT
IT_FIELDCAT = GT_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
  IT_SORT = GT_SORT[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
  IT_EVENTS = GT_EVENTS[]
IT_EVENT_EXIT =
  IS_PRINT = GS_PRINT
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = ITAB1
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM.
DATA SORTING AND SUBTOTAL
DATA: GS_SORT TYPE SLIS_SORTINFO_ALV.
CLEAR GS_SORT.
GS_SORT-FIELDNAME = 'FIELD1'.
GS_SORT-SPOS      = 1.
GS_SORT-UP        = 'X'.
GS_SORT-SUBTOT    = 'X'.
APPEND GS_SORT TO GT_SORT.
CLEAR GS_SORT.
GS_SORT-FIELDNAME = 'FIELD2'.
GS_SORT-SPOS      = 2.
GS_SORT-UP        = 'X'.
*GS_SORT-SUBTOT    = 'X'.
APPEND GS_SORT TO GT_SORT.
ENDFORM.
regard
nawa

Similar Messages

  • ALV: how to display only subtotals and total rows in the output

    ALV: how to display only subtotals and total rows in the output
    i am getting output
    i am getting subtotals for respective fields
    but i want to display only subtotals and totals rows in the output
    i have tried the
    totals_only   parameter in slis_layout_alv
    but it is not working.

    hi,
    For TOTAL
    For the amount field / quantity field in the field catalog give DO_SUM = 'X'    for WHOLE total
    For SUBTOTAL
    For subtotal you will have to create an internal table sort..Let's say you want to do subtotal for each customer..
    DATA: lt_sort type SLIS_T_SORTINFO_ALV,
    ls_sort type slis_sortinfo_alv.
    CLEAR ls_sort.
    ls_sort-spos = 1.
    ls_sort-fieldname = 'Give the field name that you do the sum'.
    ls_sort-up = 'X'.
    ls_sort-subtot = 'X'.
    APPEND ls_sort TO lt_sort.
    fieldcatalog-do_dum = 'X'.
    for subtotals
    WA_SORT-FIELDNAME = 'ERSDA'.
    WA_SORT-SPOS = '2'.
    WA_SORT-UP = 'X'.
    WA_SORT-SUBTOTAL = 'X'.
    APPEND WA_SORT TO IT_SORT.
    Refer
    http://help.sap.com/saphelp_erp2004/helpdata/en/ee/c8e056d52611d2b468006094192fe3/content.htm
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/doesnt-function-event-subtotal_text-in-alv-713787
    regards,
    Prabhu
    reward if it is helpful

  • Want to Display only Subtotals

    Hi All,
    I Have report which Dispays Segment wise in that currency wise totals.
    I want to Display only Subtotals in the Report  currency wise.
    Not to Display grand Total and each line items.
    Can any help me how to go ahead.
    Points will be rewarded
    Thanks in advacnce
    Ramesh

    in the layout click on the layout symbol and check the subtotal checkbox for the filed you want to display the subtotals.. sort as per the sequence you want and save the layout...
    this can be done if the field catalog is defined to do sum for that fields..

  • How to display smartforms table lines useing different background colour

    Hi all:
    How to display smartforms table lines useing different background colour .
    for example:
    line1:green
    line2:red
    line3:green
    line4:red
    line5:green
    line6:red
    line7:green
    line8:red
    Any help is highly appreciated!!
    启明星

    Hi,
    Create a two lines one for header and second for data in the table.
    1)In table painter we can find the pencil mark.
    2)select the pencil mark
    3)now select the line which you need to shade
    4) now select the shading colour in the table painter and the provide the resolution up to 100% and select table pattrn for that line.
    5) Now you can use this for the header now only the header gets shaded and the remaining gets unshaded.
    reward points if useful
    Thanks and Regards,
    Nishant

  • DART: FTWL displays only 100 lines

    Dear DART experts and users, I wanted to display the extracted data from the data extract browser (FTWL), using the "Display Appl. Server Files" button (or feature), but it displays only 100th lines.  Have you ever run into this and what was the solution to display more than 100th lines? 2nd question is can you download the "entire" extract file to a text file format including header description at once?  I understand that you can display and/or download each segment header individually, but I'm wondering if there is a way to download all segments’ header and their lines at once. Regards,

    Hmmm ,
    Showing/viewing 100 lines is no problem but..
    What is your System release ecc60? EHP ?
    Or do you have an older 4.6C 4.7 system?
    What is your Dart release 2.5, 2.6, 2.7, 2.7e ??
    You need to better explain what you mean with your second question then, if my answer was not what you were looking for. If you’re talking about down loading everything you see to a text format when calling the FTWL, then this can be done with a little programming.  I am not aware of a SAP transaction that allows you to do this all at once.
    Kind regards
    Mark

  • Displaying metadata, how to display ONLY the Date

    I would like to display the Date below each image in Aperture 3. When I select "Date" in the Browser & Viewer Metadata window, the result is a very long string with the Date, the Time and the Time Zone. meaning that most of the time I see nothing because the string is much too long to be displayed...
    How to display ONLY the Date ?
    Thank you.
    Olivier

    om28 wrote:
    I will do that but still... if the Date could be ONLY the Date "without time and time zone", I would be able to display more information.. and it will look nicer.
    I said at the top of my first response above: +Afaik, there is no way within Aperture to change the date format of the date metadata overlay.+
    Send Aperture feedback to Apple via "Aperture→Provide Aperture Feedback"
    In the past I used Expression Media and the config for displaying such info was better.
    Aperture has a strange interface for it (and for other parameters), it does not behave at all like an Apple software (for the GUI), probably an external development team... but I agree it is more complex than iPhoto.
    Aperture is 10x more complex than iPhoto.
    If you want to see a rigid, boxed, "engineer"-style image database interface, take a look at Lightroom 3. It's a great program -- but it's a very different concept of information presentation and interaction.
    Thanks again.

  • I need to display only subtotals in the ALV and not the details.

    Hi,
    I have an ALV report . I have totals and subtotals in the same with details.
    My requirement is to have only subtotals and totals in my output. I do not want the details of all the items. I want only the subtotals row.
    Pls advice on this.

    Hi Shweta,
    FOR TOTAL:
    there is a property of fieldcatalog, that is do_sum.
    USE COED LIKE:
    PERFORM fieldcat USING:
    '1' 'KUNNR' 'I_MARD' 'CUSTOMER NO' ,
    '2' 'DMBTR' 'I_MARD' 'CURRENCY' ,
    FORM fieldcat USING value(p_0029)
    value(p_0030)
    value(p_0031)
    value(p_0032)
    wa_fieldcat-col_pos = p_0029.
    wa_fieldcat-fieldname = p_0030.
    wa_fieldcat-tabname = p_0031.
    wa_fieldcat-reptext = p_0032.
    wa_fieldcat-do_sum = 'X'.
    APPEND wa_fieldcat TO i_fieldcat.
    clear wa_fieldcat.
    ENDFORM. " FIELDCAT
    in final output you will get the total of currency field.
    FOR SUB TOTAL:
    decleare: i_sort type standard table of slis_sortinfo_alv,
              wa_sort type slis_t_sortinfo_alv.
    wa_sort-spos = '1'.
    wa_sort-fieldname = 'field1'.
    wa_sort-tablename = 'i_final'
    wa_sort-subtot = 'X'.
    wa_sort-group = 'X'.
    append wa_sort  to i_sort.
    clear: wa_sort.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    it_fieldcat = it_fieldcat
    it_sort = i_sort
    Hope this can solve your pbs.
    Regards,
    Tutun

  • How to get only one line between tables in database diagram?

    Hi!
    I'm using jdev 10.1.3. I've got a database schema with a lot of tables. I would like to have them in one database diagram in compact view with only ONE line between two tables even if there are more foreign key columns between the two tables. In the shema there are a lot of foreign keys with multiple columns and the diagram is hard to read.
    How to archieve this?
    Thanks,
    Carsten.

    hi,
    u should use the same variable across all your queries.In the WAD there is a propoerty "display same variable once". Check that.
    hope it helps,
    regards,
    Parth

  • How to draw only straight line instead of angled one??

    Dear friends,
    I saw a very good code posted by guru here(I think is camickr),
    But I tried to change it and I hope to draw only straight line instead of angled one, can you help how to do it??
    Thanks so much.
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class DrawingArea extends JPanel
         Vector angledLines;
         Point startPoint = null;
         Point endPoint = null;
         Graphics g;
         public DrawingArea()
              angledLines = new Vector();
              setPreferredSize(new Dimension(500,500));
              MyMouseListener ml = new MyMouseListener();
              addMouseListener(ml);
              addMouseMotionListener(ml);
              setBackground(Color.white);
         public void paintComponent(Graphics g)
              // automatically called when repaint
              super.paintComponent(g);
              g.setColor(Color.black);
              AngledLine line;
              if (startPoint != null && endPoint != null)
                   // draw the current dragged line
                   g.drawLine(startPoint.x, startPoint.y, endPoint.x,endPoint.y);
              for (Enumeration e = angledLines.elements(); e.hasMoreElements();)
                   // draw all the angled lines
                   line = (AngledLine)e.nextElement();
                   g.drawPolyline(line.xPoints, line.yPoints, line.n);
         class MyMouseListener extends MouseInputAdapter
              public void mousePressed(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        startPoint = e.getPoint();
              public void mouseReleased(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             AngledLine line = new AngledLine(startPoint, e.getPoint(), true);
                             angledLines.add(line);
                             startPoint = null;
                             repaint();
              public void mouseDragged(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             endPoint = e.getPoint();
                             repaint();
              public void mouseClicked( MouseEvent e )
                   if (g == null)
                        g = getGraphics();
                   g.drawRect(10,10,20,20);
         class AngledLine
              // inner class for angled lines
              public int[] xPoints, yPoints;
              public int n = 3;
              public AngledLine(Point startPoint, Point endPoint, boolean left)
                   xPoints = new int[n];
                   yPoints = new int[n];
                   xPoints[0] = startPoint.x;
                   xPoints[2] = endPoint.x;
                   yPoints[0] = startPoint.y;
                   yPoints[2] = endPoint.y;
                   if (left)
                        xPoints[1] = startPoint.x;
                        yPoints[1] = endPoint.y;
                   else
                        xPoints[1] = endPoint.x;
                        yPoints[1] = startPoint.y;
         public static void main(String[] args)
              JFrame frame = new JFrame("Test angled lines");
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              DrawingArea d = new DrawingArea();
              frame.getContentPane().add( d );
              frame.pack();
              frame.setVisible(true);
    }

    Change the AngledLine class to store two points instead of 3 points (I would rename the class to be StraightLine). The code is much simpler because you just store the starting and ending points and you don't need to calculate the middle point.

  • Urgent : ALV , how to display long text in colum field

    Dear All,
                  Have mada an ALV report, but in some column have to show long text like.
    "Qty of Processed Finished Goods receive with wt/length/pieces / units "
    but while display of ALV it's showing only :
    " Qty of Processed Finished Goods receive with wt/length/p "
    Plz tell is it possible to show all the contents in that field, even in multiple row. like :
    "Qty of Processed Finished
    Goods  receive with wt/length/pieces
    / units  "
    Looking forward to your earliest response.
    Regards,
    Gulrez Alam

    Hi,
      In your field catelog
    w_fieldcat-tabname   = 'Internal table name'.
      w_fieldcat-fieldname = 'Field of the internal table'.
      w_fieldcat-outputlen = '90'.----Here you have to increse the length
      w_fieldcat-col_pos   = '1'.
      w_fieldcat-row_pos   = '1'.
      w_fieldcat-seltext_l = 'Qty of Processed Finished Goods receive
                                       with wt/length/pieces / units '.
    APPEND w_fieldcat TO i_fieldcat.
      CLEAR w_fieldcat.
    Pls. reward if useful...

  • How to display the multiple lines text in a single - String, StringBuffer

    Hi,
    I have a textarea field named Decription which contains more than one line seperated by new line.I need to display those five lines in a single text without breaking. Is it possible? I am getting ArrayIndexOutOfBoundsException while i reached to the end of the line. Plz help me how to align the below code so that i can display the lines as a single line in my excel sheet.
                        if(op.getDescription()!=null)
                            String[] oppDescs = op.getDescription().split("\n");
                            StringBuffer sb = new StringBuffer();
                            for(int i1=0; i<=oppDescs.length-1;++i1)
                                *writeFile(sb.append(oppDescs[i1]), valueWriter);*
                         } else {
                            writeFile(op.getDescription(), valueWriter);
    private void writeFile(java.lang.Object value,PrintWriter valueWriter)
            if(value!=null)
                valueWriter.print(value);   
        }Thanks and Regards

    previous was java1.5
    heres a 1.1 - 1.4 version
    String[] oppDescs = op.getDescription().split("\n");
    StringBuffer sb = new StringBuffer();
    for(int i = 0; i < oppDescs.length : i++){
      sb.append(oppDescs);
    sb.append( '\t' );
    writeFile(sb.toString(), valueWriter );Edited by: simon_orange on 31-Oct-2008 13:02                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to display a goal line in a Flash 2D Line Chart?

    Hello,
    I am using Apex 3.0.1 and have a Flash 2d Line Chart displaying a ratio that varies from 1.0 to 1.6 for every month for a year. I need to draw a goal line at 1.2 to show the goal for the ratio. Also, I have grid lines enabled for the y-axis.
    Any pointers/tips on how to accomplish displaying this goal line would be really useful.
    Thanks and Regards,
    Dev

    I'm having the same problem!
    APEX is relatively new to me. CUSTOM XML for tweaking charts is even more recent. I tried to get a goal line to work in a line chart as you described but I have had no success. I really require a target/goal/reference line in a vertical bar chart but getting it to work in a line chart would be a welcome first step.
    I have tried the following 2 samples of code without success:
    <objects>
    <line value='94' text='Target' text_position='right' color='0xFF3300' size='1' alpha='100'/>
    </objects>
    and
    <objects>
    <trend start_value='94' end_value='94' start_argument='' end_argument='' value='' color='0xFF3300' thickness='1' alpha='100'/>
    </objects>
    ==> in the following blocks of the CUSTOM XML:
    <chart .....</chart>
    <chart..<line_chart .....</line_chart>..</chart>
    <workspace> .. <chart_area .....</chart_area> ..</workspace>
    <workspace> .. <y_axis .....</y_axis> ..</workspace>
    <workspace> .. <grid> ..<values .....</values ..</grid> ..</workspace>
    <workspace> .. <grid> .....</grid> ..</workspace>
    Any idea where I am going wrong or what could be missing? Maybe I'm not putting the <objects> parameters in the correct place in the code?
    System Info:
    Product Build: 3.0.1.00.07
    NLS_CHARACTERSET: WE8MSWIN1252
    DAD CHARACTERSET: UTF-8
    JOB_QUEUE_PROCESSES: 10
    Database Version Information
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE 10.2.0.3.0 Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Thanks for any help!
    Lawrence

  • How to display only selected columns in the table on the tableview

    Hi All,
    I am displaying in the below tableview the data from the SFLIGHTS tables in the tableview using flow logic. It displays all the columns in the database table. How can I set in the code to display only selected columns and not all columns.
    Also, in these columns displayed I want to make the key columns of SFLIGHT as non editable and the rest of the columns in SFLIGHT editiable. Can you please kindly share the code to implement this.
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page>
        <htmlb:form>
          <htmlb:tableView id              = "tv1"
                           visibleRowCount = "10"
                           selectionMode   = "lineEdit"
                           table           = "<%= flights %>"
                           filter = "SERVER"
                           sort = "server"
                           iterator        = "<%= iterator %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Thanks
    Karen

    Hi,
       Please try this code.
    <!-- To display Table control on BSP page with table internal table it_hist  --!>
              <htmlb:tableView id              = "TV_HIST"
                               headerText      = "Previous History"
                               headerVisible   = "TRUE"
                               footerVisible   = "TRUE"
                               design          = "ALTERNATING"
                               selectionMode   = "LINEEDIT"
                               visibleRowCount = "5"
                               fillUpEmptyRows = "TRUE"
                               table           = "<%= it_hist %>"
                               width           = "500" >
    <!--  to show selected columns give required field name --!>
    <htmlb:tableViewColumns>
      <htmlb:tableViewColumn columnName          = "FIELD1"
                                         title               = "COLUMN1"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
      <htmlb:tableViewColumn columnName          = "FIELD2"
                                         title               = "COLUMN2"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
      <htmlb:tableViewColumn columnName          = "FIELD3"
                                         title               = "COLUMN3"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
      <htmlb:tableViewColumn columnName          = "FIELD4"
                                         title               = "COLUMN4"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
    <!--  to make column editable set edit property to TRUE --!>
      <htmlb:tableViewColumn columnName          = "FIELD4"
                                         title               = "COLUMN4"
                                         edit = "TRUE"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
                </htmlb:tableViewColumns>
              </htmlb:tableView>

  • CM21 - How to display only released orders in CM21

    Hi,
    I want to display only released orders in trasaction CM21. Currently it is displaying both created and released orders.
    could you please guide me how to proceed?
    BR/
    Laxmikant Lande

    Hi lax,
              By the way this problem is solved by assigning set for released order to the filter set in selection profile.
    That's great. Taking a cue from you i also tried that but could not find that appropriate set name/identification which i may assign to the filter set to get only the released orders by default in CM21. Can you share your experience?
              On CM21 Filter screen, there is no std field to control order status ...
    You're right. Actually what i meant was that in the filter screen you get the order number as an input field. If you press f4 you will have the different matchcodes available to choose the order. If you select the order information system as the input help you will arrive at the standard COOIS or COOISPI screen where you can choose the released orders by giving REL as the input in sys status. This will pick up all the released orders.
    Regards
    Sm.
    Edited by: Sm on Sep 2, 2010 12:27 PM

  • How make display only the amount field in table control(infotype 0008)

    Dear Freinds,
    have to make display only the amount field (Q0008-bet01) on table control in infotype 0008 , could you tell me how to make it display only.
    i have tried the below coding it is not working in PBO & PAI of the user exit
    ZXPADU01 and ZXPADU02. For the table control is there any othe method??
           loop at screen.
               screen-name  = 'WA_P0008-BET01'.
              screen-input = 0.
              screen-output = 1.
              modify screen.
          endloop.
    i have tried like this as well
           loop at screen.
               screen-name  = 'Q0008-BET01'.
              screen-input = 0.
              screen-output = 1.
              modify screen.
          endloop.
    in the both the above methods it is not working. Could any one plese suggest me how to make display only the amount field in infotype 0008.
    regards
    syamla

    Dear Freinds,
    have to make display only the amount field (Q0008-bet01) on table control in infotype 0008 , could you tell me how to make it display only.
    i have tried the below coding it is not working in PBO & PAI of the user exit
    ZXPADU01 and ZXPADU02. For the table control is there any othe method??
           loop at screen.
               screen-name  = 'WA_P0008-BET01'.
              screen-input = 0.
              screen-output = 1.
              modify screen.
          endloop.
    i have tried like this as well
           loop at screen.
               screen-name  = 'Q0008-BET01'.
              screen-input = 0.
              screen-output = 1.
              modify screen.
          endloop.
    in the both the above methods it is not working. Could any one plese suggest me how to make display only the amount field in infotype 0008.
    regards
    syamla

Maybe you are looking for

  • ITunes Match erased metadata from my iTunes Library

    I have been frustrated by the inability to show music sorted on my iPod by “Album Artist.”  I really like that I am able to do this on my iPhone and iPad.  But the iPod will only show “Artist.”  This is a real pain when you have several albums by the

  • Windows 8.1 Installation

    When i installed Windows 8.1 my start screen doesn't works anymore i go to my desktop with crtl+alt+delete or i can't even go to my programs please one microsofts IT guys can help me with this problem my pc cant even function anymore the search bar d

  • HT4009 How do i get my money back if an in app purchase doesn't work?

    Itried to buy money in a game but the money didn't load and it still charged me for it.

  • Multiple Row selection in JSP using checkbox - Oracle BPM 10gR3

    Dear BPM Experts, Has anyone invoked JSP from Oracle BPM 10gR3 screen flow that has the following UI requirement. 1. When UI is loaded user is presented with multiple rows of pre-populated data(each column of the row represents attributes of a BPM ob

  • Problem in query help me

    hi i m having problem in query please help me here data is not coming SELECT HBKID FROM PAYR INTO CORRESPONDING FIELDS OF TABLE INT_PAYR  WHERE ZBUKR =  P_BUKRS AND  UBHKT IN (P_OHKONT). loop at int_payr. OUT_HBKID = int_payr-W_hbkid  . MODIFY INT_PA