-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.abap
32 lines (31 loc) · 1.34 KB
/
test.abap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
REPORT ysdnblog_class_static.
PARAMETERS : p_rows TYPE count DEFAULT ‘100’.
*———————————————————————-*
* CLASS lcl_main DEFINITION
*———————————————————————-*
*
*———————————————————————-*
CLASS lcl_main DEFINITION.
PUBLIC SECTION.
CLASS-METHODS : get_data ,
display.
PRIVATE SECTION.
CLASS-DATA it_mara TYPE mara_tt.
ENDCLASS. “lcl_main DEFINITION
*———————————————————————-*
* CLASS lcl_main IMPLEMENTATION
*———————————————————————-*
*
*———————————————————————-*
CLASS lcl_main IMPLEMENTATION.
METHOD get_data.
SELECT * FROM mara INTO TABLE lcl_main=>it_mara UP TO p_rows ROWS .
ENDMETHOD. “GET_DATA
METHOD display.
DATA : lr_table TYPE REF TO cl_salv_table.
cl_salv_table=>factory( IMPORTING r_salv_table = lr_table
CHANGING t_table = lcl_main=>it_mara ) .
lr_table->display( ).
ENDMETHOD. “display
ENDCLASS. “lcl_main IMPLEMENTATION
START-OF-SELECTION.