SAP Managed Tags: ABAP Development Hello, We all know there is casting in Java, i.e., we can convert a certain data type to something that has a certain inheritance relationship with it. Is there such conversio
SAP Managed Tags: ABAP Development Hii! In Widening cast we assign a refernce variable or runtme object of a superclass to that of subclass. But before doing this, we do narrow casting. In narrow casting you assign the reference variable of subclass to that of superclass. Now during wide...
Casting refers to the process of handling a data object by assuming a certain data type. This definition is different to the meaning of the concept in other programming languages, such as Java. Here, casting means a different concept which is referred to as 'conversion' in ABAP. Casting in...
Provided the field symbol is either fully typed or has one of the generic built-in ABAP types – C, N, P, or X – you can use the following statement:ASSIGN ... TO <FS> CASTING.When the system accesses the field symbol, the content of the assigned data object is interpreted as if...
SAP Managed Tags: ABAP Development Hi, In Narrowing Cast the variables that are defined as "reference to super class" can also point to subclass references at program runtime. It is used to execute generic methods of the classes that exist in the same inheritance tree. In Widening Cast the...
SAP Managed Tags: ABAP Development Hi, I get the ASSIGN_CASTING_ILLEGAL_CAST dump when i execute the statement ASSIGN i_data TO <FS> CASTING. The statement works fine with the same data in UNICODE enabled system. But it dumps in the unicode disabled system. What could be the problem here...
SAP Managed Tags: ABAP Development Hi, The method you are using is possible only when the data objects are in same session memory i.e ( as you said you have to write the code in the BADI ) the badi and the zprogram needs to be in the same program flow else it will not work. ...
When the statement is executed, name is not evaluated until runtime (in both cases). The assigned memory area is cast to the specified type. The data type specified after TYPE cannot be generic. The exceptions to this rule are the predefined ABAP types c, n, p and x. However, table ...
cl_abap_typedescr=>describe_by_name( 'SYST' ) )->get_components( ) ). Example The factory method of the following class returns a reference variable of the type of the class itself. To use interface variables to access the components declared in the interfaceif, as recommended, the variab...
SAP Managed Tags: ABAP Development Hi, I'm using FM 'F4IF_INT_TABLE_VALUE_REQUEST' to get f4 help on selection screen. When i do a select query,and assign the value to the VALUE_TAB parameter in the FM there is a short dump ASSIGN_CASTING_ILLEGAL_CAST (Exception CX_SY_ASSIGN_CAST...