Font size in ALV

Hai,
How can i change the font size of top-of-list and end-of-list in ALV.

hi,
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
  I_INTERFACE_CHECK                 = ' '
  I_BYPASSING_BUFFER                =
  I_BUFFER_ACTIVE                   = ' '
   I_CALLBACK_PROGRAM                =  SY-CPROG
  I_CALLBACK_PF_STATUS_SET          = 'PF_STATUS'
  I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
   I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
   I_CALLBACK_HTML_TOP_OF_PAGE       = 'HTML_TOP_OF_PAGE'.
*&      Form  HTML_TOP_OF_PAGE
      text
FORM HTML_TOP_OF_PAGE USING TOP TYPE REF TO CL_DD_DOCUMENT.
CALL METHOD TOP->ADD_TEXT
                EXPORTING TEXT = V_COMPANYNAME
                     SAP_STYLE = 'HEADING'.
CALL METHOD TOP->NEW_LINE.
CASE 'X'.
WHEN P_DIVISN.
CALL METHOD TOP->ADD_TEXT
EXPORTING TEXT = 'Report Name : Contract Details Report Division Wise.'
                     SAP_STYLE = ''.
WHEN P_UNIT.
  CALL METHOD TOP->ADD_TEXT
EXPORTING
TEXT = 'Report Name : Contract Details Report Unit Wise.'.
SAP_FONTSIZE = '10'
*SAP_FONTSTYLE
*SAP_EMPHASIS
ENDCASE.
CALL METHOD TOP->NEW_LINE.
CALL METHOD TOP->ADD_TEXT
                      EXPORTING TEXT = 'Report Criteria :'.
                               SAP_STYLE = ''.
CALL METHOD TOP->NEW_LINE.
WRITE SY-DATUM TO V_DATE.
CONCATENATE 'Report Run On -' V_DATE INTO V_STRING SEPARATED BY SPACE.
CALL METHOD TOP->ADD_TEXT
                      EXPORTING TEXT = V_STRING.
                               SAP_STYLE = ''.
SELECT SINGLE NAME_TEXTC FROM USER_ADDR INTO V_USER
                         WHERE BNAME = SY-UNAME.
CALL METHOD TOP->NEW_LINE.
CONCATENATE 'Report Run By -' V_USER INTO V_STRING SEPARATED BY SPACE.
CALL METHOD TOP->ADD_TEXT
                      EXPORTING TEXT = V_STRING.
                               SAP_STYLE = ''.
WRITE : S_PERIOD-LOW TO V_DATE,
        S_PERIOD-HIGH TO V_DATE1.
CONCATENATE 'Report Period : From ' V_DATE 'To' V_DATE1 INTO V_STRING
                                                     SEPARATED BY SPACE
CALL METHOD TOP->NEW_LINE.
CALL METHOD TOP->ADD_TEXT
                      EXPORTING TEXT = V_STRING.
                               SAP_STYLE = ''.
CALL METHOD TOP->NEW_LINE.
IF P_DIVISN = 'X'.
CALL METHOD TOP->ADD_TEXT
                      EXPORTING TEXT = 'DIVISION :'.
                               SAP_STYLE = ''.
ELSEIF P_UNIT = 'X'.
CALL METHOD TOP->ADD_TEXT
                      EXPORTING TEXT = 'UNIT :'.
                               SAP_STYLE = ''.
ENDIF.
LOOP AT R_TABLE.
  MOVE R_TABLE-LOW TO V_VAR.
  CALL METHOD TOP->NEW_LINE.
  CALL METHOD TOP->ADD_GAP
                      EXPORTING WIDTH = '20'.
  CALL METHOD TOP->ADD_TEXT
                      EXPORTING TEXT = V_VAR.
                               SAP_STYLE = ''.
ENDLOOP.
  CALL METHOD TOP->NEW_LINE.
ENDFORM.

Similar Messages

  • Font size in alv printing

    He friends,
    While  I am printing report  from alv  it is printing in small font size , Please advise how to increase font size in alv printing .
    Regards
    S.Sharma

    Hi,
    http://help.sap.com/saphelp_nw04/helpdata/en/b6/e3eb40c4f8712ae10000000a155106/frameset.htm
    For Fontsize also you have option in the ADD_TEXT method.
    For Details check this program DD_STYLE_TABLE
    Edited by: Neenu Jose on Oct 24, 2008 10:37 AM
    Edited by: Neenu Jose on Oct 24, 2008 10:38 AM

  • Bold chars & increase font size in ALV Top of Page - OOPS

    Hi,
    I am using ALV OOPs to display my data.
    I am splitting the container and using top container to display headings in following way:
    data:   top TYPE REF TO cl_dd_document
      CREATE OBJECT top
        EXPORTING
          style = 'ALV_GRID'.
      lv_fontsize = cl_dd_document=>large.
    lv_text = 'HEADING'.
      CONDENSE lv_text.
      CALL METHOD top->add_text
        EXPORTING
          text         = lv_text
          fix_lines    = 'X'
          sap_fontsize = lv_fontsize         "cl_dd_document=>large
        CHANGING
          document     = cv_top.
    But the heaidng is not displayed with high font size and is similar to the text with cl_dd_document=>medium
    How can I increase font size of heading.
    Thanks!

    Hi Vasu,
    Use SAP_STYLE parameter in the method.
    Value will be HEADING or KEY.
    Regards,
    Amitava

  • Can we change font size in ALV output?

    Hi,
    I would like to know if can change the font size of the output in ALV reports. 
    We did suggest the client to download into excel & change it but they would like to see the fontsize as 10 in ALV output itself. This allows them to fit more columns in a screen.
    I appreciate your response.
    Thanks,
    Ritu

    Hi Ritu,
    In structure of type “LVC_S_LAYO”, there is a field called SMALLTITLE..
    If this field is set, the title size in the grid control is set to the font size of the column header.
    This s the only way i know you can have a control on the font size..
    FORM prepare_layout CHANGING ps_layout TYPE lvc_s_layo.
    ps_layout-zebra = 'X' .
    ps_layout-grid_title = 'Flights' .
    ps_layout-smalltitle = 'X' .
    ENDFORM. " prepare_layout
    hope this helps you..
    regards
    satesh

  • Controlling Font size in alv grid using oops

    Hi Experts,
    I have a requirement where i want to change the font size of the grid title bar.
    Is there any way of acheiving this.
    I do see a  method set_title size in the class cl_gui_alv_grid. However it is a protected method and i am not able implement it in my program.
    Any pointers on this would be higly appreciated.
    Thanks and Regards,
    Jey sabith Ebron

    Hi
    I tried and it worked with me.
    The grid title was indeed changed from the the method Set_Title_Size.
    To use the method you have to Create a Local Class Inheriting the Class CL_GUI_ALV_GRID.
    CLASS ZCL_GUI_ALV_GRID DEFINITION INHERITING FROM CL_GUI_ALV_GRID.
      PUBLIC SECTION.
        METHODS TITLE_SIZE.
      PRIVATE SECTION.
    ENDCLASS.                    "ZCL_GUI_ALV_GRID DEFINITION
    Then use the above method in the Implementation part as .
    CLASS ZCL_GUI_ALV_GRID IMPLEMENTATION.
      METHOD TITLE_size.
        ME->SET_TITLE_SIZE( EXPORTING SIZE = 1
                            EXCEPTIONS ERROR = 1  ).
      ENDMETHOD.
    ENDCLASS.
    Now when your reference variable should be
    Data :GRID type ref to ZCL_GUI_ALV_GRID.
    and Create the Object as
    CREATE OBJECT GRID
               EXPORTING I_PARENT = G_CUSTOM_CONTAINER1.
    Before Calling Set_table_for_ first_display, Call the created method
    CALL METHOD GRID->TITLE_SIZE.

  • Need to increase font size of header in ALV

    Hi,
        I have a requirement to increase the font-size of header in the output ALV report. Also, i need to remove some of the standard icons from the output ALV using IT_EXCLUDING ?...Could any of you help me with this ?

    Hi friend,
    first, to increase font size of ALV header you can build a header manually as below:
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    * EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
    *   I_CALLBACK_PROGRAM                = ' '
       I_CALLBACK_PF_STATUS_SET          = 'PF_STATUS_SET '
       I_CALLBACK_USER_COMMAND           = 'HTML_TOP_OF_PAGE'
    *   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                         =
    *   IT_FIELDCAT                       =
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_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
    *   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                          =
    * 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.
    in your code, write 2 subroutines name: HTML_TOP_OF_PAGE and PF_STATUS_SET
    FORM html_top_of_page USING r_top TYPE REF TO cl_dd_document.
      DATA: text TYPE sdydo_text_element.
      DATA: s_table TYPE REF TO cl_dd_table_element.
      DATA: col_key TYPE REF TO cl_dd_area.
      DATA: col_info TYPE REF TO cl_dd_area.
    ** split TOP-Document
      CALL METHOD r_top->vertical_split
        EXPORTING
          split_area  = r_top
          split_width = '50%'.
    *    IMPORTING
    *      right_area  = a_logo.
    ** fill TOP-Document
      text = 'Example of a Heading'(201).
      CALL METHOD r_top->add_text
        EXPORTING
          text         = text
          sap_style    = 'HEADING'.
      CALL METHOD r_top->new_line.
      CALL METHOD r_top->new_line.
    CALL METHOD r_top->new_line.
      CALL METHOD r_top->new_line.
      CALL METHOD r_top->add_table
        EXPORTING
          no_of_columns = 2
          with_heading  = ' '
          border        = '0'
        IMPORTING
          table         = s_table.
      CALL METHOD s_table->add_column
        IMPORTING
          column = col_key.
      CALL METHOD s_table->add_column
        IMPORTING
          column = col_info.
      text = 'A key value marked'(202).
      CALL METHOD col_key->add_text
        EXPORTING
          text         = text
          sap_emphasis = 'Strong'.
      CALL METHOD col_info->add_gap
        EXPORTING
          width = 6.
      text = '600' .
      CALL METHOD col_info->add_text
        EXPORTING
          text      = text
          sap_style = 'Key'.
      CALL METHOD col_info->add_gap
        EXPORTING
          width = 3.
      text = 'Test'.
      CALL METHOD col_info->add_text
        EXPORTING
          sap_fontsize = cl_dd_area=>large "set font size
          text         = text.
    endform.
    *&      Form  pf_status_set
    *  Set pf status for alv list
    *      -->PT_EXTAB   tab for excluding fcode
    FORM pf_status_set USING pt_extab TYPE slis_t_extab.
      DATA:
            ls_extab TYPE slis_extab.
    *-sort up
      ls_extab-fcode = '&OUP'.
      APPEND ls_extab TO pt_extab.
    *-- sort down
      ls_extab-fcode = '&ODN'.
      APPEND ls_extab TO pt_extab.
      SET PF-STATUS 'STANDARD' EXCLUDING pt_extab. "change standard as your status
    ENDFORM.                    "pf_status_set
    You can refer the set font size in report DD_STYLE_TABLE.
    regards,

  • How can we alv header font size increase

    hi experts,
    how can we increase the font size in alv report?
    i am using html_top_of_page
    regards
    guna

    Make use of the class - CL_DD_DOCUMENT
    Code below may give you some help.
    FORM HTML_TOP_OF_PAGE USING R_TOP TYPE REF TO CL_DD_DOCUMENT.
      text = 'Test' .
    CALL METHOD R_TOP->ADD_TEXT
        EXPORTING
          TEXT      = TEXT
          SAP_STYLE = 'HEADING'.
    endform.
    Thanks!

  • ALV  Lay out Font size  to be increased by 1

    Hi   all
    pls help me out .
    how to increase the font size in ALV Layout  after displaying.<b></b>
    i hope there should be a solution...

    Hi Suma123 devi,
    I am sorry to report that this is impossible. You cannot increase the font size in ALV layout.
    Sorry,
    Chester

  • Change Font size for Line printer when Printing ALV

    We are using device type IBM 64xx LP+ emulation 1.00A to print to an IBM line printer.
    I would like to change the font size of an ALV report I am sending to the device.
    Can the font size be set in the Printer Initialization section of the Format?
    Ex. I am using X_65_255
    What/Where can I add the font size
    Set to P-Series Emulation (SSCC P 0)
    \0x1b\0x7c\0x7d\0x3b\0x50\0x30
    Emulation Reset                               (SFCC @)
    \0x01\0x40
    Character Set = IBM PC, ASCII, IBM PC(0850)   (SFCC l 0 0 1)
    \0x01\0x6c\0x30\0x30\0x31
    Print Mode/Pitch Selection = DP Quality, 20 cpi
    \0x01\0x7c\0x7d;Sxxxxx;0;0;xxx;0024;0048
    Line Spacing = 6 lpi                          (SFCC 2)
    \0x01\0x32
    Forms Length Set = 66 lines                   (SFCC LINES;66 <CR><LF>)
    \0x01LINES;66\0x0d\0x0a
    Thanks,
    Mike

    You will find the P-series emulation here: [LinePrinter Plus programmer's reference manual|http://www.printronix.com/WorkArea/downloadasset.aspx?id=4546] (printronix doc)
    You don't have many options with P-series. Maybe it's better to choose another emulation, and get the IBM 64xx programmer's guide.

  • Changing font size(bold) or color of a particular row in ALV Grid Digplay

    Hi Experts ,
    I am having a requirment to highlight some particular rows in ALV Grid Display . To achieve this i need to change font size or make it bold or change color of that row .
    Please give me some inputs .
    Thanks in Advance.
    Vijyeta

    Hi
    Coloring An Entire Row
    Coloring a row is a bit (really a bit) more complicated. , you should add an additional field to your list data table. It should be of character type and length at least 4. This field will contain the color code for the row.
    First you have to declaration of our list data table u201Cgt_listu201D.
    DATA BEGIN OF gt_list OCCURS 0 .
    INCLUDE STRUCTURE SFLIGHT .
    DATA rowcolor(4) TYPE c .
    DATA END OF gt_list .
    Adding the field that will contain row color data
    As you guess, you should fill the color code to this field.  But how will ALV Grid know that you have loaded the color data for the row to this field. So, you make it know this by passing the name of the field containing color codes to the field u201CINFO_FNAMEu201D of the layout structure.
    e.g.
    ps_layout-info_fname = <field_name_containing_color_codes>. u201Ce.g. u2018ROWCOLORu2019
    You can fill that field anytime during execution. But, of course, due to the flow logic of screens, it will be reflected to your list display as soon as an ALV refresh occurs.
    Try this link also:
    Possible functionalities in ALV
    Regards
    Neha

  • Can we control Font and Font size in Non-alv report list ?

    Hi Experts,
    Can we control Font and Font size in Non-alv report list ?
    Regards
    vishnu

    Hi,
    see if this is useful to you,
    PRINT-CONTROL SIZE 2 COLOR BLACK FONT 5.
    you can go through this link,
    http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba62335c111d1829f0000e829fbfe/frameset.htm
    Regards,
    Abhijit G. Borkar

  • Increasing the font size of an ALV report while printing it.

    The requirement is to increase the font size of an ALV report while printing it. The ALV Report is coded using the Factory method.
    I could find a class called CL_SALV_ITEM with a SET_FONT method but I am not sure how to link it with the CL_SALV_TABLE class from which the display table has been created. I even tried checking the report display in SPOOL transaction SP01.But I guess the font shown there depends on the SAP GUI settings.
    Do you have any suggestions?
    Thanks and regards
    Sathya

    The status bar is a fixed fontsize which does not change. While I have no problem reading the time off the status bar you should also have the time on the lockscreen and/or glance screen with a much larger font so I do not really see the issue.
    I have all my music on SkyDrive so would not know for sure, but check out THIS to see if it serves your needs.
    Click on the blue Star Icon below if my advice has helped you or press the 'Accept As Solution' link if I solved your problem..

  • How to increase the font size of the ALV Print

    Hello Experts,
    How can we increase the font size while printing an ALV report? I tried searching the fourms for a solution from the previous postings, but could not find a "clear" answer. Thanks for the help.

    Hi,
    The size of the page is fixed, and if all the fields have to be there, then the font size will have to be decreased. So, if the no. of fields are less, it automatically increases thefont  size and prints.
    The size of the font in the printout is directly related to the line-size of the output on the screen. When we do the print, we check that the output format is optimal for the size of the line. For example, in the print dialog, check that the format is related to the size of your line. If there are 132 characters across, then choose format like X_65_132.
    thanks,
    Archana

  • Increase ALV Printout Font and Font Size

    Hi Experts,
    Is there a way of increasing the font size on the ALV Grid printout the comes from a printer? Also, how can I print the Logo at the top of the page of the ALV List? It only appears on the ALV List screen, but not on the printed copy. I am using the method set_table_for_first_display and the class cl_gui_alv_grid to display the output in the ALV.
    Thank you in advance for your contributions.
    Regards.

    Hello Vijay,
    I tried your suggestion along with I039643's suggested SET_PRINT_PARAMETERS FM in INITIALIZATION event. But I still do not see the format I specified in my report when I go to Report execute -> List -> Print -> Properties.
    I am not sure what I am missing here. Please let me know. Thanks.

  • ALV font size change

    I have got reports which have ALV grid display.I want to change the font size of the heading,is there a way in SAP for doing the same.
    In Selection screen,I want to change the font size of my fields,is there a option of doing this.

    it it possible so u can use follwoing code .
    FORM alv_grid .
      layout-zebra = 'X'.
      layout-colwidth_optimize = 'X'.
      layout-info_fieldname = 'COLOR'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = 'ZLIST2'
                i_callback_user_command = 'USER_COMMAND'
                i_callback_top_of_page  = 'TOP_OF_PAGE'
                i_callback_end_of_page  = 'END_OF_PAGE'
                is_layout               = layout
                it_fieldcat             = ls_fieldcat
                i_default               = 'X'
                i_save                  = 'A'
           TABLES
                t_outtab                = t_ekko
           EXCEPTIONS
                program_error           = 1
                too_many_lines          = 3
                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.
          FORM TOP_OF_PAGE                                              *
    FORM top_of_page.
      DATA : lable(60) TYPE  c.
      DATA : spac(5) TYPE c VALUE '    '.
      DATA : head TYPE  slis_listheader,header TYPE slis_t_listheader .
      head-typ  = 'H'.  head-info =  'HEADER DOCUMENT '.
      APPEND head TO header.
      CONCATENATE 'FROM' '  '  ebeln-low '  ' 'TO '  '  ' ebeln-high
       INTO  lable
    SEPARATED  BY space .
      head-typ  = 'S'.
      head-info = lable.
      APPEND head TO header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
          it_list_commentary = header
          I_LOGO             = 'ENJOYSAP_LOGO'.
    ENDFORM.

Maybe you are looking for