Skip to content

Instantly share code, notes, and snippets.

@furlan

furlan/ZP_HELLO_OO_2

Created Jan 29, 2012
Embed
What would you like to do?
ZP_HELLO_OO_2
*&---------------------------------------------------------------------*
*& Report ZP_HELLO_OO_2
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zp_hello_oo_2 NO STANDARD PAGE HEADING.
*----------------------------------------------------------------------*
* CLASS lcl_hello DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_hello DEFINITION.
PUBLIC SECTION.
METHODS: display_message
IMPORTING
i_name TYPE char30.
ENDCLASS. "lcl_hello DEFINITION
*----------------------------------------------------------------------*
* CLASS lcl_hello IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_hello IMPLEMENTATION.
METHOD display_message.
WRITE: / 'Hello: ', i_name.
ENDMETHOD. "display_message
ENDCLASS. "lcl_hello IMPLEMENTATION
DATA: r_hello TYPE REF TO lcl_hello.
PARAMETERS: p_name TYPE char30 DEFAULT 'World OO!!'.
START-OF-SELECTION.
CREATE OBJECT r_hello.
r_hello->display_message( p_name ).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment