*&---------------------------------------------------------------------*
*& Report Z_MARKUS001
*&
*&---------------------------------------------------------------------*
*& ALV 1
*&
*&---------------------------------------------------------------------*
REPORT z_markus001. " comment after
*&---------------------------------------------------------------------*
*& This is my first ABAP program
*&---------------------------------------------------------------------*
*& Global Declarations
*&---------------------------------------------------------------------*
CLASS demo DEFINITION.
PUBLIC SECTION.
CLASS-METHODS main.
ENDCLASS. "demo DEFINITION
*----------------------------------------------------------------------*
* CLASS demo IMPLEMENTATIO
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS demo IMPLEMENTATION.
METHOD main.
DATA: help TYPE string,
filetextci_tab TYPE TABLE OF filetextci,
saaconta_tab TYPE TABLE OF saaconta,
alv_table TYPE REF TO cl_salv_table,
alv_ds TYPE REF TO cl_salv_display_settings,
alv_fs TYPE REF TO CL_SALV_FUNCTIONAL_SETTINGS,
alv_event TYPE REF TO CL_SALV_EVENTS_TABLE.
*... Select Data
SELECT * FROM filetextci INTO
CORRESPONDING FIELDS OF TABLE filetextci_tab
ORDER BY fileintern.
*... Create Instance
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = alv_table
CHANGING
t_table = filetextci_tab.
*... Display Table
"alv_table->display( ).
*... Select Data
SELECT * FROM saaconta INTO
CORRESPONDING FIELDS OF TABLE saaconta_tab.
alv_table->set_data( CHANGING t_table = saaconta_tab ).
alv_table->get_display_settings( RECEIVING value = alv_ds ).
alv_ds->set_vertical_lines( EXPORTING value = 'X' ).
alv_ds->set_horizontal_lines( EXPORTING value = ' ' ).
alv_ds->SET_STRIPED_PATTERN( EXPORTING value = 'X' ).
alv_table->GET_FUNCTIONAL_SETTINGS( RECEIVING value = alv_fs ).
alv_fs->SET_SORT_ON_HEADER_CLICK( exporting value = 'X' ).
alv_table->GET_EVENT( RECEIVING value = alv_event ).
"alv_event->BEFORE_SALV_FUNCTION( ).
alv_table->display( ).
"MESSAGE 'Done.' TYPE 'I'.
ENDMETHOD. "demo
ENDCLASS. "demo IMPLEMENTATION
*&---------------------------------------------------------------------*
*& Implementations
*&---------------------------------------------------------------------*
START-OF-SELECTION.
demo=>main( ).