09-02-2008 8:42 PM
Hello experts,
Since I am new to object oriented abap, please tell me how the symbol -> is pronounced in OO ABAP?
how the symbol => is pronounced in OO ABAP?
For example: CALL METHOD l_ref_idoc->parse_segment
What are the other symbols those are used in OO abap?
Thank you,
anand.
09-02-2008 8:54 PM
In pure English, you can call describe this statement:
CALL METHOD l_ref_idoc->parse_segment
" Calling instance method parse_segment of the object instance l_ref_idoc"
CL_ABAP_CHAR_UTILITIES=>NEWLINE
" Using the Static or constant attribute NEWLINE of the class CL_ABAP_CHAR_UTILITIES"
Regards,
Naimesh Patel
09-02-2008 8:54 PM
In pure English, you can call describe this statement:
CALL METHOD l_ref_idoc->parse_segment
" Calling instance method parse_segment of the object instance l_ref_idoc"
CL_ABAP_CHAR_UTILITIES=>NEWLINE
" Using the Static or constant attribute NEWLINE of the class CL_ABAP_CHAR_UTILITIES"
Regards,
Naimesh Patel
09-02-2008 8:58 PM
09-02-2008 9:03 PM
09-04-2008 5:31 AM
Hi,
Instance components exist separately in each instance (object) of the class and are referred using instance component selector using u2018u2019.
Static components can be used without even creating an instance of the class and are referred to using static component selector u2018 =>u2019 .
CLASS c1 DEFINITION.
PUBLIC SECTION.
data : i_num type i value 5.
class-data :
s_num type i value 6 .
ENDCLASS.
CLASS c1 IMPLEMENTATION.
ENDCLASS.
START-OF-SELECTION.
DATA : oref1 TYPE REF TO c1 .
CREATE OBJECT : oref1.
write:/5 oref1->i_num.
write:/5 c1=>s_num .
write:/5 oref1->s_num.
Instance, self-referenced, and static methods can all be called dynamically; the class name for static methods can also be determined dynamically:
u2022 oref->(method)
u2022 me->(method)
u2022 class=>(method)
u2022 (class)=>method
u2022 (class)=>(method)