Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Whats the purpose of ?=

I was debugging ME21N and I saw the use of ?= to assign a value.

Can anyone explain me how dows it work???

Former Member
Former Member replied


In general it is use in OO. Take a look over the Sap help explanation:

"Variants with the addition ?TO or the assignment operator ?= (casting operator) must be used if the source and destination are reference variables and the static type of source is more general than the static type of destination (down cast). For assignments between operands that are not reference variables, use of the question mark ? is not permitted."

"Data object that contains a reference. Reference variables are differentiated by data reference variables and object reference variables. Reference variables have a length of 8 bytes and are opak, which means the reference cannot be accessed directly. These are typed with the addition REF TO that defines their static type. The static type is always more general or the same as the dynamic type. "



0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question