Alv_grid total problem

Hi experts,
            my problem in the alv grid is when i subtract the amount its coming diffrent.
like 221,397,000 - 1,000 = 221,396,000 but here its coming it as 22,139,699,000. as its subtracting by (dot) .1000 . so wat might b the problem & hw to change it.
Regards
Sunita.

hi sunita
you cn go thru dis documentation
http://help.sap.com/saphelp_nw04/helpdata/en/fa/efb52cf8a611d2b48d006094192fe3/frameset.htm
hope this helps
regards
Aakash Banga

Similar Messages

  • Grand Total problem

    I have grand total problem. This is my pivot table.
    A B A/B
    1 10 0,1
    2 4 0,5
    8 3 2,67
    {color:#ff0000}11 17 _3,27_ GRAND TOTAL{color} (0,1+0,5+2,67)
    A - AVG type
    B - SUM type
    How to make obi calculate grand total like this:
    A B A/B
    1 10 0,1
    2 4 0,5
    8 3 2,67
    {color:#0000ff}11 17 _0,647_ GRAND TOTAL{color} (11/17)
    Is that posssible?
    Would it help to add *<ReportAggregateEnabled>true</ReportAggregateEnabled>*
    in instanceconfig.xml?
    Edited by: Micek on 2009.02.09 12:53

    Conceptually Report Aggregate Enabled should work. Look into this blog article which refers same.
    http://oraclebi.soundvoid.net/2008/10/grand-totals-with-calculated-columns-2/

  • 'Some of the items in the iTunes library were not copied to the iPod because they cannot be found....94 total problems' ??

    "Some of the items in the iTunes library were not copied to the iPod because they cannot be found....94 total problems"
    I keep getting this everytime I plug in my iPod ....I really dont want to lose NINETY FOUR songs, as these are the most played ones! I don't know why it's doing this and its freakin annoying!
    Can anybody PLEASE help me?????

    Thanks for the answer, but this is not a nano, it's a 5th gen 60GB wth video.
    http://support.apple.com/kb/ht1353
    Disk use is already enabled and I manually manage my music.

  • Total Problem in scripts

    Hi,
    I'm facing one big issue in scripts.ie: in printing totals.
      for totals i write a subroutine in scripts.
      it's working fine.it's displaying totals well.here my problem is first i see the print preview.at that time total is correct.but when i came back and see the print preview again it displaying wrong.ie if first time the total is 'A'.Then second time it displaying like (A+A).
      other problem is when i see the print preview and displays it and go back and took the print at that time also it displaying (A+A).
    My code is like :
    *&      Form  GET_EXTPR_TOT
        this routine will get the LINE ITEM EXTENDED PRICE TOTALS When
        there is no PROMO CODE.
    form get_extpr_tot tables it_input structure itcsy it_output structure itcsy.
      data: v_vbeln2(10) type n.
      clear it_input.
      clear v_vbeln2.
      read table it_input index 1.
      move it_input-value to v_vbeln2.
      read table it_input index 2.
      move it_input-value to v_extpr_tot.
      v_extpr_tot1 = v_extpr_tot1 + v_extpr_tot.
      read table it_output index 1.
      write v_extpr_tot1 to it_output-value left-justified.
      modify it_output index 1.
      clear it_output.
    endform.                    "GET_EXTPR_TOT
    Please Send ur valuable answers.
    Thanks,
    Srinivas.

    Hi Srinivas,
    In your script you can define the total variable in one of the header related elements that will be called. for exaple you can define it in the element
    /E HEADER_TARGET_VALUE
    /: DEFINE &V_EXTPR_TOT1& = ' '
    and change your code in ITEM_LINE_PRICE_QUANTITY element as follows
    /E ITEM_LINE_PRICE_QUANTITY
    /* Begin of modification (RICEF/Issue Number:F-SD-04) by sbhavanam
    /: PERFORM GET_EXTPR_TOT IN PROGRAM ZSP_SD_ORDCM.
    /: USING &VBDKA-VBELN&
    /: USING &V_PRICE&
    /: CHANGING &V_EXTPR_TOT1&
    /: ENDPERFORM
    your abap should look like this.
    FORM get_extpr_tot TABLES it_input STRUCTURE itcsy it_output STRUCTURE itcsy.
    DATA: v_vbeln2(10) TYPE n
    * CLEAR it_input.
    CLEAR v_vbeln2.
    CLEAR v_extpr_tot.
    READ TABLE it_input INDEX 1.
    MOVE it_input-value TO v_vbeln2.
    READ TABLE it_input INDEX 2.
    MOVE it_input-value TO v_extpr_tot.
    read table it_input index 3.
    move it_input-value to v_extpr_tot1.
    v_extpr_tot1 = v_extpr_tot1 + v_extpr_tot.
    * v_extpr_tot_tst = v_extpr_tot_
    READ TABLE it_output INDEX 1.
    WRITE v_extpr_tot1 TO it_output-value LEFT-JUSTIFIED.
    MODIFY it_output INDEX 1.
    CLEAR it_output.
    ENDFORM. "GET_EXTPR_TOT
    that should solve your issues.
    -Kalyan

  • Alv total problem

    Hi, all
    i have one problem is alv....
    what is the statement should i write to get sub total..
    for eg....
    xxxxxxxxxxxxxx    123123
                                 123123
    subtotal                  642642
    in this way....my total should come
    WA_ALV_FIELDS-TABNAME   = 'IT_TEMP'.
      WA_ALV_FIELDS-FIELDNAME = 'CONTR'.
      WA_ALV_FIELDS-SELTEXT_M = 'Contribution'.
      WA_ALV_FIELDS-NO_ZERO = 'X'.
      APPEND WA_ALV_FIELDS TO ALV_FIELDS.
      CLEAR  WA_ALV_FIELDS.

    Hi,
    For total.
    While building the fieldcatalog you have use do_sum = 'X' for the column which you need the summation.
    For subtotal use below code :
    data :gt_sort TYPE slis_t_sortinfo_alv,
    DATA: ls_sort TYPE slis_sortinfo_alv.
    CLEAR ls_sort.
    ls_sort-fieldname = 'Fieldname'.
    ls_sort-up = 'X'.
    ls_sort-subtot = 'X'.
    APPEND ls_sort TO gt_sort.
    And pass gt_sort to grid display export parameter I_sort.
    Regards,
    Raj.

  • Query OLAP - Total Problem

    Hello People,
    Our problem it's related about, a Query OLAP, we put the Period Gen 4, as rows:
    Jan
    Feb
    The table reflect the order in the outline, but when we add Total, the order is alphabetic, it's any workarround, to disable this automatic order?
    Thanks!

    You have to check "Sort order" in the measure's properties

  • MATRIX WITH GROUP     (REPORT TOTAL PROBLEM)

    DEAR FRIENDS,
    I HAVE A PROBLEM IN GROUP ABOVE MATRIX IN THE REPORT TOTAL.
    THE SCENARIO IS THIS...
    VEHICLE : CAR
    ----------------------- WEEK1 WEEK2 WEEK3 TOTAL
    ESTEEM 10 30 40 80
    ZEN 30 40 10 80
    DELUX 40 30 10 80
    SUB TOTAL 80 100 60 240
    VEHICLE : VAN
    ----------------------- WEEK1 WEEK2 WEEK3 TOTAL
    OMNI 10 30 40 80
    OMNIDX 30 40 10 80
    OMNILX 40 30 10 80
    SUB TOTAL 80 100 60 240
    GRAND TOTAL 160 200 120 480.
    IN THIS VEHICLE IS THE GROUP AND WEEK1,WEEK2... IS MATRIX COLUMNS AND ZEN,ESTEEM IS MATRIX ROWS.
    I AM UNABLE TO INCORPORATE THE GRAND TOTAL IN THIS TYPE OF REPORT. I AM USING 10G VERSION 9.0.4.
    PLEAE TELL ME HOW TO DO THAT.
    THANKS
    VENKY.

    If you got your subtotals to work than getting your grand total shouldn't be difficult at all. Your grand total column summaries should be one grouping above where your subtotal column summaries reside. I am guessing this will put them at the report level. Meaning they will not be in a group, just free floating in your data model. Good luck.

  • Oracle answers pivot table grand total problem

    hi All,
    I am working with OBI dashboard. I have a problem in creating a pivot table. To make it simple assume I have 3 columns: Sales, Target Sales, and %Diff. I added a total row but the problem is the total for %Diff is actually the average of the column instead of the %Diff between "total Sales" and Total "Target Sales". The aggregation rule for %Diff is set to Avg. and "Show data as" is set to Value.
    I have seen the same problem here before in some forums.
    Can anybody help me on this?
    Thanks
    Sana

    the problem is the data is coming from Discoverer (another team converted data from disco. to OBI anwsers) so I do not have access to Biz model.
    is there any other way for that?
    thanks

  • Grouping and Sub total Problem in Template Builder

    Hi,
    Please help me out to sort the problem am getting in template builder.
    am here by attaching the xml and RTF which i have done. please go through the files and help me sort the problem.
    <LIST_G_REQ>
    <G_REQ>
    <BUYER_ID>DENIECE</BUYER_ID>
    <BUYER_GROUP>1</BUYER_GROUP>
    <BUYER_SUBGROUP>ADMIN</BUYER_SUBGROUP>
    <REQ_TOT>1</REQ_TOT>
    </G_REQ>
    <G_REQ>
    <BUYER_ID>THUGHES1</BUYER_ID>
    <BUYER_GROUP>1</BUYER_GROUP>
    <BUYER_SUBGROUP>ADMIN</BUYER_SUBGROUP>
    <REQ_TOT>12</REQ_TOT>
    </G_REQ>
    <G_REQ>
    <BUYER_ID>VACHAVEZ</BUYER_ID>
    <BUYER_GROUP>1</BUYER_GROUP>
    <BUYER_SUBGROUP>ADMIN</BUYER_SUBGROUP>
    <REQ_TOT>19</REQ_TOT>
    </G_REQ>
    <G_REQ>
    <BUYER_ID>KAJIKAWA</BUYER_ID>
    <BUYER_GROUP>2</BUYER_GROUP>
    <BUYER_SUBGROUP>AP</BUYER_SUBGROUP>
    <REQ_TOT>25</REQ_TOT>
    </G_REQ>
    <G_REQ>
    <BUYER_ID>MSVIC</BUYER_ID>
    <BUYER_GROUP>2</BUYER_GROUP>
    <BUYER_SUBGROUP>AP</BUYER_SUBGROUP>
    <REQ_TOT>171</REQ_TOT>
    </G_REQ>
    <G_REQ>
    <BUYER_ID>FESPINOZ</BUYER_ID>
    <BUYER_GROUP>3</BUYER_GROUP>
    <BUYER_SUBGROUP>C&amp;R</BUYER_SUBGROUP>
    <REQ_TOT>19</REQ_TOT>
    </G_REQ>
    <G_REQ>
    <BUYER_ID>ASEJH</BUYER_ID>
    <BUYER_GROUP>3</BUYER_GROUP>
    <BUYER_SUBGROUP>COMPUTER</BUYER_SUBGROUP>
    <REQ_TOT>16</REQ_TOT>
    </G_REQ>
    <G_REQ>
    <BUYER_ID>BFINLEY</BUYER_ID>
    <BUYER_GROUP>3</BUYER_GROUP>
    <BUYER_SUBGROUP>COMPUTER</BUYER_SUBGROUP>
    <REQ_TOT>23</REQ_TOT>
    </G_REQ>
    <G_REQ>
    <BUYER_ID>JSMETANA</BUYER_ID>
    <BUYER_GROUP>3</BUYER_GROUP>
    <BUYER_SUBGROUP>COMPUTER</BUYER_SUBGROUP>
    <REQ_TOT>21</REQ_TOT>
    </G_REQ>
    <G_REQ>
    <BUYER_ID>SAVANCIL</BUYER_ID>
    <BUYER_GROUP>3</BUYER_GROUP>
    <BUYER_SUBGROUP>COMPUTER</BUYER_SUBGROUP>
    <REQ_TOT>84</REQ_TOT>
    </G_REQ>
    <G_REQ>
    <BUYER_ID>CALANE</BUYER_ID>
    <BUYER_GROUP>3</BUYER_GROUP>
    <BUYER_SUBGROUP>CWA</BUYER_SUBGROUP>
    <REQ_TOT>28</REQ_TOT>
    </G_REQ>
    <G_REQ>
    <BUYER_ID>KATHYR</BUYER_ID>
    <BUYER_GROUP>3</BUYER_GROUP>
    <BUYER_SUBGROUP>CWA</BUYER_SUBGROUP>
    <REQ_TOT>13</REQ_TOT>
    </G_REQ>
    <G_REQ>
    <BUYER_ID>STEFANIF</BUYER_ID>
    <BUYER_GROUP>3</BUYER_GROUP>
    <BUYER_SUBGROUP>CWA</BUYER_SUBGROUP>
    <REQ_TOT>1</REQ_TOT>
    </G_REQ>
    </LIST_G_REQ>
    This is my xml file please let me know how to do the groupingbased on "BUYER_SUBGROUP" and also "BUYER_GROUP_TOTAL" and "BUYER_SUBGROUP_TOTAL" in RTF.
    Thanks in advance

    Hi,
    I see that your data is having this format
    <LIST_G_REQ>
    <G_REQ>
    <BUYER_ID>DENIECE</BUYER_ID>
    <BUYER_GROUP>1</BUYER_GROUP>
    <BUYER_SUBGROUP>ADMIN</BUYER_SUBGROUP>
    <REQ_TOT>1</REQ_TOT>
    </G_REQ>
    </LIST_G_REQ>
    So to group by BUYER_SUBGROUP, your code will be
    <?for-each-group:G_REC;BUYER_SUBGROUP?>
    <?end for-each?>
    I dont know what you mean by BUYER_GROUP_TOTAL and BUYER_SUBGROUP_TOTAL here.

  • Alv sub total problem

    hi,
    in alv i want sub total text for purchase order.
    can you check my code . i am not getting.
    TYPE-POOLS: slis.
    TABLES: ekko,ekpo,eket.
    TYPES: BEGIN OF ty_ekko,
            lifnr TYPE elifn,
            ebeln TYPE ebeln,
            ebeln1 TYPE ebeln,
            bsart TYPE esart,
            ekorg TYPE ekorg,
            ekgrp TYPE bkgrp,
            ernam TYPE ernam,
           END OF ty_ekko,
           BEGIN OF ty_ekpo,
            ebeln TYPE ebeln,
            matnr TYPE matnr,
            ebelp TYPE ebelp,
            ebelp1 TYPE ebelp,
            menge TYPE bstmg,
            meins TYPE bstme,
            netpr TYPE bprei,
            werks TYPE ewerk,
           END OF ty_ekpo,
           BEGIN OF ty_eket,
            ebeln TYPE ebeln,
            ebelp TYPE ebelp,
            etenr TYPE eeten,
            eindt TYPE eindt,
           END OF ty_eket,
           BEGIN OF ty_final,
            slno TYPE sy-dbcnt,
            lifnr TYPE elifn,
            ebeln TYPE ebeln,
            ebeln1 TYPE ebeln,
            bsart TYPE esart,
            ekorg TYPE ekorg,
            ekgrp TYPE bkgrp,
            ernam TYPE ernam,
            matnr TYPE matnr,
            ebelp TYPE ebelp,
            ebelp1 TYPE ebelp,
            menge TYPE bstmg,
            meins TYPE bstme,
            netpr TYPE bprei,
            werks TYPE ewerk,
            eindt TYPE eindt,
           END OF ty_final.
    DATA: it_ekko TYPE STANDARD TABLE OF ty_ekko,
          it_ekpo TYPE STANDARD  TABLE OF ty_ekpo,
          it_eket TYPE STANDARD  TABLE OF ty_eket,
          it_final TYPE STANDARD TABLE OF ty_final,
          it_fieldcat TYPE slis_t_fieldcat_alv,
          it_alv_top_of_page TYPE slis_t_listheader,
          it_sort TYPE  slis_t_sortinfo_alv,
          it_event TYPE slis_t_event,
          l_repid TYPE syrepid,
          slno TYPE i VALUE 1.
    DATA: wa_ekko TYPE ty_ekko,
          wa_ekpo TYPE ty_ekpo,
          wa_eket TYPE ty_eket,
          wa_final TYPE ty_final,
          wa_fieldcat TYPE slis_fieldcat_alv,
          wa_alv_top_of_page TYPE slis_listheader,
          wa_sort TYPE  slis_sortinfo_alv,
          wa_layout   TYPE slis_layout_alv.
         wa_event TYPE slis_alv_event.
    CONSTANTS:
       c_header   TYPE char1
                  VALUE 'H',                    "Header in ALV
       c_item     TYPE char1
                  VALUE 'S'.
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_aedat FOR ekko-aedat.
    SELECTION-SCREEN END OF BLOCK blk.
    START-OF-SELECTION.
    PERFORM validation.
      PERFORM retrive_data.
      PERFORM sub_build_header.
      PERFORM sub_field_catalog.
      PERFORM sub_populate_layout.
      PERFORM sub_populate_sort.
      PERFORM sub_get_event.
    *END-OF-SELECTION.
    Perform to display ALV report
      PERFORM sub_alv_report_display.
    *FORM validation .
    SELECT SINGLE * FROM ekko WHERE aedat IN s_aedat .
    IF sy-subrc <> 0.
       MESSAGE e001(zram).
    ENDIF.
    *ENDFORM.                    " validation
    FORM retrive_data .
      SELECT lifnr
             ebeln
             ebeln
             bsart
             ekorg
             ekgrp
             ernam FROM ekko INTO TABLE it_ekko
            INTO CORRESPONDING FIELDS OF TABLE it_ekko
             WHERE aedat IN s_aedat .
      IF it_ekko[] IS NOT INITIAL.
        SELECT ebeln
               ebelp
               ebelp
               matnr
               menge
               meins
               netpr
               werks FROM ekpo
               INTO corresponding fields of  TABLE it_ekpo
               FOR ALL ENTRIES IN it_ekko
               WHERE ebeln = it_ekko-ebeln .
          if sy-subrc = 0.
             SELECT ebeln
               ebelp
               etenr
               eindt
               FROM eket INTO  TABLE it_eket
               FOR ALL ENTRIES IN it_ekpo
               WHERE ebeln = it_ekpo-ebeln .
            endif.
      ENDIF.
    ENDIF.
      LOOP AT it_ekko INTO wa_ekko.
        READ TABLE it_ekpo INTO wa_ekpo
                              WITH KEY ebeln = wa_ekko-ebeln.
        READ TABLE it_eket INTO wa_eket
                                WITH KEY ebeln = wa_ekpo-ebeln.
        wa_final-slno  =  slno.
        wa_final-lifnr = wa_ekko-lifnr.
        wa_final-ebeln = wa_ekko-ebeln.
        wa_final-bsart = wa_ekko-bsart.
        wa_final-ekgrp = wa_ekko-ekgrp.
        wa_final-ekorg = wa_ekko-ekorg.
        wa_final-ernam = wa_ekko-ernam.
        wa_final-ebelp = wa_ekpo-ebelp.
        wa_final-matnr = wa_ekpo-matnr.
        wa_final-menge = wa_ekpo-menge.
        wa_final-meins = wa_ekpo-meins.
        wa_final-netpr = wa_ekpo-netpr.
        wa_final-werks = wa_ekpo-werks.
        wa_final-eindt = wa_eket-eindt.
        slno = slno + 1.
        APPEND wa_final TO it_final.
      ENDLOOP.
    ENDFORM.                    " retrive_data
    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 it_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 it_alv_top_of_page.
      CLEAR: l_r_line,
             l_date.
    ENDFORM.                    " sub_build_header
    FORM sub_field_catalog .
      REFRESH it_fieldcat.
      wa_fieldcat-row_pos        = '01'.  "  p_rowpos.     "Row
      wa_fieldcat-col_pos        = '01'.       "p_colpos.     "Column
      wa_fieldcat-fieldname      = 'SLNO'.       "p_fldnam.     "Field Name
      wa_fieldcat-tabname        = 'IT_FINAL'.      "p_tabnam.     "Internal Table Name
      wa_fieldcat-just           = ' '.       "p_justif.     "Screen Justified
      wa_fieldcat-seltext_l      = 'SLNo'.       "p_seltext.    "Field Text
      wa_fieldcat-do_sum         = ' '.
      wa_fieldcat-outputlen      = '4'    .
      wa_fieldcat-no_out         = ' '.       "p_out.        "No output
      wa_fieldcat-tech           = ' '.      "p_tech.       "Technical field
      wa_fieldcat-qfieldname     = ' '.       "p_qfield.     "Quantity unit
      wa_fieldcat-qtabname       = ' '.       "p_qtab .      "Quantity table
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-row_pos        = '01'.  "  p_rowpos.     "Row
      wa_fieldcat-col_pos        = '02'.       "p_colpos.     "Column
      wa_fieldcat-fieldname      = 'LIFNR'.       "p_fldnam.     "Field Name
      wa_fieldcat-tabname        = 'IT_FINAL'.      "p_tabnam.     "Internal Table Name
      wa_fieldcat-just           = ' '.       "p_justif.     "Screen Justified
      wa_fieldcat-seltext_l      = 'Supplier Name'.       "p_seltext.    "Field Text
      wa_fieldcat-do_sum         = ' '.
      wa_fieldcat-outputlen      = '12'    .
      wa_fieldcat-no_out         = ' '.       "p_out.        "No output
      wa_fieldcat-tech           = ' '.      "p_tech.       "Technical field
      wa_fieldcat-qfieldname     = ' '.       "p_qfield.     "Quantity unit
      wa_fieldcat-qtabname       = ' '.       "p_qtab .      "Quantity table
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-row_pos        = '01'.  "  p_rowpos.     "Row
      wa_fieldcat-col_pos        = '03'.       "p_colpos.     "Column
      wa_fieldcat-fieldname      = 'EBELN'.       "p_fldnam.     "Field Name
      wa_fieldcat-tabname        = 'IT_FINAL'.      "p_tabnam.     "Internal Table Name
      wa_fieldcat-just           = ' '.       "p_justif.     "Screen Justified
      wa_fieldcat-seltext_l      = 'PO No'.       "p_seltext.    "Field Text
      wa_fieldcat-do_sum         = ' '.
      wa_fieldcat-outputlen      = '15'    .
      wa_fieldcat-no_out         = ' '.       "p_out.        "No output
      wa_fieldcat-tech           = ' '.      "p_tech.       "Technical field
      wa_fieldcat-qfieldname     = ' '.       "p_qfield.     "Quantity unit
      wa_fieldcat-qtabname       = ' '.       "p_qtab .      "Quantity table
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-row_pos        = '01'.  "  p_rowpos.     "Row
      wa_fieldcat-col_pos        = '03'.       "p_colpos.     "Column
      wa_fieldcat-fieldname      = 'EBELN1'.       "p_fldnam.     "Field Name
      wa_fieldcat-tabname        = 'IT_FINAL'.      "p_tabnam.     "Internal Table Name
      wa_fieldcat-just           = ' '.       "p_justif.     "Screen Justified
      wa_fieldcat-seltext_l      = 'PO No'.       "p_seltext.    "Field Text
      wa_fieldcat-do_sum         = ' '.
      wa_fieldcat-no_out         = ' '.       "p_out.        "No output
      wa_fieldcat-tech           = 'X'.      "p_tech.       "Technical field
      wa_fieldcat-qfieldname     = ' '.       "p_qfield.     "Quantity unit
      wa_fieldcat-qtabname       = ' '.       "p_qtab .      "Quantity table
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ENDFORM.                    " sub_field_catalog
    FORM sub_populate_layout .
      CLEAR wa_layout.
      wa_layout-colwidth_optimize = 'X'." Optimization of Col width
    ENDFORM.                    " sub_populate_layout
    FORM sub_populate_sort .
    Sort on material
      wa_sort-spos      = '01' .
      wa_sort-fieldname = 'EBELN'.
      wa_sort-tabname   = 'IT_FINAL'.
      wa_sort-up        = 'X'.
      wa_sort-subtot    = 'X'.
      APPEND wa_sort TO it_sort.
      CLEAR wa_sort.
    Sort on plant
      wa_sort-spos      = '02'.
      wa_sort-fieldname = 'EBELP'.
      wa_sort-tabname   = 'IT_FINAL'.
      wa_sort-up        = 'X'.
      wa_sort-subtot    = 'X'.
      APPEND wa_sort TO it_sort.
      CLEAR wa_sort.
    ENDFORM.                    " sub_populate_sort
    FORM sub_get_event .
      CONSTANTS : c_formname_subtotal_text TYPE slis_formname VALUE
                                                      'SUBTOTAL_TEXT'.
      data : wa_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 4
        IMPORTING
          et_events       = it_event
        EXCEPTIONS
          list_type_wrong = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Subtotal
      READ TABLE it_event  INTO wa_event
                        WITH KEY name = slis_ev_subtotal_text.
      IF sy-subrc = 0.
        MOVE c_formname_subtotal_text TO wa_event-form.
        MODIFY it_event FROM wa_event  INDEX sy-tabix.
      ENDIF.
    ENDFORM.                    " sub_get_event
    FORM sub_alv_report_display .
      l_repid = sy-repid .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = l_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
         i_callback_top_of_page            = 'SUB_ALV_TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
       is_layout                         = wa_layout
       it_fieldcat                       = it_fieldcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
       it_sort                           = it_sort
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      i_default                         = 'X'
      i_save                            = 'A'
      IS_VARIANT                        =
      IT_EVENTS                         = i_event
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = it_final
    EXCEPTIONS
       program_error                     = 1
       OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " sub_alv_report_display
    FORM sub_alv_top_of_page.                                   "#EC CALLED
    To write header for the ALV
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = it_alv_top_of_page.
    ENDFORM.                    "alv_top_of_page
    FORM subtotal_text CHANGING
                   p_total TYPE any
                   p_subtot_text TYPE slis_subtot_text.
    Material level sub total
      IF p_subtot_text-criteria = 'EBELN'.
        p_subtot_text-display_text_for_subtotal
        = 'The Nett price of PO No'(009).
      ENDIF.
    Plant level sub total
      IF p_subtot_text-criteria = 'EBELP'.
        p_subtot_text-display_text_for_subtotal = 'Total Purchase Order value placed'(010).
      ENDIF.
    ENDFORM.                    "subtotal_text

    hi ,
    try the given below code ...
    "*************INTERNAL TABLE FR SORTING***********************
    DATA: it_sort TYPE slis_t_sortinfo_alv.
    "******** WORK AREA FR FIELD CATALOG *************************
    DATA: wa_sort TYPE slis_sortinfo_alv.
       wa_sort-fieldname = 'EBELN'."field name
      wa_sort-tabname = 'IT_TAB'."internal table name
      wa_sort-up = 'X'.
      wa_sort-subtot ='X'.
      APPEND wa_sort TO it_sort.
      CLEAR wa_sort.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    it_sort                           = it_sort
    ENDFORM.                    "alv
    hope this helps
    Regards
    RItesh J

  • Total problem in Exporting ALV GRID to Excel

    Hi all,
    I have manipulated the Total of ALV Grid by using GET_SUBTOTALS and REFRESH method of CL_GUI_ALV_GRID. The ALV Output is also correct. When i export to Excel,only the Original total is displaying not the calculated one. How to download the exact output which is displaying in the ALV Grid to Excel.
    Please help me out to solve this.
    Thanks,
    Ramesh

    DEAR,
    AS U WANT UPLOAD WITH THE SUB TOTAL YOU TRY THIS.
    FIRST to get subtotal in ALV output you select at least one column of total and then press ctrl + F6 . u will see the sub total .
    and now how to download it so press  ctrl + shift + F9 .
    now screen appears and select second option ie spreadsheet and press enter
    now a screen appear  in wich u have to give file name.
    so double click on search button of file name . click on desktop  give ur file name as u want suppose zreport u have given.
    and save type = excel file.
    now save it and then generate it your output bytes will be transmitted .
    now u can see in your desktop in your file name . ur output with subtotal.
    regards
    navin

  • Total Problem in Ladger Style report

    display report like this
    Opening balance = 1000
    KGS BALANCE
    100 900
    100 800
    50 750
    what formula I should use in Balance field.
    Please help in this regard.

    see there is one problem with your code if you keep the opening balance outside the repeating group it will throw an error of frequency mismatch, beacause you are referencing a column outisde the group, what i would suggest is to keep the opening balance inside the group, calculate opening balance from a formula column, use this opening balance to calculate your second balance(repeating), now place a summary column outside the group and chosse (sum) as the calculation mode and source as your inside the group formula column which u used for calculating the opening balance, you work will be done and output as required by you, try this, if not, i will send you the complete code.

  • Disco+ 10g - Financial Year Total Problem (ye old ORA-00979)

    Hi, I'm pretty much a newbie to Disco+.
    I have created a crosstab report for the Jul06-Jun07 financial year. The report is to display a monthly count of the number of times (days) each month an employee participates in a specified meeting type (query condition), with sub-total (column) at each QTR and Total (column) for financial year.
    - Row item is "Emp.EmpName"
    - Column items (calculated in EUL) are "Meeting.MeetYear", "Meeting.MeetQtr",
    "Meeting.MeetMonth".
    - Data points are calculation "CountMeets" being:
    NVL(COUNT_DISTINCT(EmpMeetDateID),0), where EmpMeetDateID is a concatenation
    of Emp.EmpName & Meeting.MeetDate & Meeting.MeetType.
    The report produces correct monthly and quarterly totals, but when I try to add in the grand total at right (financial year total), Disco+ generates ORA-00979 not a GROUP BY expression.
    Here'e hoping someone can give greatly appreciated guidance.
    Thanks
    Rick

    Well actually your response is helpful,
    but would you care to clarify where in the IDE you should adjust what?
    Thanks so much!

  • Total Problem

    Hi All,
    I have upgraded a report from 6i to 10g, its a customer statement report that shows the customer transaction their running total, Carried forward total at end of page, Brought forward total, and then finally the end total.
    But in my report the end total is been carried forward to another customer's running total, it does not rest to zero, BUT ONLY IN PRODUCTION. it works fine while I run it in development environment ??
    I tried doing several re compilation and even re creating the carried forward field it doesn't seems to work !!
    Any clue please?
    Best Regards,

    Oracle deliberately disabled the total if the aggregation comes from parent folder in a parent child relationship. It is disabled because the aggregate can be invalid. See Note 208366.1.
    The work around I came up with is to go into the SQL inspector and capture the SQL that was created, then use that SQL to create a Custom Folder. Do the reporting off this folder. If you have conditions, then take the conditions out of the SQL and them those data items in the select so you can use them back into the Discoverer conditions.
    Hope this helps.

  • Running Total Problem

    Hi All
    I believe I have posted this question previously with no luck, but I have notice a few very clever new people so I will try again.(I have been working on this report for weeks and it is driving me nuts!!!)
    I am using CRXI and have created a main report with a figures shown from two subreports. I have successfully created shared variables on both subreports (in details section a) and have created a running total to give me a total of figures (in details section b) from said subreports. I also have a group that I want the same calculation done as in the details section, eg;
    Group1
    details  subreport1        subreport2      runningtotal (subreport1+subreport2)
                  $100.00            $150.00           $250.00
                  $  50.00            $150.00           $200.00
                                                                $450.00  This is what I need to produce.
    I thought that if I reproduce the running total formula and place in the group header and footer would have worked, but no. I have also declared new shared variables and used those in group header and footer, but all I get is the total of the last record in details.
    I have a nasty feeling that I am missing something really stupidly obvious but can't see the trees for the forest.
    Any help would be greatly appreciated.

    I have a running total field in the details already, giving me a total for each record in the group. What I need now is a total for the group. I tried putting the formula for the group running total in the details like you suggested but it returned '0'. I have now put the formula for the group running total in GF1 and it is returning the sum of the last record out of each subreport. (I hope that makes sense!!) At least I have a figure there now, just not the right one.
    Any help?

Maybe you are looking for