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

conversion

Former Member
0 Likes
634

hi all,

i get a field with 15chars, i need to change it into 18 chars and then proceed with the other things.

could someone let meknow how i can do this?

thanks!

1 ACCEPTED SOLUTION
Read only

ferry_lianto
Active Contributor
0 Likes
614

Hi,

Please try this.


DATA: FIELD1(15) TYPE C VALUE '1234567890ABCDE',
      FIELD2(18) TYPE C.

MOVE FIELD1 TO FIELD2.

Regards,

Ferry Lianto

6 REPLIES 6
Read only

ferry_lianto
Active Contributor
0 Likes
615

Hi,

Please try this.


DATA: FIELD1(15) TYPE C VALUE '1234567890ABCDE',
      FIELD2(18) TYPE C.

MOVE FIELD1 TO FIELD2.

Regards,

Ferry Lianto

Read only

0 Likes
614

HI Ferry,

I have a field Equnr which is having either chars or 15 chars, so I have to convert it to 18chars.

Could you pls help me with this.

Thanks!

Read only

Former Member
0 Likes
614

Hi,

I think you can do this way:

Declare a variable of type c length 18.Then from the field of 15 character length,move the value to the variable of 18 characters.

e.g.: lv_field1(18) tye c.

lv_field = value from 15 char field.

Hope it was useful.

Thanks,

Sandeep.

Read only

Former Member
0 Likes
614

Hi,

Pass the value from the equnr field to any variable which is having a lenght of 18.

e.g.

data: lv_field(18) type c.

lv_field = equnr.

characters variables can accept values from all fields.Similarly character variables values can also be assigned to any field.

Hope it was useful.

Thanks,

Sandeep.

Read only

0 Likes
614

I need a function mdule which would convert any dec or imei to hex.

Read only

ferry_lianto
Active Contributor
0 Likes
614

Hi,

Please try FM CHAR_HEX_CONVERSION.

Regards,

Ferry Lianto