Skip to Content
author's profile photo Former Member
Former Member

doubt in OOABAP

Hi All,

I would like to know what exactly the notaion ?= does in OOABAP.

Can any one please explain why we use that..

thanks and regards

raghu

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 15, 2006 at 05:07 AM

    hi raghu,

    We used this symbol to assign the reference of an object to other reference variable.

    eg

    data: parent type ref to cl_bsp_controller2.

    parent ?= m_parent.

    m_parent is another reference variable of type IF_BSP_DISPATCHER

    regards

    Aashish Garg

    Message was edited by: aashish garg

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 15, 2006 at 05:15 AM

    Hi Raghu,

    COMPUTE o2 ?= o1.

    This variant currently works like MOVE o1 ?TO o2.

    Casting between Reference variables (Widening Cast).

    This statement is equivalent to:

    o2 ?= o1.

    The fields o1 and o2 must be reference variables - that is, of type REF TO. Otherwise, the system triggers the exception that can be handled MOVE_CAST_REF_ONLY . You should always perform casting if you are making an assignment between reference variables and there is no static type check during the syntax check. If a static type check does take place, you can use the normal MOVE statement or the assignment operator (=).

    Rgds,

    Prakshsingh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 15, 2006 at 05:18 AM

    Hi Raghu,

    we Use the notation ?= for moving onw variable to other with difft data type...for reference variables.....

    (Widening Cast) Casting between Reference variables

    kindly rewards points

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 15, 2006 at 05:18 AM

    Hi,

    It is assignment operator for widening cast. For which check can not be executed statically.

    e.g. you want to assign a interface ref to class, then it should be checked whether it can be assigned to the particular class.

    Hope it helps.

    Regds,

    Akshay

    Note: Some ponts would be nice if that helps:)

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 15, 2006 at 05:28 AM

    Hi,

    Refer the following link,

    http://help.sap.com/saphelp_47x200/helpdata/EN/c3/225b6254f411d194a60000e8353423/frameset.htm

    and Look for the casting operator "?=".

    Regs,

    Venkat Ramanan

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.