Grand Total Text is not printing in ALV

Hi all,
I am not able to print Grand Total text in my report
I am not doing subtotal, i am using only grand totals.
So i have used in the following way
WA_FIELDCAT-DO_SUM        = GC_X.
  GS_LAYOUT-TOTALS_ONLY       = GC_X.
  GS_LAYOUT-TOTALS_TEXT       = 'Totals'(049).
i am using using ALV GRID DISPLAY FM...its displaying the total amount, buts text is missing...
Can any one tell me what else i have to pass in the layout or fieldcatlog or FM

Hi AMR,
If you use REUSE_ALV_GRID_DISPLAY function module, i think Total text does not come .but if u use REUSE_ALV_LIST_DISPLAY function module Total text comes .
Check this sample program it let u know ..
"Types
TYPES:
      BEGIN OF t_pa0008,
        pernr TYPE pa0008-pernr,
        lga01 TYPE pa0008-lga01,
        bet01 TYPE pa0008-bet01,
      END OF t_pa0008.
"Work areas
DATA:
      w_pa0008 TYPE t_pa0008.
"Internal tables
DATA:
      i_pa0008 TYPE STANDARD TABLE OF t_pa0008.
PARAMETERS:
           list TYPE c RADIOBUTTON GROUP gr1,
           grid TYPE c RADIOBUTTON GROUP gr1.
" ALV Declarations
" Types Pools
TYPE-POOLS:
   slis.
" Types
TYPES:
   t_fieldcat         TYPE slis_fieldcat_alv,
   t_events           TYPE slis_alv_event,
   t_layout           TYPE slis_layout_alv,
   t_sort             TYPE  slis_sortinfo_alv,
   t_keyinfo          TYPE slis_keyinfo_alv.
" Workareas
DATA:
   w_fieldcat         TYPE t_fieldcat,
   w_events           TYPE t_events,
   w_sort             TYPE t_sort,
   w_layout           TYPE t_layout,
   w_keyinfo          TYPE t_keyinfo.
" Internal Tables
DATA:
   i_fieldcat         TYPE STANDARD TABLE OF t_fieldcat,
   i_events           TYPE STANDARD TABLE OF t_events,
   i_sort             TYPE STANDARD TABLE OF t_sort.
START-OF-SELECTION.
  PERFORM get_data.
END-OF-SELECTION.
  PERFORM build_fieldcatalog.        "Fieldcatalog
  PERFORM build_events.              "Events table
  PERFORM buid_layout.               "Layout structure.
  PERFORM build_sort_tab.            "To sort table and get subtotal
  PERFORM display_data.
*&      Form  get_data
FORM get_data.
  DATA:l_0008 TYPE pa0008 OCCURS 0 WITH HEADER LINE.
  SELECT pernr lga01 bet01
    FROM pa0008
    INTO CORRESPONDING FIELDS OF l_0008
    WHERE begda LE sy-datum
      AND endda GE sy-datum.
    w_pa0008-pernr = l_0008-pernr.
    w_pa0008-lga01 = l_0008-lga01.
    w_pa0008-bet01 = l_0008-bet01.
    APPEND w_pa0008 TO i_pa0008.
    CLEAR  w_pa0008.
    w_pa0008-pernr = l_0008-pernr.
    w_pa0008-lga01 = l_0008-lga02.
    w_pa0008-bet01 = l_0008-bet02.
    APPEND w_pa0008 TO i_pa0008.
    CLEAR  w_pa0008.
    w_pa0008-pernr = l_0008-pernr.
    w_pa0008-lga01 = l_0008-lga03.
    w_pa0008-bet01 = l_0008-bet03.
    APPEND w_pa0008 TO i_pa0008.
    CLEAR  w_pa0008.
    w_pa0008-pernr = l_0008-pernr.
    w_pa0008-lga01 = l_0008-lga04.
    w_pa0008-bet01 = l_0008-bet04.
    APPEND w_pa0008 TO i_pa0008.
    CLEAR  w_pa0008.
  ENDSELECT.
ENDFORM.                    "get_data
*&      Form  build_fieldcatalog
FORM build_fieldcatalog.
  PERFORM build_fcat USING:
                "Field    Int.Table    Text
                 'PERNR' 'I_PA0008'   'PERNR', "Remove this if u dont want in the item table as well as it is there in the header table
                 'LGA01' 'I_PA0008'   'LGA01',
                 'BET01' 'I_PA0008'   'BET01'.
ENDFORM.                    "build_fieldcatalog
*&      Form  build_events
*       text
FORM build_events.
  CLEAR:
        w_events, i_events[].
  w_events-name = 'TOP_OF_PAGE'.
  w_events-form = 'TOP_OF_PAGE'.
  APPEND w_events TO i_events.
  CLEAR  w_events.
ENDFORM.                    "build_events
*&      Form  display_data
*       text
FORM display_data.
  DATA:
        l_program TYPE sy-repid VALUE sy-repid,
        l_fm      TYPE RS38L_FNAM.
  IF list = 'X'.
    l_fm =  'REUSE_ALV_LIST_DISPLAY'.
  ELSEIF grid ='X'.
    l_fm =  'REUSE_ALV_GRID_DISPLAY'.
  ENDIF.
  CALL FUNCTION l_fm
    EXPORTING
      i_callback_program = l_program
      is_layout          = w_layout
      it_fieldcat        = i_fieldcat
      it_events          = i_events
      it_sort            = i_sort
    TABLES
      t_outtab           = i_pa0008.
  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.                    "display_data
*&      Form  build_fcat
FORM build_fcat  USING l_field l_tab l_text.
  w_fieldcat-fieldname = l_field.
  w_fieldcat-tabname   = l_tab.
  w_fieldcat-seltext_m = l_text.
  IF l_field = 'BET01'.
    w_fieldcat-do_sum = 'X'.
  ENDIF.
  APPEND w_fieldcat TO i_fieldcat.
  CLEAR  w_fieldcat.
ENDFORM.                    " build_fcat
*&      Form  top_of_page
*       text
FORM top_of_page.
  DATA :
  i_header TYPE slis_t_listheader,
  w_header LIKE LINE OF i_header.
  DATA:l_date1 TYPE datum,
       l_date2 TYPE datum.
  w_header-typ = 'S'.
  w_header-info = sy-title.
  APPEND w_header TO i_header.
  CLEAR w_header.
  w_header-typ = 'H'.
  w_header-info = sy-repid.
  APPEND w_header TO i_header.
  CLEAR w_header.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary = i_header
      i_logo             = 'ENJOYSAP_LOGO'.
ENDFORM.                    "top_of_page
*&      Form  BUILD_sort_tab
FORM build_sort_tab .
  CLEAR :i_sort[],w_sort.
  w_sort-spos      = 1.
  w_sort-fieldname = 'PERNR'.
  w_sort-tabname   = 'I_PA0008'. "header table
  w_sort-up        = 'X'.
  w_sort-subtot    = 'X'.
  APPEND w_sort TO i_sort.
  CLEAR w_sort.
ENDFORM.                    " BUILD_sort_tab
*&      Form  buid_layout
FORM buid_layout .
  w_layout-totals_text = 'Total'.
  w_layout-subtotals_text = 'S.Total'.
ENDFORM.                    " buid_layout
Regards,
Venkat.O

Similar Messages

  • How to get Grand Total Text in ALV GRID

    Hi Folks,
    I am able to get the SUBTOTAL TEXT .....But i need...
    How to get Grand Total Text in ALV GRID Display...
    Can any one give a Solution for this...

    Hi Surendar,
    Check out this code.. this is showing Total Text in Toal line in the very first column.
    REPORT  zsales_ord_det_1                        .
    TABLES: ztable_10.
    TYPE-POOLS: slis.
    DATA: BEGIN OF it OCCURS 0,
    srno(6) type c,
    name LIKE ztable_10-name,
    age LIKE ztable_10-age,
    END OF it.
    DATA : BEGIN OF it_temp OCCURS 0,
    name LIKE ztable_10-name,
    age LIKE ztable_10-age,
    END OF it_temp.
    DATA: i_fieldcat  TYPE slis_t_fieldcat_alv,
          wa_fieldcat TYPE  slis_fieldcat_alv.
    DATA: v_repid LIKE sy-repid,
           i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
           gs_layout TYPE slis_layout_alv,
           gd_layout TYPE slis_layout_alv,
           i_sort TYPE STANDARD TABLE OF slis_sortinfo_alv,
           wa_sort TYPE slis_sortinfo_alv.
    START-OF-SELECTION.
      v_repid = sy-repid.
      SELECT * FROM ztable_10 INTO TABLE it_temp.
      LOOP AT it_temp .
        it-srno = 'Total'.
        it-name = it_temp-name.
        it-age = it_temp-age.
        APPEND  it.
      ENDLOOP.
    END-OF-SELECTION.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         i_program_name               = v_repid
         i_internal_tabname           = 'IT'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
         i_inclname                   = v_repid
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
        CHANGING
          ct_fieldcat                  = i_fieldcat[]
       EXCEPTIONS
         inconsistent_interface       = 1
         program_error                = 2
         OTHERS                       = 3
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    wa_fieldcat-row_pos = 1.
    wa_fieldcat-col_pos = 1.
    wa_fieldcat-fieldname = 'SRNO'.
    wa_fieldcat-tabname = it.
    append wa_fieldcat to i_fieldcat.
      LOOP AT i_fieldcat INTO wa_fieldcat.
        IF wa_fieldcat-fieldname = 'AGE'.
          wa_fieldcat-do_sum = 'X'.
          MODIFY i_fieldcat FROM wa_fieldcat.
        ENDIF.
       IF wa_fieldcat-fieldname = 'SRNO'.
         Hide this field so that it can display it's content i.e.
            Total text in Subtotal level
        wa_fieldcat-tech = 'X'.
          wa_fieldcat-no_out = 'X'.
          MODIFY i_fieldcat FROM wa_fieldcat TRANSPORTING tech no_out.
       ENDIF.
      ENDLOOP.
    wa_sort-spos = 1.
    wa_sort-fieldname = 'SRNO'.
    wa_sort-up = 'X'.
    wa_sort-subtot = 'X'.
    APPEND wa_sort TO i_sort.
      gd_layout-no_totalline = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                       = ' '
         i_callback_program                        = v_repid
      I_CALLBACK_PF_STATUS_SET     = ' '
    i_callback_user_command                = '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                                      = gd_layout
         it_fieldcat                                      = i_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
         it_sort                           = i_sort
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      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
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = it
       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.
    Regards,
    Seema

  • Need to display grand total text in OOPS ABAP ALV report

    Hi
    I am using OOPS for alv display and need to display grand "total text" in any column in th eoutput display.
    I know the procedure to display in ALV display. but dont have idea in OOPS. Please help.
    Thanks
    Amminesh.

    hi,
    follow this link for alv's with oop's oncept.
    http://abapreports.blogspot.com/2008/06/alv-grid-display-with-oops.html
    for calculating total  to the specific field.....
    while creating the fieldcatalog pass the value 'X' to field do_sum of lvc_t_fcat( field catalog).
    data: fcat type lvc_t_fcat.
    fcat-fieldname = <field-name>.
    fcat-ref_table = <ref-tablename>.
    fcat-ref_field = <ref-fieldname>.
    fcat-do_sum = 'X'.
    regards,
    Ashok

  • How to get grand total text  in the last column of reuse_alv_grid_display ?

    Hi,
    Experts,
    I am able to get the subtotal text but i am not able to get the grand total text please pass some code or idea on it.
    ex:
         2510    gopi       10
         2511   gopi        20
    subtotal                 30
         2521    anand    20
         2522    anand    10
        2523     anand    50
    subtotal                 80
         2512   vikram     30
    subtotal                 30
    (blank----)              140.
    Here i want to get text as 'COMPANY TOTAL'. by using REUSE_ALV_GRID_DISPLAY FM.
    Thanks,
    Shabeer ahmed.

    Hi,
      you can get the 'COMPANY TOTAL' by using the following code:
      LOOP AT i_main INTO w_main.*   Storing the Total text need to be displayed in
      ALV
        w_final-total      = 'COMPANY TOTAL'.
        w_final-field1   = w_main-field1.
        w_final-field2    = w_main-field2.   
        w_final-field3   = w_main-field3 .  
       APPEND w_final TO i_final.  ENDLOOP.
    Regards,
      Santosh

  • Grand total values are not matching with Detail report

    Report has grand totals and when I drill to the detail report, grand total values are NOT matching with parent report totals, I did some analysis but I'm clueless on this issue.
    Please provide your thoughts and insight on this issue..
    Thanks

    is your summary and detail reports hitting different facts, like summary hitting aggregate and detail report hitting it's corresponding detail level fact..?
    if then,
    From Front-end:
    Fix the filter values in detail report that are passing from master report then try delete each columns then check the grand total. If you found your values is matching by deleting particular column then you need to investigate what is the issue around with that dimension table..
    From Database side:
    1. check first aggregate table has proper aggregate data of it's detail..
    2. Take the detail report obiee generated query and try to comment each dimension table and it's corresponding joins to the facts, (before, this delete all the dimensional columns and other measures from select statement and put only that measure where you are getting wrong value, so that you need not to comment all the select and group by columns which saves your time.. ). Need to check by commenting each dimensional wid and it's table from clause, if you found that values is matching then there is some problem with wid columns data population in your ETL.
    Is that BI-Apps project?
    btw, whtz ur name?

  • PDF looks fine on screen but text does not print

    PDF created from Word looks fine on screen but text does not print (graphics do). Alos loses text on FTP or Email.  Windows 8.1 64bit. Acrobat XI Std. Word2013. Print to PDF from Word 600dpi, use doc fonts, download as softfont. Arial, calibrai - all fonts lost. Same issue as Phillipio61 and alacker2?.

    Problem not with all fonts.  Problem with arial and calibri fonts - maybe others.  Times New Roman, gil sans, viner are OK for example.

  • Sub total text is not working

    Dear experts,
    I am working on ALV report. I need to maintain Sub total text but its not working with the below code.
    Can you please tell me whats wrong with this code.
    FORM f_display_alv_output .
      DATA: loc_repid TYPE sy-repid.
      CLEAR: loc_repid.
      loc_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
       i_callback_program                = loc_repid
    *   I_CALLBACK_PF_STATUS_SET          = ' '
    *   I_CALLBACK_USER_COMMAND           = ' '
    *   i_callback_top_of_page            = 'F_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                         = fs_layout
       it_fieldcat                       = itab_fieldcat
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
       it_sort                           = itab_sort
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
       i_default                         = 'X'
       i_save                            = 'A'
    *   IS_VARIANT                        =
       it_events                         = itab_events
    *   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                          = itab_output
    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.                    " F_DISPLAY_ALV_OUTPUT
    *&      Form  F_POPULATE_SORT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM f_populate_sort .
      CLEAR: fs_sort.
      REFRESH: itab_sort.
    * Sort by Account Manager
      fs_sort-spos = '01' .
      fs_sort-fieldname = 'ACT_MANAGER'.
      fs_sort-tabname = 'ITAB_OUTPUT'.
      fs_sort-up = 'X'.
      fs_sort-subtot = 'X'.
      APPEND fs_sort TO itab_sort .
      CLEAR fs_sort.
    * Sort by Sales Office
      fs_sort-spos = '02' .
      fs_sort-fieldname = 'VKBUR'.
      fs_sort-tabname = 'ITAB_OUTPUT'.
      fs_sort-up = 'X'.
      fs_sort-subtot = 'X'.
      APPEND fs_sort TO itab_sort .
      CLEAR fs_sort.
    * Sort by Customer
      fs_sort-spos = '03' .
      fs_sort-fieldname = 'KUNNR'.
      fs_sort-tabname = 'ITAB_OUTPUT'.
      fs_sort-up = 'X'.
      fs_sort-subtot = 'X'.
      APPEND fs_sort TO itab_sort .
      CLEAR fs_sort.
    * Sort by Material
      fs_sort-spos = '04' .
      fs_sort-fieldname = 'MATNR'.
      fs_sort-tabname = 'ITAB_OUTPUT'.
      fs_sort-up = 'X'.
      fs_sort-subtot = 'X'.
      APPEND fs_sort TO itab_sort .
      CLEAR fs_sort.
    ENDFORM.                    " F_POPULATE_SORT
    *&      Form  F_GET_EVENT
    *  Handle events for the list
    *  -->  p1        text
    *  <--  p2        text
    FORM f_get_event .
      REFRESH: itab_events.
      CLEAR: fs_events.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 4
        IMPORTING
          et_events       = itab_events
        EXCEPTIONS
          list_type_wrong = 0
          OTHERS          = 0.
      CLEAR: fs_events.
      READ TABLE itab_events INTO fs_events WITH KEY name = slis_ev_top_of_page.
      IF sy-subrc EQ 0.
        MOVE 'F_ALV_TOP_OF_PAGE' TO fs_events-form.
        MODIFY itab_events FROM fs_events INDEX sy-tabix.
      ENDIF.
      CLEAR fs_events.
      READ TABLE itab_events  INTO fs_events WITH KEY name = slis_ev_subtotal_text.
      IF sy-subrc = 0.
        MOVE wl_formname_subtotal_text TO fs_events-form.
        MODIFY itab_events FROM fs_events INDEX sy-tabix.
      ENDIF.
    ENDFORM.                    " F_GET_EVENT
    *&      Form  SUBTOTAL_TEXT_form
    *       text
    FORM subtotal_text_form USING p_subtot_text TYPE slis_subtot_text.
      IF p_subtot_text-criteria = 'ACT_MANAGER'.
        p_subtot_text-display_text_for_subtotal = 'Account Manager Level Subtotal'(020).
      ENDIF.
    ENDFORM.                    "SUBTOTAL_TEXT
    *&      Form  f_alv_top_of_page
    *       text
    FORM f_alv_top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = itab_top_of_page.
    ENDFORM.                    "F_ALV_TOP_OF_PAGE
    Edited by: Rajesh Tummala on Apr 7, 2009 4:16 PM

    Here's the code below. Sub total text event is not working but top of page is working fine.
    *&      Form  F_POPULATE_SORT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM f_populate_sort .
      CLEAR: fs_sort.
      REFRESH: itab_sort.
    * Sort by Account Manager
      fs_sort-spos = '01' .
      fs_sort-fieldname = 'ACT_MANAGER'.
      fs_sort-tabname = 'ITAB_OUTPUT'.
      fs_sort-up = 'X'.
      fs_sort-subtot = 'X'.
      APPEND fs_sort TO itab_sort .
      CLEAR fs_sort.
    * Sort by Sales Office
      fs_sort-spos = '02' .
      fs_sort-fieldname = 'VKBUR'.
      fs_sort-tabname = 'ITAB_OUTPUT'.
      fs_sort-up = 'X'.
      fs_sort-subtot = 'X'.
      APPEND fs_sort TO itab_sort .
      CLEAR fs_sort.
    * Sort by Customer
      fs_sort-spos = '03' .
      fs_sort-fieldname = 'KUNNR'.
      fs_sort-tabname = 'ITAB_OUTPUT'.
      fs_sort-up = 'X'.
      fs_sort-subtot = 'X'.
      APPEND fs_sort TO itab_sort .
      CLEAR fs_sort.
    * Sort by Material
      fs_sort-spos = '04' .
      fs_sort-fieldname = 'MATNR'.
      fs_sort-tabname = 'ITAB_OUTPUT'.
      fs_sort-up = 'X'.
      fs_sort-subtot = 'X'.
      APPEND fs_sort TO itab_sort .
      CLEAR fs_sort.
    ENDFORM.                    " F_POPULATE_SORT
    *&      Form  F_GET_EVENT
    *  Handle events for the list
    *  -->  p1        text
    *  <--  p2        text
    FORM f_get_event .
      REFRESH: itab_events.
      CLEAR: fs_events.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 4
        IMPORTING
          et_events       = itab_events
        EXCEPTIONS
          list_type_wrong = 0
          OTHERS          = 0.
      CLEAR: fs_events.
      READ TABLE itab_events INTO fs_events WITH KEY name = slis_ev_top_of_page.
      IF sy-subrc EQ 0.
        MOVE 'F_ALV_TOP_OF_PAGE' TO fs_events-form.
        MODIFY itab_events FROM fs_events INDEX sy-tabix.
      ENDIF.
      CLEAR fs_events.
      READ TABLE itab_events  INTO fs_events WITH KEY name = slis_ev_subtotal_text.
      IF sy-subrc = 0.
        MOVE wl_formname_subtotal_text TO fs_events-form.
        MODIFY itab_events FROM fs_events INDEX sy-tabix.
      ENDIF.
    ENDFORM.                    " F_GET_EVENT
    *&      Form  F_DISPLAY_ALV_OUTPUT
    *   Display the list output
    *  -->  p1        text
    *  <--  p2        text
    FORM f_display_alv_output .
      DATA: loc_repid TYPE sy-repid.
      CLEAR: loc_repid.
      loc_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
       i_callback_program                = loc_repid
    *   I_CALLBACK_PF_STATUS_SET          = ' '
    *   I_CALLBACK_USER_COMMAND           = ' '
    *   i_callback_top_of_page            = 'F_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                         = fs_layout
       it_fieldcat                       = itab_fieldcat
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
       it_sort                           = itab_sort
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
       i_default                         = 'X'
       i_save                            = 'A'
    *   IS_VARIANT                        =
       it_events                         = itab_events
    *   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                          = itab_output
    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.                    " F_DISPLAY_ALV_OUTPUT
    *&      Form  SUBTOTAL_TEXT_form
    *       text
    FORM subtotal_text_form USING p_subtot_text TYPE slis_subtot_text.
      IF p_subtot_text-criteria = 'ACT_MANAGER'.
        p_subtot_text-display_text_for_subtotal = 'Account Manager Level Subtotal'(020).
      ENDIF.
    ENDFORM.                    "SUBTOTAL_TEXT
    *&      Form  f_alv_top_of_page
    *       text
    FORM f_alv_top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = itab_top_of_page.
    ENDFORM.                    "F_ALV_TOP_OF_PAGE

  • Adobe Acrobat Pro text box not printing and is hidden under box highlight.

    Adobe Acrobat Pro 10.1.13.  I am completing a form with text box throughout the document. I can no get the text box to printing and the text is hidden under box highlight.  I have tried printing with the print feature 'Comments & Forms/ Document and Markups' with no luck.

    It's doing that because you have field highlighting enabled. YOu can either turn it off or make the field read-only (if it's only used for display and not entry).

  • Standard text / Text module not printed correctly in Adobe forms

    Hi All,
    I need to print the dunning level text which is static. I have created text module and standard text with the same static text.
    In the content I have created the text with text module tyoe and given the text module name. Similarly I created the include text as well.
    But the text is getting printed continously, eventhough I have maintained as paragraphs.
    For Example: I have maintained text as    TEST1
                                                                       TEST2
                                                                       TEST3
    Now the same format shud be printed in the output. But  TEST1 TEST2 TEST3 is printed.
    Can anyone help me out how to print the text as in the above case and what is the reason for not printing in paragraphs.
    Thanks and Rewards,
    Karthik Ganti.
    Message was edited by: Dezso Pap - Moderator

    Hi Kartik,
    1. ead standard text by FM READ_TEXT.
    2. Read text lines content Read internal table LINES into wa_lines.
    Concat wa_lines-tdline into string separated by as CL_ABAP_CHAR_UTILITIES=>CR_LF.
    Bind that String to variable to text.
    That will display text as you create.
    Santosh

  • Totals text and currency sign in alv grid

    Hi!
    How to display totals text and currency sign in the totals part of the alv grid??
    Ex.
                  5    6
                  4    9
                  5    2
    Totals: $14 $17

    Hi,
    For Currency :
    https://forums.sdn.sap.com/click.jspa?searchID=11871008&messageID=3564279
    https://forums.sdn.sap.com/click.jspa?searchID=11871008&messageID=1019294
    For Total_text
    Maybe you will find something in examples SALV_OBJECTS.
    it's a package in the systems above 6.4 with new ALV. There are nice examples. Main package is SALV.
    https://forums.sdn.sap.com/click.jspa?searchID=11871273&messageID=3935361
    Regards,
    Shiva Kumar

  • Crystal Reports Grand Totals and int not working

    I am new to Crystal Reports, I am using the Visual Studios version. I have a couple of different questions. My report is a cross tabs report. In one of the cells I want to include a name and the total number of records for the person. To make it visually appear how I want it, I have chosen the Cross-Tab Group Options - Use a Formula. This is what I have entered:
    {SP_GET_QATPADJ.AJNAME} + ChrW(13) + ToText(Int({SP_GET_QATPADJ.CNT})) + " Claims", the problem is the .CNT field still shows the .00 after the number. I want it to be a whole number. I have tried several different functions in place of the Int, but it still shows the .00.
    My second question, is there any way to modify just one grand total? Within each person of the report there are three rows, number correct, number possible and percent (all of these are returned in the stored procedure). The total column on the right totals the correct & possible okay, but for the percent I would like it to be the percent of the total correct & total possible. LIke the total correct is 13 and total possible is 20, I would like the percent to be 65 (it is showing 234 the sum of the percents for all the columns).

    Inorder to remove .00 for an integer try this
    ToText(Int({SP_GET_QATPADJ.CNT}),"##")
    For the other question
    Right click on Total Correct value and go to format field and write the suppress condition by clicking on X+2 corresponds to suppress like this
    whileprintingrecords;
    numbervar TC:=currentfieldvalue;
    false;
    Now again Right click on Total Possible value and go to format field and write the suppress condition by clicking on X+2 corresponds to suppress like this
    whileprintingrecords;
    numbervar TP:=currentfieldvalue;
    false;
    Now right click on percent value and go to format field and click on X+2 corresponding to DisplayString
    and write the formula like this
    whileprintingrecords;
    numbervar TC;
    numbervar TP;
    totext((TC/TP)*100)+"%"
    Hope this would deffinetly help you!!!!
    Raghavendra.G

  • Logo is not printing in ALV report

    Hi all,
             I have to print logo in the O/P list of an ALV report. for this i have written the code like......
    FORM TOP-OF-PAGE.
      wa_listheader-typ  = 'H'.
      wa_listheader-info = 'This is an ALV report'.
      append wa_listheader to it_listheader.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            it_list_commentary       = it_listheader
           I_LOGO                   =  'ENJOY'.
    endform.
    and i have passed this TOP-OF-PAGE to I_CALLBACK_TOP_OF_PAGE .Here my problem is the logo and list heading also not getting printed in the o/p, but list is coming...pls help me out...
    Thanks & Regards.
    Laxman.P
    B'lore.
        ENDFORM.

    Hi,
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
    i_callback_program = i_repid
    i_callback_user_command = 'USER_COMMAND_PERNR'
    it_fieldcat = header
    is_layout = gt_layout
    i_callback_top_of_page = 'TOP-OF-PAGE1'
    i_grid_title = xyz
    it_sort = gt_sort[]
    i_default = 'X'
    i_save = 'U'
    is_variant = gt_variant
    it_events = gt_events
    tables
    t_outtab = t_output.
    clear t_output.
    Form TOP-OF-PAGE1
    form top-of-page1.
    data: header type slis_t_listheader,
    wa type slis_listheader. "infield like wa-info, nline type n.
    TITLE AREA
    wa-typ = 'S'.
    wa-info = text-h04.
    append wa to header.
    wa-typ = 'S'.
    write sy-datum to wa-info mm/dd/yyyy.
    concatenate text-h03 wa-info into wa-info separated by space.
    append wa to header.
    wa-typ = 'S'.
    concatenate text-h02 sy-uname into wa-info separated by space.
    append wa to header.
    wa-typ = 'S'.
    concatenate text-h01 sy-repid into wa-info separated by space.
    append wa to header.
    ********" LOGO
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = header
    i_logo = 'ENJOYSAP_LOGO'.
    *********" LOGO
    endform.
    refer this report
    <b>
    BALVST03_GRID</b>
    <b>Reward points</b>
    Regards

  • Sub total icon is not displaying in alv report output

    Hi friends ,
    In alv report display on menu bar the icon : subtotals is not displaying at the output , I should not give subtotal in each field catalog .
    Plz give me solution, points will be rewarded.
    with regards,
    prasad.

    Hi,
    I think u r using PF-STATUS parameter in function module,
    if u use this parameter, you sholud give the icon name etc..
    otherwise by default it will appear.
    Check your code again.
    Give me exact requirement, if possible paste the code.
    Regards,
    Chandu

  • Header text is not printed in the smartform

    Hi ,
       In my smartforms,I am not able to see the header text.How can i approach to this problem
    Tcode - Vl02n ,I am using the standard program.(RLE_DELNOTE).Text object VBBK ,Text Id Z001
    Thanks,
    Ravi

    Hi Ravi,
    You take a internal table which you declear in global data in your smartform and use wark area for append itab .
    Regards.
    Ankur Garg.

  • Subtotal text print in alv grid report

    HI all,
    I am  trying to print the text for the column e.g. "SUBTOTAL TEXT" when i click on event button on the tool bar.
    total is getting generated but text is not printing i am giving the code what i had written please tel me what changes should be done in this code .
    ***********Code
    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  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 = 'KWMENG'.
        p_subtot_text-display_text_for_subtotal    = 'Total '(009).
      ENDIF.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = it_repid
       I_CALLBACK_TOP_OF_PAGE            = 'TOP-OF-PAGE'                         "#EC *
       IS_LAYOUT                         = it_lay
       IT_FIELDCAT                       = it_fldct[]
       IT_EVENTS                         = i_event
      TABLES
        t_outtab                          = it_outtb
    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.                                                              "Alv_Display
    Thank you,
    Supriya.

    in order to get the subtotals and subtotal texts you need to have sort option. without sort option it is not possible to trigger this event.
    first populate the sort table then it will tirgger. check this thread for sample code
    Re: SubTotal Text in ALV?

Maybe you are looking for