Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

oops concepts

Former Member
0 Likes
785

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
760

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

7 REPLIES 7
Read only

Former Member
0 Likes
761

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

Read only

Former Member
0 Likes
760

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

Read only

0 Likes
760

thanks amit. What exactly the operator ' ?= ' means .

cheers,

kumar.

Read only

Former Member
0 Likes
760

?=

It checks weather the condition is true or false, just as in C++

Read only

0 Likes
760

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

Read only

Former Member
0 Likes
760

Hi Kumar,

This is called WIDENING CASTING.

there is a much theory, so please go through the reliable documentaion.

Regards

ramchander Rao.K

Read only

Former Member
0 Likes
760

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".