01-13-2005 1:22 PM
hi friends
i am a learner of abap please answer my query ,
abap does support explicit type conversions if yes
give me the syntax
01-13-2005 1:35 PM
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.
01-14-2005 3:44 AM
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.