‎2007 Dec 05 10:04 PM
Hi,
Hello<username>
<date> <time>
"welcome to sap"
I want this as my output in my program and please bring this output form oops program, need as early as possible please.
Thanks,
‎2007 Dec 05 10:12 PM
Here is the code:
WRITE: / 'Hello ', SY-UNAME.
WRITE: / 'Date:', SY-DATUM, SY-UZEIT.
WRITE / 'welcome to sap'.you can write the above code in report or class & method.
If you are writing in method, then call the class & method in your report.
<i>*Reward each useful answer</i>
Raja T
Message was edited by:
Raja Thangamani
‎2007 Dec 06 2:20 AM
Here it is:
CLASS greatings DEFINITION.
PUBLIC SECTION.
METHODS greatings.
PRIVATE SECTION.
METHODS: say_hello,
tell_date,
welcome.
ENDCLASS.
CLASS greatings IMPLEMENTATION.
METHOD greatings.
me->say_hello( ).
me->tell_date( ).
me->welcome( ).
ENDMETHOD.
METHOD say_hello.
WRITE: / 'Hello ', SY-UNAME.
ENDMETHOD.
METHOD tell_date.
WRITE: / 'Date:', SY-DATUM, SY-UZEIT.
ENDMETHOD.
METHOD welcome.
WRITE / 'welcome to sap'.
ENDMETHOD.
ENDCLASS
START-OF-SELECTION.
DATA: classObject TYPE REF TO greatings.
CREATE OBJECT classObject.
classObject->greatings( ).
Hope this helps,
Roby.