ALV Grid  Subtotal text and Total text display

Hello ABAPGuru's
I want to display the subtotal and Total texts. alv grid program runing on background.
Regards
Sweety(Sri)

Hello Neil,
Here I have attached my routines.anyway my confusion. I have wrote the routine subtotal_text .but i am not passing ALV GRID FM.
*&      Form  eventtab_build
&----       This is used to get the list of events
----      <--RI_EVENTS  Internal table
FORM eventtab_build  CHANGING ri_events TYPE slis_t_event.
Structure for event handling.
  DATA: rs_event TYPE slis_alv_event.
Returns table of possible events for a list type.
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
      i_list_type = 0
    IMPORTING
      et_events   = ri_events.  " Table of events to perform
Read the internal table with the TOP_OF_PAGE and move the
form name to the internal table
  READ TABLE ri_events
    WITH KEY name = slis_ev_top_of_page INTO rs_event.
  IF sy-subrc = 0.
    MOVE c_formname TO rs_event-form.              " Form name
    MODIFY ri_events FROM rs_event
       INDEX sy-tabix.                  " Top of page event
  ENDIF.
  READ TABLE ri_events
     WITH KEY name = slis_ev_end_of_page INTO rs_event.
  IF sy-subrc = 0.
    MOVE c_form_eop_name TO rs_event-form.              " Form name
    MODIFY ri_events FROM rs_event
       INDEX sy-tabix.                  " Top of page event
  ENDIF.
  READ TABLE ri_events
      WITH KEY name = slis_ev_subtotal_text INTO rs_event.
  IF sy-subrc = 0.
    MOVE c_formname_subtotal_text TO rs_event-form.     " Formname
    MODIFY ri_events FROM rs_event
       INDEX sy-tabix.                  " Top of page event
  ENDIF.
*&-- Delete all unneeded events:
DELETE ri_events  WHERE form IS INITIAL.
ENDFORM.                    " eventtab_build
*&      Form  SUBTOTAL_TEXT
      text
-->  p1        text
<--  p2        text
FORM SUBTOTAL_TEXT USING  ep_subtot_line     TYPE  type_data
                          e_event_data       TYPE  slis_subtot_text.
  IF NOT e_event_data-criteria IS INITIAL.
  E_EVENT_DATA-DISPLAY_TEXT_FOR_SUBTOTAL = 'Account Total'.
   ENDIF.
ENDFORM.                    "SUBTOTAL_TEXT
*&      Form  initialise_layout
      Initialise Layout
FORM initialise_layout .
  i_layout-colwidth_optimize = c_x.
  i_layout-group_change_edit = c_x.
*i_layout-subtotals_text = ' a'.
  i_layout-detail_popup   = c_x.
i_layout-zebra          = c_x.
  i_layout-no_vline       = 'X'.
  i_layout-no_hline       = 'X'.
  i_layout-totals_text = 'Account Total'.
ENDFORM.                    " initialise_layout
Call the function module to display the report
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program     = v_program
      i_callback_top_of_page = 'TOP_OF_PAGE'       "Top Of Page
      is_layout              = i_layout
      it_fieldcat            = i_fieldtab
      it_sort                = i_sort
      it_events              = i_events         " Events
      is_print               = i_print
      i_default              = c_x
      i_save                 = c_save
      is_variant             = v_variant
    TABLES
      t_outtab               = i_data
    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.
Regards
Sweety (Sri)

Similar Messages

  • Need to display Subtotal text and total text in ALV

    HI,
    I need help.
    I am displaying subtotal and total for cost column which is group by Project type column
    My problem is i am able to display the subtotal and total values but not able to display the 'Subtotal' and 'Total' text on that respective row.
    I have updated lvc_s_sort table as follow.
    ls_sort-spos = 1.
      ls_sort-subtot = 'X'.
      ls_sort-fieldname = 'SUBTOT'.
      ls_sort-up = 'X'.
      ls_sort-SELTEXT = 'Subtotal'.
      ls_sort-spos = 2.
      ls_sort-subtot = 'X'.
      ls_sort-fieldname = 'PRART'.
      ls_sort-GROUP = 'UL'.
      ls_sort-up = 'X'.
    Please suggest what should be done to display the text.
    Regards,
    Rachna

    You have to use the event SUBTOTAL_TEXT for the ALV.
    the field CRITERIA can be used for checking the field.
    and field CRIT_TEXT for the sub total text.
    I hope you are aware about how to implement the events in ALV using OOP.
    Hope this helps you.

  • Regarding subtotal text and total text

    Hi All,
    can any body provide example program for ALV total text and subtotal text both using REUSE_ALV_GRID_DISPALY.  and
    using OOPS.
    @@@MODERATOR::    Please dont lock my threads.I have been searching since 2 days for this example and i tried with the provided examples .but they are not worked out ::
    FOr your information :
    Some of the links i searched in SDN: 
    http://wiki.sdn.sap.com/wiki/display/ABAP/ALVDisplayTotalTextOrSubtotalText
    Re: SubTotal Text in ALV?
    http://wiki.sdn.sap.com/wiki/display/ABAP/ALVStandardSumTotalOr+Subtotal

    Hi Naveen,
    If you are looking for specific Subtotal text in ALV Grid, then i think it is not possible.
    You can use SORT table to get sub-totals based on the columns that you display.
    Generally the record existing on the column based on which you sort the table, appears as the sub-total text automatically.....
    You can try giving Subtotal text in the LAYOUT as well and pass the layout to the ALV function module.
    Best Regards,
    Ram.

  • My subtotal and total text in ALV list does not show...

    Hello Experts,
    Please see my code below on what I am doing wrong. I want to display the subtotal and total text in my ALV list.
    CLEAR gs_layout.
        gs_layout-colwidth_optimize = 'X'.
        gs_layout-zebra             = 'X'.
        gs_layout-subtotals_text    = 'Subtotal'.
        gs_layout-totals_text       = 'Total'.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
    *       I_INTERFACE_CHECK                 = ' '
    *       I_BYPASSING_BUFFER                = ' '
    *       I_BUFFER_ACTIVE                   = ' '
            i_callback_program                = sy-repid
    *       I_CALLBACK_PF_STATUS_SET          = ' '
    *       I_CALLBACK_USER_COMMAND           = ' '
    *       I_CALLBACK_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                         = 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
    *       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                          = lt_output_fin
         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.

    Use on Thread. Don't Cross post. and Follow the Rules.

  • Display header text and item text in smartform

    Hi all,
    I have to display header text and item text of PO in smartform BBP_SUSPO.
    So how to do that.. I have to use 'read_text' Fm or directly i can get values from any table ???
    Thanks in  advance.
    Regards,
    Anagha Deshmukh

    Hi Amit,
    I have used inculde text that is avalable in smartforms to display header & Item text in this way
    For header :
    Text Name         Header guid
    Text Object       BBP_PD
    Text ID           HTXT
    Language          EN
    For Item:
    Text Name         Item Guid
    Text Object       BBP_PD
    Text ID              ITXT
    Language          SY-LANGU
    U can used this attributes in read_text function mdule also.
    Thanks & Regards,
    Anagha Deshmukh

  • Dynamic Text and changing Text in AS3

    I have a Dynamic Text box in my Library.  I drag it to my main stage and give it a name..it is now a movieclip. The name is 'mcAdmin'.  I added an event listener for MOUSE_OVER.  I want the text to change color, but for now I'm just trying to change the text; however, it's not displaying the change in text I want.  I do a trace, and the change is in there on the output window, but it is not displayed as such.  How can I :
    1) use AS3 to change the font color of the text
    2) use AS3 to change the text and have it display?
    function onMouseOver_txtAdmin(e:MouseEvent):void
    Mouse.cursor="button";
    //Current mcAdmin text is 'Administration'
    //I want to change the color of Administartion on Mouse_Over
    //but to test if I can get to anything, I'm just trying to change the text.
    mcAdmin.text="Hello";
    trace(mcAdmin.text);
    mcPPMB.alpha=.5;
    mcASB.alpha=.5;
    mcISO.alpha=.5;
    mcEA.alpha=.5;
    mcAdmin.alpha=1;
    mcAdmin.scaleX=1.25;
    mcAdmin.scaleY=1.25;
    Thanks.

    1st
    give the textfield a name, if it hasn't already (sounds like you put it in a movieclip).
    to change the text set the text property of your text field
    like this
    myTextField_txt.text = "here is the text";
    or if it is inside a movieclip
    myClip_mc.myTextField_txt.text = "here is the text";
    To change the color you would need to put a TextFormat on it. To keep the same fontsize, font etc. you could first get the TextFormat from your existing Textfield, change the color of the TextFormat and set it on the TextField.
    // get the Textformat of the first character
                var TF:TextFormat = myTextField.getTextFormat(0,1)
    // set the font color
                TF.color = 0xff0000;
    // put it on the whole text
                myTextField.setTextFormat(TF)

  • SAP SCRIPT Header text and Item text not printing in customized PO

    Hello Experts,
                          I have copied the standard MEDRUCK to ZMEDRUCK and customized the form according to the requirement.
    I want to print the header text and Item text in my form.
    For Header text I have used :
    /: INCLUDE &EKKO-EBELN& OBJECT EKKO ID F01
    Problem 1: The text what I enter in header text is flowing only when I hit on print preview without saving the form. Once I save the SAP SCRIPT  and click on print preview the field is appearing blank. I also tried to print the form, but the field is appearing blank even on the print out.
    Problem 2: For item text the field is concatenation of  EBELN & EBELP. Can anyone suggest me how to concatenate and fetch the text in item text.

    Hi,
        Im getting an error in my subroutine pool for i_xtline which is to fetch ITEM TEXT., It says its not a in any internal table nor defined as data. How can I proceed further. I have pasted my code below. Please check and revert ASAP
    PROGRAM  ZMEDRUCK_SUBP1.
    TABLES: EKPO, EKKO.
    FORM fetch_table_data TABLES in_tab STRUCTURE itcsy
                                 out_tab STRUCTURE itcsy.
    data xname like THEAD-TDNAME.
    data i_xtline like xtline.
    clear i_xtline.
    refresh i_xtline.
    CONCATENATE EKPO-ebeln EKPO-ebelp INTO v_item_text.
    MOVE v_item_text to ITEMTXT.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
      CLIENT                        = SY-MANDT
        id                            = F01
        language                      = EN
        name                          = ITEMTXT
        object                        = EKPO
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
      HEADER                        =
      tables
        lines                         = i_xtline
    EXCEPTIONS
       ID                            = 1
       LANGUAGE                      = 2
       NAME                          = 3
       NOT_FOUND                     = 4
       OBJECT                        = 5
       REFERENCE_CHECK               = 6
      WRONG_ACCESS_TO_ARCHIVE       = 7
      OTHERS                        = 8
    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.

  • PO Header Texts and item texts

    Dear Experts
                        PO header texts and item texts are stored in which table. please tell me the table name.
    Here i have configured PO version management. in that i want to control some sensitive fields change only version management will get triggered. it is done through  for this i have configured the sensitive fields in PO Print relevant changes. in that config the PO header texts and item texts table and field name is not exist.
    Now i have change the PO through me22n in header texts version management is triggered for this. i want to control this if some body change the po header texts and item texts version management should not triggered.
    is it possible.
    Regards
    Anand.

    Hai,
    Try this  table STXH.
    Get the required information(input) for the function module 'READ_TEXT'.
    CALL FUNCTION 'READ_TEXT'
          EXPORTING
            ID                            = 'ST'
            LANGUAGE                      = sy-langu
            NAME                          = thead-tdname
            OBJECT                        = 'TEXT'     
        ARCHIVE_HANDLE                = 0
        LOCAL_CAT                     = ' '
      IMPORTING
        HEADER                        =
          TABLES
            LINES                         = lines
         EXCEPTIONS
           ID                            = 1
           LANGUAGE                      = 2
           NAME                          = 3
           NOT_FOUND                     = 4
           OBJECT                        = 5
           REFERENCE_CHECK               = 6
           WRONG_ACCESS_TO_ARCHIVE       = 7
           OTHERS                        = 8
        if sy-subrc eq 0.
          loop at lines.
            wa_HEADER_TEXTS-TEXT_FORM = lines-TDFORMAT.
            wa_HEADER_TEXTS-TEXT_LINE = lines-TDLINE.
            append wa_HEADER_TEXTS to lt_tmp_HEADER_TEXTS.
          endloop.
    Better take the help of abaper.
    With Regards,
    Jaheer

  • Purchase requisition - Header Texts and Item Texts

    Hi,
    In Creating Purchase requisition if we enter the Header note text and Item text, in which table these texts will be stored.
    Regards,
    Ram

    Hi,
    To see any text go to the detail of that text you will have a magnify button below that text click there you will get the stand text editor open.
    Click on GOT->Header it will give the information you need to get this text via function module 'READ_TEXT' they are sored in STXH.
    Points if find this helpful
    Regards,
    Yakub Shah

  • Purchased Acrobat XI Pro - was able to edit text and add text and now does not allow me to do anything -

    was able to edit text and add text and now does not allow me to do anything - Except purchase the software again.Can't find an answer to this anywhere.

    Use Adobe Acrobat, not Adobe Reader.

  • Item texts and header texts

    hi,
    In which table item texts and header texts avialable.
    Edited by: Ramesh villa on Apr 11, 2009 4:49 PM

    Dear,
    For any queries (simple) recommended to search on group by entering simple search words of your quenry. You will find maximum solved questions.
    Re: PO header and item texts
    Regards,
    Syed Hussain.

  • Creation of short text and long text?

    Hi,
    We create short text by using oe_fnd_attachments_pub.create_short_text_document and oe_fnd_attachments_pub.add_attachment API and to create long text we use fnd_documents_pkg.insert_row .
    Why is it that we have different approaches for creation of short text and long text?
    I know that oe_fnd_attachments_pub.add_attachment is used to attach a short text to some entity,but then why we dont do the same for long text?
    Please lemme knw urgently ...
    Thanks and Regards
    Amar

    Thanks for the help,
    I looked into the document and i got to know few things as to how short and long text are created, but can u tell when the records are inserted into fnd_attached_documents, because i can see that records are inserted into fnd_attached_short_text and fnd_attached_long_text, fnd_documents but i dont see any insertion into fnd_attached_documents, can u lemme knw how and when it is done?

  • Create mirror text and stroke text in AI Scripting

    Hello All,
    Please help me with the Script of creating mirror text and stroke text in Adobe illustrator scripting.
    Thanking you.
    With Regards
    Sawlay Singh.

    second: mark your answers as correct if you're helped, or at least come back and say "thanks"
    remember 'dinner for one'?
    http://forums.adobe.com/thread/1146984

  • Header Text and Item Text for Sales Order

    Hi,
    Can any one help me on Header Text and Item Text............ ASAP.
    <b>STXH & STXL</b> 
    TDOBJECT :
    TDID:
    TDNAME :
    Regards,
    Raghunath.S

    Hi Raghunath,
    Go to the text <b>in plain page mode</b>, and then you do via the menu '<b>GoTo</b>' -> '<b>Header</b>' and you get the parameters you need ( object, name, id, ...).
    Repeat this operation for each text.
    <u>Tips :</u> If you want to handle those text, use FM : READ_TEXT, EDIT_TEXT, and SAVE_TEXT...
    Hope this helps,
    Erwan

  • What's the functional difference between placeholder text and regular text?

    When inserting text into a project template that I'm creating, what's the difference between inserting regular text (using the Caption tool) and inserting placeholder text?
    There's an obvious difference between inserting an image and an image placeholder, but when I use a project template that I've created, placeholder text and caption text behave the same way: I see the text on the stage, and double-click it to edit. So why go through the extra step of inserting placeholder text?

    Textbooks are educational books for use in schools and universities and the like. They are currently avaiable for purchase only in the USA. Textbooks have different contract clauses applied to them. Among them is an obligation on the publisher to offer textbooks that are sold in electronic form via other distributors in the iBookstore as well. Textbooks also have different (much lower) pricing tiers, and they must be made available via the bulk purchasing program. Textbooks must be authored with IBA (they cannot be ePub). I believe that textbooks also undergo a more stringent review process.
    Normal eBooks (not in the textbook category) can currently be sold in 32 territories (US, Canada, Australia, and most of Europe), and their pricing tiers provide for much higher prices.
    There is no difference in the widgets you can use in normal books and textbooks. The same widget set that is provided by IBA applies to both. In addition, a normal eBook can be published in ePub format and, therefore, authored with software other than IBA.
    Books can contain audio and video and, yes, iBooks Author allows you to create such books.
    Michi.

Maybe you are looking for