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

Field length

Former Member
0 Likes
1,136

Hi all,

i want to suprees one digit in field , actually iam storing document number in one filed which is having 10 field lenth , but my number is having 9 digits , so it adding '0' or zero to my document nuber

eg my document number is 800000005

so it is adding 0800000005.

i wnat to supree the zero ..

i wnat the number as it is what ever iam entering ..

how to do ?

anybody help me pls?

Regards,

pandu.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,114

Hi,

Use FM "CONVERSION_EXIT_ALPHA_OUTPUT"

before passing the value to table.....

Hi all,

i want to suprees one digit in field , actually iam storing document number in one filed which is having 10 field lenth , but my number is having 9 digits , so it adding '0' or zero to my document nuber

eg my document number is 800000005

so it is adding 0800000005.

i wnat to supree the zero ..

i wnat the number as it is what ever iam entering ..

how to do ?

anybody help me pls?

Regards,

pandu.

9 REPLIES 9
Read only

Former Member
0 Likes
1,114

hi,

Pass that value in to a character/integer variable to supress ....


i.e, data : v_num(10) type n value '099999999',
               v_char type i.

   v_char = v_num.

   write : v_char, v_num.

Regards,

Santosh

Read only

0 Likes
1,114

thank u for ur reply ..

but it is storing same value, i declared one char variable ,but getting the same value.

Regards,

pandu.

Read only

0 Likes
1,114

do this way....


REPORT ZABC .

DATA : V_CHAR(10) VALUE '0000001234'.
TRANSLATE V_CHAR USING '0 '.
CONDENSE V_CHAR.
WRITE : V_CHAR.

or


REPORT ZABC .

DATA : V_CHAR(10) VALUE '0000001234'.
SHIFT V_CHAR LEFT DELETING LEADING '0'.
CONDENSE V_CHAR.
WRITE : V_CHAR.

Read only

0 Likes
1,114

Hi,

One way is that whatever the domain you have give to that field cheange the output length to 9.(If it is customized table .Otherwise lot of other data elements might be used .That will impact other tables.)

SE11>click on domain>change mode>definition tab>

Read only

0 Likes
1,114

Hi,

Try this.

shift g_number left deleting leading '0'.

Regards,

Niyaz

Read only

Former Member
0 Likes
1,115

Hi,

Use FM "CONVERSION_EXIT_ALPHA_OUTPUT"

before passing the value to table.....

Read only

0 Likes
1,114

Thank u .. got the solution.

Regards,

pandu.

Read only

Former Member
0 Likes
1,114

data : ch(10) type c.

*transfer doc no to ch field.

*then use

condense: ch.

Regards

usman

Edited by: Usman Sheriff on Mar 14, 2008 11:48 AM

Read only

Former Member
0 Likes
1,114

Use to FM

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = inputchar

IMPORTING

output = inputchar.

All the leading 0 are suppress into the output.

vice versa operation 'CONVERSION_EXIT_ALPHA_OUTPUT'

0 are appended equalling the lenght of the element.

Reward if helpful.

thanks,

Imran.