Application Development 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: 

Field conversion from char .

Former Member
0 Kudos

Dear member ,

Is there any way to reduce the prefix zero from sale order 10 digit char .

EG: if 0053549980 is the so no I want to make it 53549980 . I have transfered the vale into integer variable but error is coming data overflow .

Help me to find out the solution .

Regards ,

Joy .

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Joy,

Try using the PACK keyword to remove the leading zeros.

PACK <var1> TO <var2>.
CONDENSE <var2>.

Here var1 and var2 both are Character Type variables.

Hope it helps.

Regards,

Himanshu

7 REPLIES 7

GauthamV
Active Contributor
0 Kudos

Plz SEARCH in SCN before posting, you will get lot of posts

with this FM.

CONVERSION_EXIT_ALPHA_OUTPUT

Former Member
0 Kudos

Thanks ur mail , but this one is the right code .

PACK <var1> TO <var2>.

CONDENSE <var2>.

Former Member
0 Kudos

Thanks Himansu , it really workin , problem solve .

Former Member
0 Kudos

Hi,

Try

Shift lv_value left deleting leading 0.

or conversion_exit_alpha_output.

Regards,

Himanshu

venkat_o
Active Contributor
0 Kudos

Hi, Try this way.

data:num(10) type n VALUE '0053549980'.
WRITE num to num no-ZERO.
WRITE num.
Thanks Venkat.O

Former Member
0 Kudos

Hi,

Either use CONVERSION_EXIT_ALPHA_OUTPUT or


data: var(10) type c.

var = '0053549980'.

shift var left deleting leading zeros.

write: var.

Regards,

Vikranth

Former Member
0 Kudos

Hi Joy,

Try using the PACK keyword to remove the leading zeros.

PACK <var1> TO <var2>.
CONDENSE <var2>.

Here var1 and var2 both are Character Type variables.

Hope it helps.

Regards,

Himanshu