Application Development and Automation 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: 
Read only

Type conversion

Former Member
0 Likes
494

Hi all,

I have a field of type F .suppose its value is 668.00.I want it to be stored in table created with value the 668.How can i do that.if anyone knows .Kindly let me Know.I am working in APO-Abap

Thanks and regards

Mohammed Ahasan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
469

Hi

The field of your table should be an inter, so if you MOVE the value TO the field of your table it's automatically converted:

MOVE FIELD_F TO FIELD_I.

Max

3 REPLIES 3
Read only

Former Member
0 Likes
470

Hi

The field of your table should be an inter, so if you MOVE the value TO the field of your table it's automatically converted:

MOVE FIELD_F TO FIELD_I.

Max

Read only

vinod_gunaware2
Active Contributor
0 Likes
469

Declare one variable of type <b>I</b> assign value of fllat variable to i variable using move.

<b>Assigning Values with MOVE</b>

To assign the value of a data object <f1> to a variable <f2>, use the following statement:

MOVE <f1> TO <f2>.

or the equivalent statement

<f2> = <f1>.

The contents of <f1> remain unchanged. <f1> does not have to be a variable - it can also be a literal, a text symbol, or a constant. You must always specify decimal points with a period (.), regardless of the user’s personal settings.

Multiple value assignments in the form

<f4> = <f3> = <f2> = <f1>.

are also possible. ABAP processes them from right to left as follows:

MOVE <f1> TO <f2>.

MOVE <f2> TO <f3>.

MOVE <f3> TO <f4>.

regards

vinod

Read only

Former Member
0 Likes
469

Hello,

You can declare another field of type I, and move the your field to the field of type I.

Best regards,

Kevin