SAP Tutorials Blog


 


DATA(conv_res) = CONV decfloat34( 1 / 5 ).


"Comparison with an expression without CONV

"The result is 0, the data type is i.

DATA(res) = 1 / 5.


"Example with internal table types

TYPES inttab_type TYPE TABLE OF i WITH EMPTY KEY.

DATA itab TYPE SORTED TABLE OF i WITH NON-UNIQUE DEFAULT KEY.

FIELD-SYMBOLS <fs> TYPE inttab_type.

itab = VALUE #( ( 1 ) ( 2 ) ( 3 ) ).


"The following assignment is not possible due to incompatible types. 

"The internal table has the same line type, but it has a different 

"table type and key.

"ASSIGN itab TO <fs>.


"Using CONV to convert the internal table to the required table type.

DATA(conv_itab) = CONV inttab_type( itab ).

ASSIGN conv_itab TO <fs>.


Serkan AKKAVAK

Computer Engineer BSc

SAP Department Manager

Contact : serkurumsal@yandex.com