Application Development 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: 

how to provide top of page in ALV reports

Former Member
0 Kudos

Hi....

here is requirement.

i entered some 1000 to 2000 in the selection screen.

now i want to display the same in output list.

that is the <b></b>output from 1000 to 2000 are displayed with 1000 records<b></b>

like this i want to display in top of list in alv report.

how to do this requirement.

thanks and regards,

k.swaminath reddy.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
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
3 REPLIES 3

Former Member
0 Kudos

hi,

U can use the FM

REUSE_ALV_COMMENTARY_WRITE.

Former Member
0 Kudos
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

Former Member
0 Kudos

hi,

check this one

&----


*& Report ZALV_FIELD_GRID1

*&

&----


*&

*&

&----


REPORT ZALV_FIELD_GRID1

NO STANDARD PAGE HEADING.

TABLES MARA.

type-pools :slis.

TYPES : BEGIN OF TMARA ,

MATNR LIKE MARA-MATNR,

MEINS LIKE MARA-MEINS,

ERSDA LIKE MARA-ERSDA,

color(4) type c,

SEL type c,

LIGHT TYPE C,

END OF TMARA.

TYPES: BEGIN OF TMAKT,

MATNR LIKE MAKT-MATNR,

MAKTX LIKE MAKT-MAKTX,

MAKTG LIKE MAKT-MAKTG,

SEL TYPE C,

COLOR(4),

END OF TMAKT.

DATA: ITAB TYPE TMARA OCCURS 0 WITH HEADER LINE,

ITAB1 TYPE TMAKT OCCURS 0 WITH HEADER LINE,

wa_fieldcat type slis_fieldcat_alv,

fieldcat type slis_fieldcat_alv occurs 0,

i_layout type slis_layout_alv,

WA_LISTHEADER TYPE SLIS_LISTHEADER ,

i_LISTHEADER TYPE SLIS_LISTHEADER OCCURS 0,

V_EVENTS TYPE SLIS_T_EVENT ,

WA_EVENT TYPE SLIS_ALV_EVENT,

I_TITLE_MARA TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED',

I_TITLE_MAKT TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED',

SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE,

PRINT_CONT type slis_print_alv.

*----


  • SELECTION SCREE

*----


selection-screen begin of block screen1 with frame title TEXT-001.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN COMMENT /32(35) COMM1.

SELECTION-SCREEN ULINE /27(35).

SELECTION-SCREEN SKIP.

SELECT-OPTIONS MATNR FOR MARA-MATNR.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN ULINE.

SELECTION-SCREEN COMMENT /30(50) COMM2.

SELECTION-SCREEN ULINE /27(40).

SELECTION-SCREEN SKIP.

SELECT-OPTIONS ERSDA FOR MARA-ERSDA.

SELECTION-SCREEN SKIP.

selection-screen end of block screen1.

*----


  • INITIALIZATION

*----


INITIALIZATION.

MATNR-low = '23'.

MATNR-high = '1000'.

MATNR-option = 'BT'.

MATNR-sign = 'I'.

APPEND MATNR.

ERSDA-low = '20030124'.

ERSDA-high = '20050302' .

APPEND ERSDA.

PERFORM FILLFIELD.

PERFORM FILLLAYOUT.

PERFORM build_print_params.

PERFORM FILL_SORT.

PERFORM EVENT_CALL.

PERFORM POPULATE_EVENT.

*----


  • SELECTION-SCREEN OUTPUT

*----


AT SELECTION-SCREEN OUTPUT.

comm1 ='SELECT MATERIAL NUMBER RANGE'.

comm2 ='SELECT MATERIAL CREATION DATE'.

*----


  • START-OF-SELECTION

*----


START-OF-SELECTION.

PERFORM READDATA.

PERFORM POPDATA.

&----


*& Form READDATA

&----


  • text

----


FORM READDATA .

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = MATNR-LOW

IMPORTING

OUTPUT = MATNR-LOW.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = MATNR-HIGH

IMPORTING

OUTPUT = MATNR-HIGH.

SELECT MATNR

ERSDA

MEINS

FROM MARA

INTO CORRESPONDING FIELDS OF

TABLE ITAB

WHERE MATNR IN MATNR AND ERSDA IN ERSDA.

LOOP AT ITAB.

data id_color type i VALUE 1.

data id_colors(2) type c.

IF ITAB-MATNR < '000000000000000100'.

ITAB-LIGHT = '1'.

ELSEIF ITAB-MATNR < '000000000000000150' AND ITAB-MATNR >

'000000000000000100' .

ITAB-LIGHT = '2'.

ELSE.

ITAB-LIGHT = '3'.

ENDIF.

id_color = id_color + 1.

if id_color > 7.

id_color = 1.

endif.

id_colors = id_color.

concatenate 'C' id_colors '10' into itab-color.

modify itab.

CLEAR ITAB.

endloop.

ENDFORM. " READDATA

----


  • Form FILLFIELD

----


FORM FILLFIELD .

WA_FIELDCAT-FIELDNAME = 'MATNR'.

WA_FIELDCAT-KEY = 'X'.

WA_FIELDCAT-COL_POS = '1'.

WA_FIELDCAT-outputlen = 20.

WA_FIELDCAT-HOTSPOT = 'X'.

wa_fieldcat-seltext_m = 'MATERIAL NUMBER'.

*WA_FIELDCAT-EMPHASIZE = 'C210'.

APPEND WA_FIELDCAT TO FIELDCAT.

clear wa_fieldcat.

WA_FIELDCAT-FIELDNAME = 'MEINS'.

WA_FIELDCAT-COL_POS = '2'.

*WA_FIELDCAT-EMPHASIZE = 'C510'.

WA_FIELDCAT-outputlen = 10.

wa_fieldcat-seltext_m = 'UNIT'.

APPEND WA_FIELDCAT TO FIELDCAT.

clear wa_fieldcat.

WA_FIELDCAT-FIELDNAME = 'ERSDA'.

WA_FIELDCAT-COL_POS = '3'.

WA_FIELDCAT-outputlen = 15.

*WA_FIELDCAT-EDIT_MASK = 'DD.MM.YYYY'.

*WA_FIELDCAT-EMPHASIZE = 'C710'.

wa_fieldcat-seltext_m = 'CREAT DATE'.

APPEND WA_FIELDCAT TO FIELDCAT.

clear wa_fieldcat.

ENDFORM. "FILLFIELD

&----


  • Setup print parameters

----


form build_print_params.

PRINT_CONT-reserve_lines = '3'. "Lines reserved for footer

PRINT_CONT-no_coverpage = 'X'.

endform. " BUILD_PRINT_PARAMS

----


  • Form POPDATA

----


FORM POPDATA .

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = sy-repid

  • I_CALLBACK_PF_STATUS_SET = ' '

I_CALLBACK_USER_COMMAND = 'USER-COMMAND'

I_CALLBACK_TOP_OF_PAGE = 'TOPPAGE'

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

I_GRID_TITLE = I_TITLE_MARA

  • I_GRID_SETTINGS =

IS_LAYOUT = I_LAYOUT

IT_FIELDCAT = fieldcat

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

IT_SORT = SORT[]

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

IT_EVENTS = V_EVENTS

  • IT_EVENT_EXIT =

IS_PRINT = PRINT_CONT

TABLES

T_OUTTAB = ITAB

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2

.

ENDFORM. " POPDATA

----


  • Form TOPPAGE

----


FORM TOPPAGE.

REFRESH I_LISTHEADER.

DATA: ld_lines type i,

ld_linesc(10) type c,

I_DATE(10) TYPE C,

I_INFO LIKE WA_LISTHEADER-INFO.

WA_LISTHEADER-TYP = 'H'.

WA_LISTHEADER-INFO = 'MATERIAL DETAIL'.

APPEND WA_LISTHEADER TO I_LISTHEADER.

CLEAR WA_LISTHEADER.

WA_LISTHEADER-TYP = 'S'.

WA_LISTHEADER-KEY = 'DATE :'.

CONCATENATE SY-DATUM+6(2) '.'

SY-DATUM+4(2) '.'

SY-DATUM(4) INTO I_DATE.

WA_LISTHEADER-INFO = I_datE.

APPEND WA_LISTHEADER TO I_LISTHEADER.

CLEAR WA_LISTHEADER.

describe table ITAB lines ld_lines.

ld_linesc = ld_lines.

concatenate 'TOTAL NUMBER OF RECORD SELECTED: ' ld_linesc

into I_INFO separated by space.

WA_LISTHEADER-TYP = 'A'.

WA_LISTHEADER-INFO = I_INFO.

append WA_LISTHEADER to I_LISTHEADER.

clear: WA_LISTHEADER , I_INFO.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = I_LISTHEADER

I_LOGO = 'ENJOYSAP_LOGO'.

ENDFORM. "TOPPAGE

----


  • Form FILLLAYOUT

----


FORM FILLLAYOUT .

i_layout-zebra = 'X'.

i_layout-info_fieldname = 'COLOR'.

i_layout-box_fieldname = 'SEL'.

I_LAYOUT-lights_fieldname = 'LIGHT'.

I_LAYOUT-EDIT ='X'.

I_LAYOUT-colwidth_optimize = 'X'.

I_LAYOUT-window_titlebar = 'EXAMPLE FOR ALV GRID'.

I_LAYOUT-no_totalline = 'X'.

ENDFORM. "FILLLAYOUT

----


  • Form FILL_SORT

----


FORM FILL_SORT .

SORT-DOWN = 'X'.

SORT-SPOS = 1.

SORT-FIELDNAME = 'MATNR'.

SORT-tabname = 'MARA'.

APPEND SORT.

ENDFORM. " FILL_SORT

----


  • Form EVENT_CALL

----


FORM EVENT_CALL .

DATA: I_EVENT LIKE V_EVENTS.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

I_LIST_TYPE = 0

IMPORTING

ET_EVENTS = V_EVENTS.

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. " EVENT_CALL

----


  • Form POPULATE_EVENT

----


FORM POPULATE_EVENT .

READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.

IF SY-SUBRC EQ 0.

WA_EVENT-FORM = 'USER_COMMAND'.

MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =

WA_EVENT-NAME.

READ TABLE V_EVENTS WITH KEY NAME = SLIS_EV_END_OF_PAGE

INTO WA_EVENT.

IF SY-SUBRC = 0.

move 'END_OF_PAGE' to WA_EVENT-FORM.

MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =

WA_EVENT-NAME.

endif.

ENDIF.

ENDFORM. "POPULATE_EVENT

*----


FORM END_OF_PAGE.

write: sy-uline(50).

skip.

write:/40 'Page:', sy-pagno .

ENDFORM.

&----


*& Form USER_COMMAND

----


FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM

RS_SELFIELD TYPE SLIS_SELFIELD.

CASE R_UCOMM.

WHEN '&IC1'.

CASE RS_SELFIELD-FIELDNAME.

when 'MATNR'.

read table itab with key matnr = RS_SELFIELD-VALUE.

if sy-subrc = 0.

PERFORM DATA_RETRIEVAL_MAKT USING RS_SELFIELD-VALUE.

PERFORM BUILD_FIELDCATLOG_MAKT.

PERFORM FILLLAYOUT_MAKT.

PERFORM DISPLAY_ALV_MAKT.

CLEAR RS_SELFIELD.

ENDIF.

ENDCASE.

ENDCASE.

ENDFORM. "user_command

----


  • Form DATA_RETRIEVAL_MAKT

----


FORM DATA_RETRIEVAL_MAKT USING TMATNR .

SELECT MATNR

MAKTX

MAKTG

UP TO 100 ROWS

FROM MAKT

INTO TABLE ITAB1

WHERE SPRAS = 'EN' AND MATNR = TMATNR.

LOOP AT ITAB1.

data id_color type i VALUE 1.

data id_colors(2) type c.

id_color = id_color + 1.

if id_color > 7.

id_color = 1.

endif.

id_colors = id_color.

concatenate 'C' id_colors '10' into itab1-color.

modify itab1.

CLEAR ITAB1.

ENDLOOP.

ENDFORM. "DATA_RETRIEVAL_MAKT

----


  • Form FILLLAYOUT_MAKT

----


FORM FILLLAYOUT_MAKT .

CLEAR I_LAYOUT.

i_layout-zebra = 'X'.

i_layout-info_fieldname = 'COLOR'.

i_layout-box_fieldname = 'SEL'.

I_LAYOUT-EDIT ='X'.

I_LAYOUT-colwidth_optimize = 'X'.

I_LAYOUT-window_titlebar = 'EXAMPLE FOR ALV GRID'.

ENDFORM. " LAYOUT_MAKT

----


  • Form BUILD_FIELDCATLOG_MAKT

----


FORM BUILD_FIELDCATLOG_MAKT .

REFRESH FIELDCAT.

WA_FIELDCAT-FIELDNAME = 'MATNR'.

WA_FIELDCAT-KEY = 'X'.

WA_FIELDCAT-COL_POS = '1'.

*WA_FIELDCAT-EDIT_MASK = 'DD.MM.YYYY'.

WA_FIELDCAT-EMPHASIZE = 'C510'.

wa_fieldcat-seltext_m = 'MATERIAL NUMBER'.

APPEND WA_FIELDCAT TO FIELDCAT.

clear wa_fieldcat.

WA_FIELDCAT-FIELDNAME = 'MAKTX'.

WA_FIELDCAT-COL_POS = '2'.

WA_FIELDCAT-EMPHASIZE = 'C710'.

wa_fieldcat-seltext_m = 'MATERIAL DESCRIPTION'.

APPEND WA_FIELDCAT TO FIELDCAT.

clear wa_fieldcat.

WA_FIELDCAT-FIELDNAME = 'MAKTG'.

WA_FIELDCAT-COL_POS = '3'.

WA_FIELDCAT-EMPHASIZE = 'C210'.

wa_fieldcat-seltext_m = 'MATERIAL DESCRIPTION'.

APPEND WA_FIELDCAT TO FIELDCAT.

clear wa_fieldcat.

ENDFORM. " BUILD_FIELDCATLOG_MAKT

----


  • Form DISPLAY_ALV_MAKT

----


FORM TOP-OF-PAGE.

REFRESH I_LISTHEADER.

DATA: ld_lines type i,

ld_linesc(10) type c,

I_DATE(10) TYPE C,

I_INFO LIKE WA_LISTHEADER-INFO.

WA_LISTHEADER-TYP = 'H'.

WA_LISTHEADER-INFO = 'MATERIAL DESCRIPTION FOR SELECTED NUMBER'.

APPEND WA_LISTHEADER TO I_LISTHEADER.

CLEAR WA_LISTHEADER.

WA_LISTHEADER-TYP = 'S'.

WA_LISTHEADER-KEY = 'DATE :'.

CONCATENATE SY-DATUM+6(2) '.'

SY-DATUM+4(2) '.'

SY-DATUM(4) INTO I_DATE.

WA_LISTHEADER-INFO = I_datE.

APPEND WA_LISTHEADER TO I_LISTHEADER.

CLEAR WA_LISTHEADER.

describe table ITAB1 lines ld_lines.

ld_linesc = ld_lines.

concatenate 'TOTAL NUMBER OF RECORD SELECTED: ' ld_linesc

into I_INFO separated by space.

WA_LISTHEADER-TYP = 'A'.

WA_LISTHEADER-INFO = I_INFO.

append WA_LISTHEADER to I_LISTHEADER.

clear: WA_LISTHEADER , I_INFO.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = I_LISTHEADER

I_LOGO = 'ENJOYSAP_LOGO'.

  • I_END_OF_LIST_GRID =

  • I_ALV_FORM =

ENDFORM. "TOP-OF-PAGE

&----


*& Form DISPLAY_ALV_MAKT

&----


  • text

----


FORM DISPLAY_ALV_MAKT .

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'

I_GRID_TITLE = I_TITLE_MAKT

IS_LAYOUT = I_LAYOUT

IT_FIELDCAT = fieldcat

TABLES

T_OUTTAB = ITAB1

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.

*

ENDFORM. " DISPLAY_ALV_MAKT

<b>rewards point</b>

regards

Ashok kumar