Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV Grid

Former Member
0 Likes
416

Hi,

Iam displaying the output in ALV grid and my layout is of type LVC_S_LAYO which contains field GRID_TITLE of length 70,

how can i display the grid tile which is more than 70 chars.

Regards,

Reddy

Hi,

Iam displaying the output in ALV grid and my layout is of type LVC_S_LAYO which contains field GRID_TITLE of length 70,

how can i display the grid tile which is more than 70 chars.

Regards,

Reddy

2 REPLIES 2
Read only

Former Member
0 Likes
394

Hi,

That is the maximum length for the Description of the title .... u cant have a title more than the 70 char...

so try to have within the 70 char...

Thanks,

Manjunath MS

Read only

Former Member
0 Likes
394
hi Reddy,

if you want to write in top of page , then try this

REPORT  alv_top_of_page.

TABLES : t001.
TYPE-POOLS: slis.

DATA : w_repid LIKE sy-repid.
TYPES : BEGIN OF ty_comp.
        INCLUDE STRUCTURE t001.
TYPES : END OF ty_comp.

DATA: wa_layout  TYPE slis_layout_alv.

DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
      wa_fieldcat TYPE slis_fieldcat_alv.

DATA : it_comp TYPE TABLE OF ty_comp.

INITIALIZATION.
  w_repid = sy-repid.

START-OF-SELECTION.

  SELECT * FROM t001 INTO TABLE it_comp.

END-OF-SELECTION.

  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_program_name         = w_repid
      i_internal_tabname     = 'IT_COMP'
      i_inclname             = w_repid
    CHANGING
      ct_fieldcat            = it_fieldcat[]
    EXCEPTIONS
      inconsistent_interface = 1
      program_error          = 2
      OTHERS                 = 3.


  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program          = w_repid
      i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
      is_layout                   = wa_layout
      i_structure_name       = 'T001'
    TABLES
      t_outtab                    = it_comp
    EXCEPTIONS
      program_error               = 1
      OTHERS                      = 2.


*&---------------------------------------------------------------------*
*&      Form  html_top_of_page
*&---------------------------------------------------------------------*

FORM html_top_of_page USING document TYPE REF TO cl_dd_document.

  DATA: text TYPE sdydo_text_element.

  CALL METHOD document->add_gap
    EXPORTING
      width = 100.
  text =  'Company Code Data'.
  CALL METHOD document->add_text
    EXPORTING
      text      = text
      sap_style = 'HEADING'.

  CALL METHOD document->new_line.
  CALL METHOD document->new_line.
  CALL METHOD document->new_line.

  text = 'User Name : '.
  CALL METHOD document->add_text
    EXPORTING
      text         = text
      sap_emphasis = 'Strong'.

  CALL METHOD document->add_gap
    EXPORTING
      width = 6.

  text = sy-uname.
  CALL METHOD document->add_text
    EXPORTING
      text      = text
      sap_style = 'Key'.

  CALL METHOD document->add_gap
    EXPORTING
      width = 50.


  text = 'Date : '.
  CALL METHOD document->add_text
    EXPORTING
      text         = text
      sap_emphasis = 'Strong'.

  CALL METHOD document->add_gap
    EXPORTING
      width = 6.

  text = sy-datum.
  CALL METHOD document->add_text
    EXPORTING
      text      = text
      sap_style = 'Key'.

  CALL METHOD document->add_gap
    EXPORTING
      width = 50.

  text = 'Time : '.
  CALL METHOD document->add_text
    EXPORTING
      text         = text
      sap_emphasis = 'Strong'.

  CALL METHOD document->add_gap
    EXPORTING
      width = 6.

  text = sy-uzeit.
  CALL METHOD document->add_text
    EXPORTING
      text      = text
      sap_style = 'Key'.

  CALL METHOD document->new_line.
  CALL METHOD document->new_line.

ENDFORM.                    "HTML_TOP_OF_PAGE