Aligning Data In ALV GRID Using
Function Modules
ERP SAP Modules ==> ABAP Programming
How to aligning the data in TOP-OF-PAGE in ALV GRID using function modules? By: Raju Here is a sample alv code which aligns the data according to the position specified. REPORT alv_top_of_page. TABLES : t001. TYPE-POOLS: slis. DATA : w_repid LIKE sy-repid. TYPES : BEGIN OF ty_comp.
TYPES : END OF ty_comp. DATA: wa_layout TYPE slis_layout_alv. DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
DATA : it_comp TYPE TABLE OF ty_comp. INITIALIZATION.
START-OF-SELECTION. SELECT * FROM t001 INTO TABLE it_comp. END-OF-SELECTION. CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING
CHANGING
EXCEPTIONS
OTHERS = 3. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING
TABLES
EXCEPTIONS
OTHERS = 2. *&---------------------------------------------------------------------*
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
CALL METHOD document->add_text EXPORTING
CALL METHOD document->new_line. CALL METHOD document->new_line. CALL METHOD document->new_line.
CALL METHOD document->add_text EXPORTING
CALL METHOD document->add_gap EXPORTING
CALL METHOD document->add_text EXPORTING
CALL METHOD document->add_gap EXPORTING
CALL METHOD document->add_text EXPORTING
CALL METHOD document->add_gap EXPORTING
CALL METHOD document->add_text EXPORTING
CALL METHOD document->add_gap EXPORTING
CALL METHOD document->add_text EXPORTING
CALL METHOD document->add_gap EXPORTING
CALL METHOD document->add_text EXPORTING
CALL METHOD document->new_line. CALL METHOD document->new_line. ENDFORM. "HTML_TOP_OF_PAGE
ABAP Books
More ABAP Tips
SAP Basis, ABAP Programming and Other IMG Stuff http://www.erpgreat.com All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|