Monday, April 22, 2013

Use of ALV Program

*&---------------------------------------------------------------------*
*& Report  ZBSD_ZAR_520222
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  ZBSD_ZAR_520222.

DATA:
  gs_saplane TYPE saplane,
  gt_saplane TYPE TABLE OF saplane.

SELECT FROM saplane INTO TABLE gt_saplane.

TYPE-POOLS slis.

DATA:
  gt_fieldcat TYPE slis_t_fieldcat_alv,
  gv_title TYPE lvc_title.

gv_title 'SAP Table SAPLANE contents'.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
  i_program_name SY-REPID
  i_structure_name 'saplane'
CHANGING
  ct_fieldcat gt_fieldcat.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
  it_fieldcat gt_fieldcat
  i_grid_title gv_title
TABLES
  t_outtab gt_saplane.

No comments:

Post a Comment