You are on page 1of 2

*&---------------------------------------------------------------------*

*& Report ZTEST56


*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZTEST56.
tables : ekpo.
selection-screen begin of block a with frame title text-001.
PARAMETERS : s_ebeln TYPE ebeln obligatory.
selection-screen end of block a.
class demo definition.
public section.
class-methods main.
private section.
data : gt_ekpo type ZAPPEND_TT,
FM_NAME TYPE RS38L_FNAM.
methods : get_data,
display_data.
endclass.
class demo implementation.
method main.
data obj type ref to demo.
create object obj.
obj->get_data( ).
obj->display_data( ).
endmethod.
method get_data.
select ebeln ebelp TXZ01 from ekpo into CORRESPONDING FIELDS OF TABLE gt_ekpo
where ebeln = s_ebeln.
if sy-subrc <> 0.
message ' No data available' type 'E'.
endif.
endmethod.
method display_data .
field-symbols <fs_ekpo> type zappend.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZTEST_SF1'
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
CALL FUNCTION fm_name
TABLES
GT_EKPO = gt_ekpo
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
endmethod.
endclass.
start-of-selection.
demo=>main( ).

You might also like