Skip to Content

type conversions

hi friends

i am a learner of abap please answer my query ,

abap does support explicit type conversions if yes

give me the syntax

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 13, 2005 at 01: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2005 at 03: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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.