Query Designer - Structure - Sub-totals display

Hi
I am currently creating a structure with different levels and I woul like to have the subtotal I calculate in the various formulas in the structure below the data and not above like it is now.
For example now :
lvl1Total Net Sales
***lvl2Gross Sales
***lvl2Discounts
What I would like :
***lvl2Gross Sales
***lvl2Discounts
lvl1Total Net Sales
I tried in the query properties/ Row & Colums to change  'result position' but it does not work.
Anyone has a clue ?
Thank you very mucn
Edited by: Nico0 on Mar 4, 2009 4:39 PM

Your requirement is not clear how ever you can try this
Right click on the characterustic and select display tab in that select Supress result rows -> Never
It will give you the subtotals.
If that does not work out follow the link and see if that is what you want. If none is helpful please elaborate your requirement with some numbers.
http://help.sap.com/saphelp_nw04s/helpdata/en/03/17f13a2f160f28e10000000a114084/frameset.htm
Hope this helps.
~Abhijit

Similar Messages

  • Sub totals display

    hai friends
    iam useing alv grid display to dispaly the report
    in that report i have LIFNR,BUKRS,BUDAT,DMBTR ,      SHKZG,WAERS  from BSIK table
    the problem is
    SHIKZG field we have values like S and H.
    so particular LIFNR may have both S and H values
    hear the requirement is
    in particular LIFNR     S valus should be subtracted from H values . and display the total after subtacting in sub totals.
    how can i do this
    pls any body help me
    thanks
    srikanth vipparla

    Your requirement is not clear how ever you can try this
    Right click on the characterustic and select display tab in that select Supress result rows -> Never
    It will give you the subtotals.
    If that does not work out follow the link and see if that is what you want. If none is helpful please elaborate your requirement with some numbers.
    http://help.sap.com/saphelp_nw04s/helpdata/en/03/17f13a2f160f28e10000000a114084/frameset.htm
    Hope this helps.
    ~Abhijit

  • Sub Total display in Samrtforms

    Hi ,
    I need to display sub totals in my smartform.Infact I have used Calcualtions Tab Under TABLE with Operation "Total"  and Time "After Loop"  which is displaying wrong values when Internal Table values are spanned to multiple pages. Can any body help me.
    Regards,
    Srinivas

    >
    SRINI VASA wrote:
    > I can not create any text node after Main Window and according to my requirement, I need to display my sub total in footer of my table inside Main Window.
    "..............Main window
    ".......................Table with loop
    "...........................main area with flow logic calculate sum here in some temp variable
    "..................................footer, print here your temp with text node
    No need to create text node after main window

  • Blocked ALV sub total Display

    hi,
    I'm working with Blocked ALV. In my program, passed the  Fieldcatlog-do_sum = 'X' . But then also i'm not getting totals. For that what i want to do in Blocked ALV.
    Regards,
    Bab

    Hi,
    For ALV Totals you can try doing,
    DATA : it_field TYPE slis_t_fieldcat_alv,
                 wa_field TYPE slis_fieldcat_alv.
    DATA:  itab_sort TYPE slis_t_sortinfo_alv,
                 wa_sort TYPE slis_sortinfo_alv.
      wa_field-fieldname = 'MENGE'.
      wa_field-tabname = 'IT_TAB'.
      wa_field-outputlen = 20.
      wa_field-seltext_l ='Quantity'.
      wa_field-input = ' '.
      wa_field-edit = ' '.
      wa_field-col_pos = '4'.
      wa_field-hotspot = 'X'.
      wa_field-do_sum = 'X'.              "For totalling
      APPEND wa_field TO it_field.
      CLEAR wa_field.
    *Manintainig internal table for sorting
    wa_sort-spos = 1.
      wa_sort-fieldname = 'EBELP'.
      wa_sort-tabname = 'IT_tab'.
      wa_sort-up = 'X'.
      wa_sort-subtot = 'X'.              "For totalling
      APPEND wa_sort TO itab_sort.
      CLEAR wa_sort.
    Then you can pass these two internal tables in Reuse ALV grid Function Module.
    Hope it helps
    Regards
    Mansi

  • Master data is not getting displayed in the Query Designer

    Hi,
    I have a DSO in which I have an InfoObject called Emp No. in the Data Field.
    The Emp.No is being maintained as master with (Emp Name, Address, Telephone No, DOB) as attributes.
    I have loaded the data in the Emp. No. master. Then tried loading the transaction data in DSO.
    The Emp.No is there in the DSO active data, but in the query designer its not getting displayed.
    Hope its clear.
    Please help.
    Thanks

    Hi,
    I have brought the Emp. No. in the Key Field and also have activate the master data again.
    Yet my Query Designer doesn't have the Emp. No.
    I have done a full load for both Master and Transaction.
    Please advice me what the other alternative.
    Thanks

  • What role is required to open and execute query in BE query designer

    Hi,
    Am new to BE, need to know what role should i be assigned with to open and execute  a query in query designer.
    OPEN dialobox displays "NO role availabe".
    Is this a problem of role assignment or am i missing some steps
    thanks
    srikanth

    IN Enterprise portal plz check whether these roles are present or not.
    pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/Roles/com.sap.ip.bi.business_explorer_showcase
    pcd:portal_content/com.sap.gm.cnt/core/VCRole
    pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/Roles/com.sap.ip.bi.bi_showcase
    pcd:portal_content/administrator/content_admin/content_admin_role
    pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/Roles/com.sap.ip.bi.business_planning_showcase
    pcd:portal_content/every_user/general/eu_role
    in BW front end , you have to create role with the auth objects S_RS_COMP, S_RS_COMP1, S_RS_MPRO, S_RS_ICUBE auth objects.
    include the t-codes if necessary. RSRT you can include.
    Hope this would help you.

  • Sub Total Button in Report Painter Output

    Hi,
    I am working on the Balance Sheet Report in the Report Painter and i am trying to display the sub totaling display in the output.
    In this i had defined the row which is based on the range of Account Number and it has the series i.e. 100000,30000,200000 etc..
    Is it possible to display the output sub total on the basis of the Account Number Series which is mentioned above. As in a ALV Report we have the sub total button  in report output.
    If it is,then please provide me guidelines for it ......
    Edited by: ricx .s on Jul 29, 2009 6:47 AM

    Hi,
    Try this code,
    it working,
    Data :  X_SORT      TYPE SLIS_SORTINFO_ALV,
    IT_SORT     TYPE SLIS_T_SORTINFO_ALV,
    X_SORT-SPOS = 1.                                " Field number of ALV on which u want to sort
      X_SORT-FIELDNAME = 'SEGMENT' .     " field name
      X_SORT-TABNAME = 'IT_ALV1'(001).  "table name same as ur alv table name
      X_SORT-UP = 'X'.                                   " put up as 'X'
      X_SORT-SUBTOT = 'X'.                      " Sub total allowed
      APPEND X_SORT TO IT_SORT.          "append
      CLEAR X_SORT.                                "clear x_SORT
    "in ALV_GRID_DISPLAY pass the it sort in it_SORT
    IT_SORT                 =   IT_SORT
    Thanks
    Arun Kayal

  • Number Format in Query Designer

    Hi,
    I have changed the properties of key figure to 6 decimal places from 2 decimals in the Infoobject Properties.But in Query designer it is still displayed as (from key figure 0.00).
    As i have mentioned 6 decimal places in the key figure , why it is still displayed as 2 decimal places in the Query Designer.
    regards,
    Anita

    Hi Pradip,
    I have selected as  "from Key figure 0.00" in Query Designer.In key figure properties I have changed the data type to Fltp & in additional propertied I have set it to 6 decimal places.
    Now when i execute the Queries still it is showing me only 2 decimal places instead of 6.
    if i set it manually to 6 its working fine.but i dont want to do this , as i need to change it more then 100 queries.
    Regards,
    Anita

  • BW 7.0 - display of the global structures in the query designer

    Hi colleagues,
    When I open the gobal structures of an infoprovider in the query designer, the system shows me all levels of the structures; that is not clearly arranged.
    It would be better, the system would show allways  only the next level.
    Is there any idea ?
    regards
    Dieter Gerl

    Hi,
    I can think of three possibilities for a solution.
    1. Store the name of the required table in a config table and select at runtime
    2. use an 'IF' or 'CASE' statement to deterimine which system you are currently in and then place the required varible within this statement.
    3. Preferred solution: use a Field Symbol to assign the table at run-time, this way no errors will occur and your program will compile.
    There are many examples of FIELD SYMBOLS on SDN and even the F1 help in SAP.
    regards,
    CH

  • Control display level for "display as hierarchy" in BI 7 Query Designer ?

    Hi
    I'm using BI 7.0 query designer and I can see there's an additional difference between BI 3.5 and BI 7.0 in rows/columns behavior, in the "display as hierarchy" functionality.
    In BW 3.5 one could specify till what level the expand needed to be by default. So it could be 0 for totally collapsed. This is seems not possible anymore in BI 7.0 query designs anymore. Only on natural/technical hierarchies (cost center etc ...) this option is still there.
    Is there a way (javascript or other) to have the hierarchies created by "display as hierarchy" also fully collapsed by default ?
    Thanks.
    Geert

    HI, thanks for the reply.
    But this is not about the standard InfoObject 'hierarchy" tab, with all it's options on default expand levels etc.
    This is about a "pseudo structure" hierarchy which is defined at designtime (in Query Designer) and generated/shown at runtime (so bad for performance, I know). It's based on the real transaction data, not on a pre-created hierarchy as in normal hierarchies. It creates a tree view of otherwise unrelated InfoObjects, displays it in an collapsible/expandable tree shape.
    it's a bit hidden in version 7 Query Designer, compared to version 3.5. In 3.5 one had a larger set of options, including the -now lacking- default expand-to level. But in Version 7, most options are dropped. Probably due to the move from the ABAP to the java backend, lots of other stuff got culled in that move as well.
    For more info, look at the posts from Larry in this thread : [Display as Hierarchy|Display as Hierarchy]
    I know it's an option not used a lot but can be handy in certain cases.
    I really would like some help in getting a default query result with the "display as Hierarchy" collapsed.
    Thanks,
    Geert

  • ALV Display - sub totals

    hi gurus,
    In my report program i have a monthly report displaying the data for that month.
    1. Now in my ALV grid i want The SUB-TOTALS for the work center wise data for a field of the alv.  there are many workcenters data in my report.  So after the end of each work center , i want the subtotal of a calculated TAT field.
    2. At the end of the report, I want the average TAT(field calculated by my report program) for that month.
    So how can i make the coding for the above.
    Iam a fresher to this field, so give me in detail.
    regards,
    chaitanya

    Hi
    i am giving a sample example for subtotals of alv.
    REPORT z_alv_subtotal.
    *& Table declaration
    TABLES: EKKO.
    *& Type pool declaration
    TYPE-POOLS: SLIS. " Type pool for ALV
    *& Selection screen
    SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN.
    *& Type declaration
    Type declaration for internal table to store EKPO data
    TYPES: BEGIN OF X_DATA,
    EBELN TYPE CHAR30, " Document no.
    EBELP TYPE EBELP, " Item no
    MATNR TYPE MATNR, " Material no
    MATNR1 TYPE MATNR, " Material no
    WERKS TYPE WERKS_D, " Plant
    WERKS1 TYPE WERKS_D, " Plant
    NTGEW TYPE ENTGE, " Net weight
    GEWE TYPE EGEWE, " Unit of weight
    END OF X_DATA.
    *& Internal table declaration
    DATA:
    Internal table to store EKPO data
    I_EKPO TYPE STANDARD TABLE OF X_DATA INITIAL SIZE 0,
    Internal table for storing field catalog information
    I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    Internal table for Top of Page info. in ALV Display
    I_ALV_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
    Internal table for ALV Display events
    I_EVENTS TYPE SLIS_T_EVENT,
    Internal table for storing ALV sort information
    I_SORT TYPE SLIS_T_SORTINFO_ALV,
    I_EVENT TYPE SLIS_T_EVENT.
    *& Work area declaration
    DATA:
    WA_EKKO TYPE X_DATA,
    WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
    WA_EVENTS TYPE SLIS_ALV_EVENT,
    WA_SORT TYPE SLIS_SORTINFO_ALV.
    *& Constant declaration
    CONSTANTS:
    C_HEADER TYPE CHAR1
    VALUE 'H', "Header in ALV
    C_ITEM TYPE CHAR1
    VALUE 'S'.
    *& Start-of-selection event
    START-OF-SELECTION.
    Select data from ekpo
    SELECT EBELN " Doc no
    EBELP " Item
    MATNR " Material
    MATNR " Material
    WERKS " Plant
    WERKS " Plant
    NTGEW " Quantity
    GEWEI " Unit
    FROM EKPO
    INTO TABLE I_EKPO
    WHERE EBELN IN S_EBELN
    AND NTGEW NE '0.00'.
    IF SY-SUBRC = 0.
    SORT I_EKPO BY EBELN EBELP MATNR .
    ENDIF.
    To build the Page header
    PERFORM SUB_BUILD_HEADER.
    To prepare field catalog
    PERFORM SUB_FIELD_CATALOG.
    Perform to populate the layout structure
    PERFORM SUB_POPULATE_LAYOUT.
    Perform to populate the sort table.
    PERFORM SUB_POPULATE_SORT.
    Perform to populate ALV event
    PERFORM SUB_GET_EVENT.
    END-OF-SELECTION.
    Perform to display ALV report
    PERFORM SUB_ALV_REPORT_DISPLAY.
    *& Form sub_build_header
    To build the header
    No Parameter
    FORM SUB_BUILD_HEADER .
    Local data declaration
    DATA: L_SYSTEM TYPE CHAR10 , "System id
    L_R_LINE TYPE SLIS_LISTHEADER, "Hold list header
    L_DATE TYPE CHAR10, "Date
    L_TIME TYPE CHAR10, "Time
    L_SUCCESS_RECORDS TYPE I, "No of success records
    L_TITLE(300) TYPE C. " Title
    Title Display
    L_R_LINE-TYP = C_HEADER. " header
    L_TITLE = 'Test report'(001).
    L_R_LINE-INFO = L_TITLE.
    APPEND L_R_LINE TO I_ALV_TOP_OF_PAGE.
    CLEAR L_R_LINE.
    Run date Display
    CLEAR L_DATE.
    L_R_LINE-TYP = C_ITEM. " Item
    WRITE: SY-DATUM TO L_DATE MM/DD/YYYY.
    L_R_LINE-KEY = 'Run Date :'(002).
    L_R_LINE-INFO = L_DATE.
    APPEND L_R_LINE TO I_ALV_TOP_OF_PAGE.
    CLEAR: L_R_LINE,
    L_DATE.ENDFORM. " sub_build_header
    *& Form sub_field_catalog
    Build Field Catalog
    No Parameter
    FORM SUB_FIELD_CATALOG .
    Build Field Catalog
    PERFORM SUB_FILL_ALV_FIELD_CATALOG USING:
    '01' '01' 'EBELN' 'I_EKPO' 'L' 'Doc No'(003) ' ' ' ' ' ' ' ',
    '01' '02' 'EBELP' 'I_EKPO' 'L' 'Item No'(004) 'X' 'X' ' ' ' ',
    '01' '03' 'MATNR' 'I_EKPO' 'L' 'Material No'(005) 'X' 'X' ' ' ' ',
    '01' '03' 'MATNR1' 'I_EKPO' 'L' 'Material No'(005) ' ' ' ' ' ' ' ',
    '01' '04' 'WERKS' 'I_EKPO' 'L' 'Plant'(006) 'X' 'X' ' ' ' ',
    '01' '04' 'WERKS1' 'I_EKPO' 'L' 'Plant'(006) ' ' ' ' ' ' ' ',
    '01' '05' 'NTGEW' 'I_EKPO' 'R' 'Net Weight'(007) ' ' ' ' 'GEWE' 'I_EKPO'
    ENDFORM. " sub_field_catalog
    *& Form sub_fill_alv_field_catalog
    *& For building Field Catalog
    *& p_rowpos Row position
    *& p_colpos Col position
    *& p_fldnam Fldname
    *& p_tabnam Tabname
    *& p_justif Justification
    *& p_seltext Seltext
    *& p_out no out
    *& p_tech Technical field
    *& p_qfield Quantity field
    *& p_qtab Quantity table
    FORM SUB_FILL_ALV_FIELD_CATALOG USING P_ROWPOS TYPE SYCUROW
    P_COLPOS TYPE SYCUCOL
    P_FLDNAM TYPE FIELDNAME
    P_TABNAM TYPE TABNAME
    P_JUSTIF TYPE CHAR1
    P_SELTEXT TYPE DD03P-SCRTEXT_L
    P_OUT TYPE CHAR1
    P_TECH TYPE CHAR1
    P_QFIELD TYPE SLIS_FIELDNAME
    P_QTAB TYPE SLIS_TABNAME.
    Local declaration for field catalog
    DATA: WA_LFL_FCAT TYPE SLIS_FIELDCAT_ALV.
    WA_LFL_FCAT-ROW_POS = P_ROWPOS. "Row
    WA_LFL_FCAT-COL_POS = P_COLPOS. "Column
    WA_LFL_FCAT-FIELDNAME = P_FLDNAM. "Field Name
    WA_LFL_FCAT-TABNAME = P_TABNAM. "Internal Table Name
    WA_LFL_FCAT-JUST = P_JUSTIF. "Screen Justified
    WA_LFL_FCAT-SELTEXT_L = P_SELTEXT. "Field Text
    WA_LFL_FCAT-NO_OUT = P_OUT. "No output
    WA_LFL_FCAT-TECH = P_TECH. "Technical field
    WA_LFL_FCAT-QFIELDNAME = P_QFIELD. "Quantity unit
    WA_LFL_FCAT-QTABNAME = P_QTAB . "Quantity table
    IF P_FLDNAM = 'NTGEW'.
    WA_LFL_FCAT-DO_SUM = 'X'.
    ENDIF.
    APPEND WA_LFL_FCAT TO I_FIELDCAT.
    CLEAR WA_LFL_FCAT.
    ENDFORM. " sub_fill_alv_field_catalog
    *& Form sub_populate_layout
    Populate ALV layout
    No Parameter
    FORM SUB_POPULATE_LAYOUT . CLEAR WA_LAYOUT.
    WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'." Optimization of Col width
    ENDFORM. " sub_populate_layout
    *& Form sub_populate_sort
    Populate ALV sort table
    No Parameter
    FORM SUB_POPULATE_SORT .
    Sort on material
    WA_SORT-SPOS = '01' .
    WA_SORT-FIELDNAME = 'MATNR'.
    WA_SORT-TABNAME = 'I_EKPO'.
    WA_SORT-UP = 'X'.
    WA_SORT-SUBTOT = 'X'.
    APPEND WA_SORT TO I_SORT .
    CLEAR WA_SORT.
    Sort on plant
    WA_SORT-SPOS = '02'.
    WA_SORT-FIELDNAME = 'WERKS'.
    WA_SORT-TABNAME = 'I_EKPO'.
    WA_SORT-UP = 'X'.
    WA_SORT-SUBTOT = 'X'.
    APPEND WA_SORT TO I_SORT .
    CLEAR WA_SORT.
    ENDFORM. " sub_populate_sort
    *& Form sub_get_event
    Get ALV grid event and pass the form name to subtotal_text
    event
    No Parameter
    FORM SUB_GET_EVENT .
    CONSTANTS : C_FORMNAME_SUBTOTAL_TEXT TYPE SLIS_FORMNAME VALUE
    'SUBTOTAL_TEXT'.
    DATA: L_S_EVENT TYPE SLIS_ALV_EVENT.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
    I_LIST_TYPE = 4
    IMPORTING
    ET_EVENTS = I_EVENT
    EXCEPTIONS
    LIST_TYPE_WRONG = 0
    OTHERS = 0.
    Subtotal
    READ TABLE I_EVENT INTO L_S_EVENT
    WITH KEY NAME = SLIS_EV_SUBTOTAL_TEXT.
    IF SY-SUBRC = 0.
    MOVE C_FORMNAME_SUBTOTAL_TEXT TO L_S_EVENT-FORM.
    MODIFY I_EVENT FROM L_S_EVENT INDEX SY-TABIX.
    ENDIF.
    ENDFORM. " sub_get_event
    *& Form sub_alv_report_display
    For ALV Report Display
    No Parameter
    FORM SUB_ALV_REPORT_DISPLAY .
    DATA: L_REPID TYPE SYREPID .
    L_REPID = SY-REPID .
    This function module for displaying the ALV report
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = L_REPID
    I_CALLBACK_TOP_OF_PAGE = 'SUB_ALV_TOP_OF_PAGE'
    IS_LAYOUT = WA_LAYOUT
    IT_FIELDCAT = I_FIELDCAT
    IT_SORT = I_SORT
    IT_EVENTS = I_EVENT
    I_DEFAULT = 'X'
    I_SAVE = 'A'
    TABLES
    T_OUTTAB = I_EKPO
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2.
    IF SY-SUBRC <> 0.
    MESSAGE i000 WITH 'Error in ALV report display'(055).
    ENDIF.ENDFORM. " sub_alv_report_display
    FORM sub_alv_top_of_page
    Call ALV top of page
    No parameter
    FORM SUB_ALV_TOP_OF_PAGE. "#EC CALLED
    To write header for the ALV
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = I_ALV_TOP_OF_PAGE.
    ENDFORM. "alv_top_of_page
    *& Form subtotal_text
    Build subtotal text
    P_total Total
    p_subtot_text Subtotal text info
    FORM SUBTOTAL_TEXT CHANGING
    P_TOTAL TYPE ANY
    P_SUBTOT_TEXT TYPE SLIS_SUBTOT_TEXT.
    Material level sub total
    IF P_SUBTOT_TEXT-CRITERIA = 'MATNR'.
    P_SUBTOT_TEXT-DISPLAY_TEXT_FOR_SUBTOTAL
    = 'Material level total'(009).
    ENDIF.
    Plant level sub total
    IF P_SUBTOT_TEXT-CRITERIA = 'WERKS'.
    P_SUBTOT_TEXT-DISPLAY_TEXT_FOR_SUBTOTAL = 'Plant level total'(010).
    ENDIF.

  • In query designer, an hierarchy(structure)  duplicating lines in level 2.

    Here we are at version 7.0 - SP 10, I have created a structure hierarchy in BEX, and when I execute this query the result is ok ... until I tried to closed or open the second level.
    At first, it doesn't close, and the worst if I tried to open  it's
    duplicating the lines of the second level.
    In query designer, creating an hierarchy(structure) something like this:
    > total division 1    
    ...> division 1.1     
    ...> division 1.2     
    > total division 2    
    ...> division 2.1     
    ...> division 2.2     
    and after the execution, if I tried to close or open the level of division 2 the result will duplicates the lines division 2.1 and division  2.2. the result is like this:
    > total division 1    
    ...> division 1.1     
    ...> division 1.2     
    > total division 2    
    ...> division 2.1     
    ...> division 2.2
    <b>...> division 2.1     
    ...> division 2.2</b>
    The stange is in excel it works normaly.
    Best regards,
    Silvio Meurer

    Hi,
    An Heirarchy is always an addition of the below nodes. hence. WBS 1 = WBS 1.1 + WBS 1.2. since youre looking at durations. it will add up 7+9 instead of looking at earliest start and latest end dates.
    dont know if itll work but a suggestion would be to get the start date and end date for WBS 1 and then do the calculation for duration in a formula in query designer.
    regards,
    Dilanke

  • How to get grand total in query designer

    Hi,
       Antbody know how to get the grand total after the  last row in query designer? I
    Thanks

    Hi,
    If we select the very first Characterstic in the rows section and set the Supress result rows as "never".
    That will show the overall result in the end of the report,
    In the query properties tab ,check for display properties of the result.That should be set to bottom.
    Hope this will work.
    Thanks
    Mukesh

  • Help in the query for sub total.

    hi friends.
           i have a query display below output.
          but i wanted to get sub total of each repeated records,.
    Output is like below.  
    Segment
    Units
    Total items
    CRE
    CRE - MUMBAI
    3
    CTA
    CTA - CHENNAI
    13
    CTA
    CTA - DELHI
    37
    CTA
    CTA - HYDERABAD
    10
    CTA
    CTA - KOLKATTA
    22
    CTA
    CTA - MUMBAI
    110
    Now i need to show like below.  if you see the sub total in bold.
    Segment
    Units
    Total items
    CRE
    CRE - MUMBAI
    3
    CRE
    Sub Total
    3
    CTA
    CTA - CHENNAI
    13
    CTA
    CTA - DELHI
    37
    CTA
    CTA - HYDERABAD
    10
    CTA
    CTA - KOLKATTA
    22
    CTA
    CTA - MUMBAI
    110
    CTA
    Sub Total
    192
    please help.

    with
    the_data as
    (select 'CRE' segment,'CRE - MUMBAI' units,3 total_items from dual union all
    select 'CTA','CTA - CHENNAI',13 from dual union all
    select 'CTA','CTA - DELHI',37 from dual union all
    select 'CTA','CTA - HYDERABAD',10 from dual union all
    select 'CTA','CTA - KOLKATTA',22 from dual union all
    select 'CTA','CTA - MUMBAI',110 from dual
    select segment,
           case grouping_id(segment,units) when 0
                                           then units
                                           when 1
                                           then 'Sub total'
                                           else 'Grand total'
           end units,
           sum(total_items) total_items
      from the_data
    group by rollup(segment,units)
    SEGMENT
    UNITS
    TOTAL_ITEMS
    CRE
    CRE - MUMBAI
    3
    CRE
    Sub total
    3
    CTA
    CTA - DELHI
    37
    CTA
    CTA - MUMBAI
    110
    CTA
    CTA - CHENNAI
    13
    CTA
    CTA - KOLKATTA
    22
    CTA
    CTA - HYDERABAD
    10
    CTA
    Sub total
    192
    Grand total
    195
    Regards
    Etbin

  • 'Display as hierarchy' in the Query Designer

    Hi,
          Can anyone highlight some points or importance of 'display as hierarchy' in either rows or columns in the query designer. Also could someone put some thoughts on the 'new structure' in the query designer, is it just that we can create some new selection and new formula from the structure or is there any other explanation for its existence. Any kind of explanation would be greatly appreciated.
    Thanks,
    Anjali.

    Hi Anjali,
    display as Hierarchies:
    simply enables you to select and use hierarchies for that InfoObject if available.
    Structures:
    you can create structures with or without keyfigures. Structures give you a great deal of flexibility and consistancy in your reports. Eg. you can create a structure that gives you a drilldown on char selections that are different for each line or column. We use that to "simulate" divisions in a drilldown that we don't have backed up by masterdata.
    Also structures enable you to keep reports consistant by using the same global structure eg. for all Contribution margin reports
    Hope that helped,
    regards,
    michael

Maybe you are looking for