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

Moving values b/w fields having different data types

Former Member
0 Likes
686

Hi All,

Can we move values b/w fields having different data types?

Any sample code for type casting it ?

thanks in advance,

sushmitha

3 REPLIES 3
Read only

Former Member
0 Likes
575

Hello Sushmitha,

You can move the values one data type to others,

if you do not have any calculation then move to charcter type otherwise use same data type to same data type

Simple example :

data: quant(17) type c.

  • value from mseg-menge to quant

quant = mseg-menge.-> menge is quantity field

replace ',' with space into quant.

condense quant no-gaps.

Check the below links :

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3260358411d1829f0000e829fbfe/content.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3427358411d1829f0000e829fbfe/content.htm

Thanks

Seshu

Message was edited by:

Seshu Maramreddy

Read only

Former Member
0 Likes
575

Hi

Actually, sap supports character format in which ASCII format. So, you can covert from one type to another type. Sap internally identifies as a character.

go throgh the following example

Data: char1 type c value '5',

num type i.

move char1 to num.

write num.

output num = 5.

reward points helpful

Read only

Former Member
0 Likes
575

Thanks a lot...