Wednesday, December 22, 2010
Use function module REUSE_ALV_GRID_DISPLAY_LVC to get Bold letters to on ALV output.

REPORT  ztest.
TYPE-POOLS: abap.
TYPES : BEGIN OF ty_outtab,
        celltab TYPE lvc_t_styl.
        INCLUDE STRUCTURE t100.
TYPES   END   OF ty_outtab.

DATA :
      gt_outtab  TYPE TABLE OF ty_outtab WITH HEADER LINE,
      wa_outtab  type ty_outtab,
      gs_layout  TYPE lvc_s_layo,
      ls_celltab TYPE lvc_s_styl,
      lt_celltab TYPE lvc_t_styl.

START-OF-SELECTION.
  SELECT *
    FROM t100
    INTO CORRESPONDING FIELDS OF TABLE gt_outtab
    UP TO 20 ROWS.

  ls_celltab-style = '00000121'.
  INSERT ls_celltab INTO lt_celltab INDEX 1.

  READ TABLE gt_outtab INDEX 1.
  gt_outtab-celltab = lt_celltab.
  INSERT gt_outtab INDEX 1.

  gs_layout-stylefname = 'CELLTAB'.

  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
      i_structure_name = 'T100'
      is_layout_lvc    = gs_layout
    TABLES
      t_outtab         = gt_outtab
    EXCEPTIONS
      program_error    = 1
      OTHERS           = 2.
  • Output

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.