Created
January 29, 2012 20:57
-
-
Save furlan/1700606 to your computer and use it in GitHub Desktop.
ZP_HELLO_OO_3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*&---------------------------------------------------------------------* | |
*& Report ZP_HELLO_OO_3 | |
*& | |
*&---------------------------------------------------------------------* | |
*& | |
*& | |
*&---------------------------------------------------------------------* | |
REPORT zp_hello_oo_3 NO STANDARD PAGE HEADING. | |
*----------------------------------------------------------------------* | |
* CLASS lcl_hello DEFINITION | |
*----------------------------------------------------------------------* | |
* | |
*----------------------------------------------------------------------* | |
CLASS lcl_hello DEFINITION. | |
PUBLIC SECTION. | |
METHODS: constructor | |
IMPORTING | |
i_name TYPE char30. | |
METHODS: display_message. | |
PRIVATE SECTION. | |
DATA: name TYPE char30. | |
ENDCLASS. "lcl_hello DEFINITION | |
*----------------------------------------------------------------------* | |
* CLASS lcl_hello IMPLEMENTATION | |
*----------------------------------------------------------------------* | |
* | |
*----------------------------------------------------------------------* | |
CLASS lcl_hello IMPLEMENTATION. | |
METHOD constructor. | |
me->name = i_name. | |
ENDMETHOD. "constructor | |
METHOD display_message. | |
WRITE: / 'Hello: ', 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 | |
EXPORTING | |
i_name = p_name. | |
r_hello->display_message( ). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment