Application Development 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: 

type conversions

shiva_suvarna
Participant
0 Kudos

hi friends

i am a learner of abap please answer my query ,

abap does support explicit type conversions if yes

give me the syntax

2 REPLIES 2

Former Member
0 Kudos

Hi Shiva,

Best way is to take a look at the SAP Help:

http://help.sap.com/saphelp_nw04/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm

Snapshot:

<b>Type Conversions</b>

Every time you assign a data object to a variable, the data types involved must either be compatible , that is, their technical attributes (data type, field length, number of decimal places) must be identical, or the data type of the source field must be convertible into the data type of the target field.

In ABAP, two non-compatible data types can be converted to each other if a corresponding conversion rule exists. If data types are compatible, no conversion rule is necessary.

If you use the MOVE statement to transfer values between non-compatible objects, the value of the source object is always converted into the data type of the target object. With all ABAP operations that perform value assignments between data objects (for example, arithmetic operations or filling internal tables), the system handles all the necessary type conversions as for the MOVE statement. If you try to assign values between two data types for which no conversion rule exists, a syntax error or runtime error occurs.

Regards,

John.

Former Member
0 Kudos

From the ABAP editor, SE38 or SE80, hit the help button (the blue one with an I in the middle), enter ABAP keyword MOVE and hit enter. Scroll down to "Conversion Table for the MOVE Command" and click to get lots of good info.

Good luck getting started.