Skip to Content

How to reduce the height of the ALV grid table alone.

Hi,

How to reduce the height of the ALV grid.I should not get the scroll bar in the top of page.Is there any options in CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

screen1.jpg (232.0 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 31, 2013 at 06:16 PM

    Hello Dhinesh,

    You are talking about Pagination concept here. As far as I am aware there is no option in Function Module 'REUSE_ALV_GRID_DISPLAY'.

    You can achieve this concept using CL_GUI_ALV_GRID method SET_TABLE_FOR_FIRST_DISPLAY.

    Cheers,

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 31, 2013 at 08:18 PM

    Hi Dhinesh,

    You might have written some comment build for the top of the page ....

    where you mentioned the comany name, period , report name etc...

    Here you add two more lines such as

    Report Id,

    User ID

    Run date....

    Exampe...

    CLEAR gs_line.
    gs_line-typ = 'S'.
    gs_line-key = 'Report ID:'.
    gs_line-info = sy-repid.
    APPEND gs_line TO gt_top_of_page.



    CLEAR gs_line.
    gs_line-typ = 'S'.
    gs_line-key = 'User:'.
    gs_line-info = sy-uname.
    APPEND gs_line TO gt_top_of_page.


    CLEAR gs_line.
    gs_line-typ = 'S'.
    gs_line-key = 'Date:'.
    WRITE sy-datum TO gs_line-info MM/DD/YYYY.
    APPEND gs_line TO gt_top_of_page.

    Just by increasing the height, the scroll bar will go away....

    Regards,

    Venkat

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 01, 2013 at 04:48 AM

    Hi Dinesh,

    If you want to set height of top of page on REUSE_ALV_GRID_DISPLAY,

    use I_CALLBACK_HTML_TOP_OF_PAGE instead of I_CALLBACK_TOP_OF_PAGE.

    sample code...

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_HTML_TOP_OF_PAGE = 'TOP_OF_LIST_HTML'
    I_STRUCTURE_NAME = 'Structure_name'
    I_DEFAULT = 'X'
    I_SAVE = 'A'
    TABLES
    T_OUTTAB = <internal_table>.
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

    *&------------------------------------------------------------------*
    *& Form top_of_list_html
    *&------------------------------------------------------------------*
    * output at the end of the list - not in printed output *
    *&------------------------------------------------------------------*
    FORM top_of_list_html USING end TYPE REF TO cl_dd_document.

    DATA: ls_text TYPE sdydo_text_element,
    l_grid TYPE REF TO cl_gui_alv_grid,
    f(14) TYPE c VALUE 'SET_ROW_HEIGHT'.

    *----------------------------------------*
    * Yellow triangle *
    *----------------------------------------*
    ** adds new line (start new line)
    * CALL METHOD end->new_line.

    * display text(bold)
    CALL METHOD end->add_text
    EXPORTING
    text = 'Yellow triangle'
    sap_emphasis = 'strong'.

    * adds and icon (yellow triangle)
    CALL METHOD end->add_icon
    EXPORTING
    sap_icon = 'ICON_LED_YELLOW'.

    * display text(normal)
    CALL METHOD end->add_text
    EXPORTING
    text = 'Warning'.

    *----------------------------------------*
    * Green Light *
    *----------------------------------------*
    * adds new line (start new line)
    CALL METHOD end->new_line.

    * display text(bold)
    CALL METHOD end->add_text
    EXPORTING
    text = 'Green light'
    sap_emphasis = 'strong'.

    * adds and icon (yellow triangle)
    CALL METHOD end->add_icon
    EXPORTING
    sap_icon = 'ICON_LED_GREEN'.

    * display text(normal)
    CALL METHOD end->add_text
    EXPORTING
    text = 'Ok'.

    *----------------------------------------*
    * Red Light *
    *----------------------------------------*
    * adds new line (start new line)
    CALL METHOD end->new_line.

    * display text(bold)
    CALL METHOD end->add_text
    EXPORTING
    text = 'Red light'
    sap_emphasis = 'strong'.

    * adds and icon (yellow triangle)
    CALL METHOD end->add_icon
    EXPORTING
    sap_icon = 'ICON_LED_RED'.

    * display text(normal)
    CALL METHOD end->add_text
    EXPORTING
    text = 'Problematic'.

    *----------------------------------------*
    * Set Height *
    *----------------------------------------*
    *set height of this section
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    e_grid = l_grid.

    CALL METHOD l_grid->parent->parent->(f)
    EXPORTING
    id = 3
    height = 14.

    ENDFORM. "top_of_list_html.

    Regards,

    Mordhwaj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 01, 2013 at 05:52 AM

    Hi,

    Can you please share the code of your top of page?

    Regards

    Purnand

    Add a comment
    10|10000 characters needed characters exceeded

    • *&---------------------------------------------------------------------*

      *& Report ZVEFIN629

      *&

      *&---------------------------------------------------------------------*

      *&

      *&

      *&---------------------------------------------------------------------*

      REPORT ZVEFIN629.

      *&---------------------------------------------------------------------*

      * Type-pools

      *&---------------------------------------------------------------------*

      TYPE-POOLS:slis.

      *&---------------------------------------------------------------------*

      * Tables

      *&---------------------------------------------------------------------*

      TABLES:with_item,

      bsik,

      bsak,

      t001,

      lfa1.

      *&---------------------------------------------------------------------*

      * Data Declaration

      *&---------------------------------------------------------------------* .

      TYPES : BEGIN OF ty_getdata,

      bukrs TYPE with_item-bukrs,

      belnr TYPE with_item-belnr,

      gjahr TYPE with_item-gjahr,

      buzei TYPE with_item-buzei,

      witht TYPE with_item-witht,

      wt_withcd TYPE with_item-wt_withcd,

      wt_qbshh TYPE with_item-wt_qbshh,

      qsatz TYPE with_item-qsatz,

      wt_qsshh TYPE with_item-wt_qsshh,

      lifnr TYPE bsik-lifnr,

      budat TYPE bsik-budat,

      dmbtr TYPE bsik-dmbtr,

      bldat TYPE bsik-bldat,

      zuonr TYPE bsik-zuonr,

      hkont TYPE bsik-hkont,

      name1 TYPE lfa1-name1,

      reten_count(3) TYPE c,

      reten(15) TYPE c,

      END OF ty_getdata.

      TYPES : BEGIN OF ty_lfa1,

      lifnr TYPE lfa1-lifnr,

      name1 TYPE lfa1-name1,

      stcd1 TYPE lfa1-stcd1,

      stras TYPE lfa1-stras,

      END OF ty_lfa1.

      TYPES : BEGIN OF ty_addr,

      addrnumber TYPE adrc-addrnumber,

      name1 TYPE adrc-name1,

      name4 TYPE adrc-name4,

      street TYPE adrc-street,

      END OF ty_addr.

      *--Top-of-Page

      TYPES: sdydo_text_element(255) TYPE c.

      TYPES: sdydo_text_table TYPE sdydo_text_element OCCURS 5.

      DATA :gt_fieldcat TYPE slis_t_fieldcat_alv,

      gs_alvvariant TYPE disvariant,

      gs_layout TYPE slis_layout_alv.

      **Variant(Top-of-Page)**

      DATA :gt_list_top_of_page TYPE slis_t_listheader,

      gt_events TYPE slis_t_event.

      DATA: date1(10).

      DATA :gt_tax TYPE STANDARD TABLE OF ty_getdata,

      gs_tax TYPE ty_getdata,

      gt_lfa1 TYPE STANDARD TABLE OF ty_lfa1,

      gs_lfa1 TYPE ty_lfa1,

      gt_getdatafinal TYPE STANDARD TABLE OF ty_getdata,

      gs_getdatafinal TYPE ty_getdata.

      DATA : gv_addrnumber TYPE adrc-addrnumber,

      gv_name1 TYPE adrc-name1,

      gv_name2 TYPE adrc-name1,

      gv_name4 TYPE adrc-name4,

      gv_street TYPE adrc-street,

      gv_adrnr TYPE t001-adrnr,

      gv_budat(50) TYPE c,

      gv_count(3) TYPE c.

      *--PDF

      DATA:g_spool TYPE tsp01-rqident,

      pdf LIKE tline OCCURS 0.

      *&---------------------------------------------------------------------*

      * Selection Screen.

      *&---------------------------------------------------------------------*

      SELECTION-SCREEN BEGIN OF BLOCK block01 WITH FRAME TITLE text-000.

      SELECTION-SCREEN BEGIN OF LINE.

      SELECTION-SCREEN COMMENT 1(31) text-001.

      PARAMETER: p_bukrs TYPE t001-bukrs. " OBLIGATORY MEMORY ID buk.

      SELECTION-SCREEN COMMENT 45(30) name3.

      SELECTION-SCREEN END OF LINE.

      PARAMETER: p_gjahr TYPE bsak-gjahr ."OBLIGATORY MEMORY ID gjh.

      SELECT-OPTIONS: s_budat FOR bsak-budat,

      s_belnr FOR bsik-belnr,

      s_lifnr FOR bsak-lifnr.

      SELECTION-SCREEN END OF BLOCK block01.

      *

      SELECTION-SCREEN BEGIN OF BLOCK block04 WITH FRAME TITLE text-002.

      SELECTION-SCREEN BEGIN OF LINE.

      SELECTION-SCREEN COMMENT 1(43) text-006.

      SELECT-OPTIONS: s_ctare FOR bsak-hkont NO INTERVALS." OBLIGATORY.

      SELECTION-SCREEN END OF LINE.

      SELECTION-SCREEN END OF BLOCK block04.

      SELECTION-SCREEN: BEGIN OF BLOCK b4 WITH FRAME TITLE text-004.

      PARAMETERS : p_rad1 RADIOBUTTON GROUP rad ,

      p_rad2 RADIOBUTTON GROUP rad,

      p_check AS CHECKBOX , " Download Check Box

      p_dwd TYPE rlgrap-filename "Download File Path

      DEFAULT 'd:.pdf'.

      SELECTION-SCREEN: END OF BLOCK b4.

      *&---------------------------------------------------------------------*

      * Start of selection

      *&---------------------------------------------------------------------*

      START-OF-SELECTION.

      PERFORM dataretrival.

      IF NOT gt_getdatafinal IS INITIAL.

      PERFORM fieldcatalogue.

      PERFORM events.

      PERFORM display.

      ELSE.

      MESSAGE 'List Contains no Data'(009) TYPE 'I'.

      RETURN.

      ENDIF.

      CLEAR:gv_addrnumber,gv_name1,gv_name4,gv_street,gv_adrnr,gv_budat,gv_adrnr.

      *&---------------------------------------------------------------------*

      *& Form DATARETRIVAL

      *&---------------------------------------------------------------------*

      * text

      *----------------------------------------------------------------------*

      * --> p1 text

      * <-- p2 text

      *----------------------------------------------------------------------*

      FORM dataretrival .

      *--Header Details

      SELECT SINGLE adrnr FROM t001 INTO gv_adrnr WHERE bukrs = p_bukrs.

      IF NOT gv_adrnr IS INITIAL.

      SELECT SINGLE addrnumber name1 name4 street FROM adrc

      INTO (gv_addrnumber , gv_name1 , gv_name4 , gv_street )

      WHERE addrnumber = gv_adrnr.

      ENDIF.

      CONCATENATE s_budat-low 'to' s_budat-high INTO gv_budat.

      *--Line Item

      SELECT a~bukrs a~belnr a~gjahr a~buzei a~witht a~wt_withcd a~wt_qbshh a~qsatz a~wt_qsshh

      b~lifnr b~budat b~dmbtr b~bldat b~zuonr b~hkont

      INTO CORRESPONDING FIELDS OF TABLE gt_tax

      FROM with_item AS a

      INNER JOIN bsik AS b ON a~belnr = b~belnr.

      * WHERE a~bukrs = p_bukrs AND

      * a~witht = 'SD' AND

      * a~wt_withcd = '01' AND

      * a~gjahr = p_gjahr AND

      * b~budat IN s_budat AND

      * b~hkont IN s_ctare.

      SORT gt_tax BY belnr buzei.

      IF NOT gt_tax IS INITIAL.

      SELECT lifnr name1 stcd1 stras FROM lfa1 INTO CORRESPONDING FIELDS OF TABLEgt_lfa1

      FOR ALL ENTRIES IN gt_tax

      WHERE lifnr = gt_tax-lifnr.

      ENDIF.

      LOOP AT gt_tax INTO gs_tax.

      READ TABLE gt_lfa1 INTO gs_lfa1 WITH KEY lifnr = gs_tax-lifnr .

      IF sy-subrc = 0.

      gs_getdatafinal-name1 = gs_lfa1-name1.

      IF gs_tax-witht = 'PJ' AND gs_tax-wt_withcd = 'PC'.

      gs_getdatafinal-reten = 'Servicos'.

      gv_count = gv_count + 1.

      ELSEIF gs_tax-witht = 'PJ' AND gs_tax-wt_withcd = 'OB'.

      gs_getdatafinal-reten = 'Obras'.

      gv_count = gv_count + 1.

      ENDIF.

      gs_getdatafinal-dmbtr = gs_tax-dmbtr.

      gs_getdatafinal-wt_qbshh = gs_tax-wt_qbshh.

      APPEND gs_getdatafinal TO gt_getdatafinal.

      CLEAR:gs_getdatafinal.

      ENDIF.

      ENDLOOP.

      * gv_name2 = gv_name1.

      ENDFORM. " DATARETRIVAL

      *&---------------------------------------------------------------------*

      *& Form FIELDCATALOGUE

      *&---------------------------------------------------------------------*

      * text

      *----------------------------------------------------------------------*

      * --> p1 text

      * <-- p2 text

      *----------------------------------------------------------------------*

      FORM fieldcatalogue .

      DATA : lv_count TYPE i,

      ls_fieldcat TYPE slis_fieldcat_alv.

      CLEAR gt_fieldcat.

      ADD 1 TO lv_count.

      ls_fieldcat-col_pos = lv_count.

      ls_fieldcat-fieldname = 'NAME1'.

      ls_fieldcat-tabname = 'GT_GETDATAFINAL'.

      ls_fieldcat-seltext_m = 'Vendor Name'.

      ls_fieldcat-hotspot = 'X'.

      ls_fieldcat-outputlen = 12.

      APPEND ls_fieldcat TO gt_fieldcat.

      CLEAR ls_fieldcat.

      ADD 1 TO lv_count.

      ls_fieldcat-col_pos = lv_count .

      ls_fieldcat-fieldname = 'RETEN_COUNT'.

      ls_fieldcat-tabname = 'GT_GETDATAFINAL'.

      ls_fieldcat-seltext_m = 'Number of Retention'.

      ls_fieldcat-hotspot = 'X'.

      ls_fieldcat-outputlen = 12.

      APPEND ls_fieldcat TO gt_fieldcat.

      CLEAR ls_fieldcat.

      ADD 1 TO lv_count.

      ls_fieldcat-col_pos = lv_count .

      ls_fieldcat-fieldname = 'RETEN'.

      ls_fieldcat-tabname = 'GT_GETDATAFINAL'.

      ls_fieldcat-seltext_m = 'Concept of Retention'.

      ls_fieldcat-hotspot = 'X'.

      ls_fieldcat-outputlen = 14.

      APPEND ls_fieldcat TO gt_fieldcat.

      CLEAR ls_fieldcat.

      ADD 1 TO lv_count.

      ls_fieldcat-col_pos = lv_count .

      ls_fieldcat-fieldname = 'DMBTR'.

      ls_fieldcat-tabname = 'GT_GETDATAFINAL'.

      ls_fieldcat-seltext_m = 'Full Amount'.

      ls_fieldcat-hotspot = 'X'.

      ls_fieldcat-outputlen = 14.

      APPEND ls_fieldcat TO gt_fieldcat.

      CLEAR ls_fieldcat.

      ADD 1 TO lv_count.

      ls_fieldcat-col_pos = lv_count .

      ls_fieldcat-fieldname = 'WT_QBSHH'.

      ls_fieldcat-tabname = 'GT_GETDATAFINAL'.

      ls_fieldcat-seltext_m = 'Withholding Tax Amount'.

      ls_fieldcat-hotspot = 'X'.

      ls_fieldcat-outputlen = 14.

      APPEND ls_fieldcat TO gt_fieldcat.

      CLEAR ls_fieldcat.

      ENDFORM. " FIELDCATALOGUE

      *&---------------------------------------------------------------------*

      *& Form DISPLAY

      *&---------------------------------------------------------------------*

      * text

      *----------------------------------------------------------------------*

      * --> p1 text

      * <-- p2 text

      *----------------------------------------------------------------------*

      FORM display .

      * DATA ls_layout TYPE slis_layout_alv.

      gs_layout-colwidth_optimize = 'X'.

      * ls_layout-info_fieldname = 'ROWCOLOR'.

      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 = ' '

      i_callback_user_command = 'USER_COMMAND '

      * i_callback_top_of_page = 'TOP_OF_PAGE'

      i_callback_html_top_of_page = '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 =

      * IT_FILTER =

      * IS_SEL_HIDE =

      i_default = 'X'

      i_save = 'A'

      is_variant = gs_alvvariant

      * IT_EVENTS = gt_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 = gt_getdatafinal

      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.

      * ELSEIF p_check IS NOT INITIAL AND p_dwd IS NOT INITIAL.

      * DATA: lv_spool LIKE tsp01-rqident.

      *

      *DATA: lt_pdf TYPE TABLE OF tline.

      *DATA: ls_pdf LIKE LINE OF lt_pdf.

      *

      *DATA: lv_url TYPE char255.

      *DATA: lv_buffer TYPE string.

      *DATA: lv_content TYPE xstring.

      *

      *DATA: lt_data TYPE STANDARD TABLE OF x255.

      *

      *data: lo_dialog_container type ref to cl_gui_dialogbox_container.

      *data: lo_docking_container type ref to cl_gui_docking_container.

      *data: lo_html TYPE REF TO cl_gui_html_viewer.

      ** Run the report program, in this program you need to export the

      ** spool id to memory.

      * SUBMIT ZVEFINFIR629 TO SAP-SPOOL

      * WITHOUT SPOOL DYNPRO

      * DESTINATION space

      * COVER TEXT ' Your Report Title'

      * NEW LIST IDENTIFICATION 'X'

      * IMMEDIATELY space

      * AND RETURN.

      *

      ** import spool number from memory

      * IMPORT lv_spool = lv_spool FROM MEMORY ID 'ZRICH_0002_SPONO'.

      g_spool = sy-spono.

      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'

      EXPORTING

      src_spoolid = g_spool

      TABLES

      pdf = pdf.

      IF sy-subrc <> 0.

      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

      ELSE.

      CALL FUNCTION 'GUI_DOWNLOAD'

      EXPORTING

      filename = p_dwd

      filetype = 'BIN'

      TABLES

      data_tab = pdf.

      ENDIF.

      * ENDIF.

      ENDFORM. " DISPLAY

      *&---------------------------------------------------------------------*

      *& Form user_command

      *&---------------------------------------------------------------------*

      * text

      *----------------------------------------------------------------------*

      * -->UCOMM text

      * -->SELFIELD text

      *----------------------------------------------------------------------*

      FORM user_command USING ucomm LIKE sy-ucomm

      selfield TYPE slis_selfield.

      CASE ucomm.

      WHEN '&IC1'.

      CLEAR : ucomm.

      IF selfield-fieldname = 'NAME1'.

      READ TABLE gt_getdatafinal INTO gs_getdatafinal INDEX selfield-tabindex.

      SET PARAMETER ID 'BLN' FIELD gs_getdatafinal-name1.

      CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.

      ENDIF.

      * IF selfield-fieldname = 'MATNR'.

      * READ TABLE gt_getdatafinal INTO gs_getdatafinal INDEX selfield-tabindex.

      * SET PARAMETER ID 'MAT' FIELD gs_getdatafinal-matnr.

      * CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.

      * ENDIF.

      ENDCASE.

      ENDFORM. "_user_command

      *&---------------------------------------------------------------------*

      *& Form EVENTS

      *&---------------------------------------------------------------------*

      * text

      *----------------------------------------------------------------------*

      * --> p1 text

      * <-- p2 text

      *----------------------------------------------------------------------*

      FORM events .

      DATA: ls_event TYPE slis_alv_event.

      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

      EXPORTING

      i_list_type = 0

      IMPORTING

      et_events = gt_events[]

      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.

      READ TABLE gt_events WITH KEY name = slis_ev_top_of_page INTO ls_event.

      IF sy-subrc = 0.

      MOVE 'TOP_OF_PAGE' TO ls_event-form.

      APPEND ls_event TO gt_events.

      ENDIF.

      ENDFORM. " EVENTS

      *&---------------------------------------------------------------------*

      *& Form top_of_page

      *&---------------------------------------------------------------------*

      * text

      *----------------------------------------------------------------------*

      * -->R_TOP text

      *----------------------------------------------------------------------*

      FORM top_of_page USING r_top TYPE REF TO cl_dd_document.

      DATA: s_tab TYPE sdydo_text_table,

      c_area TYPE REF TO cl_dd_area,

      text TYPE sdydo_text_element,

      text1 TYPE sdydo_text_element.

      TYPES: BEGIN OF tab_text,

      text TYPE sdydo_text_element,

      END OF tab_text.

      DATA: i_text TYPE TABLE OF tab_text.

      DATA: w_text TYPE tab_text.

      CALL METHOD r_top->initialize_document.

      CALL METHOD r_top->vertical_split

      EXPORTING

      split_area = r_top

      split_width = '90%'

      IMPORTING

      right_area = c_area.

      *Header1**

      CALL METHOD r_top->add_gap

      EXPORTING

      width = 70.

      text = 'Reporte Impuesto Sobre Actividades Economicas - Municipio San Diego'.

      CALL METHOD r_top->add_text

      EXPORTING

      text = text

      sap_emphasis = 'STRONG'.

      APPEND w_text TO i_text.

      APPEND w_text TO i_text.

      APPEND w_text TO i_text.

      CONCATENATE 'Periodo del Informe' ' ' INTO w_text .

      APPEND w_text TO i_text.

      CONCATENATE gv_budat ' ' INTO w_text .

      APPEND w_text TO i_text.

      s_tab[] = i_text[].

      CALL METHOD c_area->add_text

      EXPORTING

      text_table = s_tab

      fix_lines = 'X'

      sap_fontsize = cl_dd_document=>medium

      sap_emphasis = cl_dd_document=>strong.

      *----------------------------------------*

      * Set Height *

      *----------------------------------------*

      *set height of this section

      DATA: ls_text TYPE sdydo_text_element,

      l_grid TYPE REF TO cl_gui_alv_grid,

      f(14) TYPE c VALUE 'SET_ROW_HEIGHT'.

      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

      IMPORTING

      e_grid = l_grid.

      CALL METHOD l_grid->parent->parent->(f)

      EXPORTING

      id = 3

      height = 20.

      ENDFORM. " EVENTS

  • author's profile photo Former Member
    Former Member
    Posted on Jun 01, 2013 at 05:56 AM

    Hi Dhinesh,

    I fear there is no possible way to split or customize the display size for TOP-OF-PAGE / HEADER of the ALV. It is internally managed by SAP in Standard.

    SAP has considered the maximum height possible.

    Well you can use a screen and display the TOP-OF-PAGE in the screen to the comfort of your height

    and display the ALV below.

    BR

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 01, 2013 at 06:13 AM

    Hi All,

    I think I have found out a solution in the ALV grid call function itself there is a option.I am not sure...I am checking on it whether it is perfect.

    I_HTML_HEIGHT_TOP = -12

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 01, 2013 at 10:14 AM

    HI,

    Please set ID 2 instead of 3 as shown below. and execute report with different-different value of height like 10, 20, 30 ....

    *----------------------------------------*
    * Set Height *
    *----------------------------------------*
    *set height of this section
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    e_grid = l_grid.

    CALL METHOD l_grid->parent->parent->(f)
    EXPORTING
    id = 2
    height = 10.

    Hope this will help you.

    Regards,

    Mordhwaj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 01, 2013 at 12:44 PM

    Hi,

    did you try the parameters

    * i_html_height_top = 0 " i HTML_TOP_OF_PAGE Height

    * i_html_height_end = 0 " i HTML_END_OF_PAGE Height

    ?

    I think, default value 0 causes automatic determination. Try some values, don't know if its lines or pixels.

    Regards,

    Clemens

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.