‎2008 Nov 26 5:32 AM
Hi All,
Could you please explain me the meaning of the following statement .I know the basic oops concepts but still i am confusing .
l_current_controller ?= wd_this->wd_get_api( ).
Thanks in advance.
Regards,
kumar.
‎2008 Nov 26 5:36 AM
Hi,
The method WD_GET_API which is contained in all generic controller interfaces allows the access to the corresponding runtime API.
Please check
http://help.sap.com/SAPHELP_NW04S/helpdata/EN/35/447741b0d6157de10000000a155106/content.htm
Edited by: Neenu Jose on Nov 26, 2008 6:39 AM
‎2008 Nov 26 5:36 AM
Hi,
The method WD_GET_API which is contained in all generic controller interfaces allows the access to the corresponding runtime API.
Please check
http://help.sap.com/SAPHELP_NW04S/helpdata/EN/35/447741b0d6157de10000000a155106/content.htm
Edited by: Neenu Jose on Nov 26, 2008 6:39 AM
‎2008 Nov 26 5:46 AM
l_current_controller ?= wd_this->wd_get_api( )
It means
Is l_current_controller equal to the value returned by the method wd_get_api of class or object wd_this
‎2008 Nov 26 5:51 AM
thanks amit. What exactly the operator ' ?= ' means .
cheers,
kumar.
‎2008 Nov 26 5:51 AM
?=
It checks weather the condition is true or false, just as in C++
‎2008 Nov 26 6:26 AM
amit please go through the following code .
Here it differs as per your clarification .
now i want to know what exactly the operator ?= doing here.
DATA: descriptor TYPE REF TO cl_abap_structdescr.
descriptor ?= cl_abap_structdescr=>describe_by_name( tablename ).
here after the above statement ' descriptor ' getting some values .
so let me know , is ?= assignment operator or conditional operator ?
cheers,
kumar.
Edited by: kumar on Nov 26, 2008 8:17 AM
‎2008 Nov 26 7:25 AM
Hi Kumar,
This is called WIDENING CASTING.
there is a much theory, so please go through the reliable documentaion.
Regards
ramchander Rao.K
‎2008 Nov 26 7:56 AM
hi,
DATA: descriptor TYPE REF TO cl_abap_structdescr.
descriptor ?= cl_abap_structdescr=>describe_by_name( tablename ).
?= is a "Widening Cast"
cl_abap_structdescr is a class which is a "Narrow Cast"
describe_by_name is a "Class Method"
tablename is a "Attribute of the Class method"
"descriptor ?=" means assigning the class method "describe_by_name" of the class "cl_abap_structdescr" i.e making the class "descriptor"
to point to the method "describe_by_name".