cancel
Showing results for 
Search instead for 
Did you mean: 

TO SUPRESS ZEROS

Former Member
0 Kudos

HI FRIENDS,

I WANT TO SUPRESS THE ZERO'S

MY MATNR NUMER IS 0000000025.

I WANT TO DISPLAY IN MY SMART FORM ONLY 25

TO DISPLAY MATNR THE VARIABLE NAME IS MATNR

IN MY SMARTFORM.

I USED &MATNR(Z)& IN THE TEXT.

BUT THE OUT PUT IS SHOWING LIKE THIS

0000000025.

HOW TO SUPRESS.

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

Hi Sripathi,

When certain symbol values are printed with leading zeros and if you want to suppress these, use the Z option.

Syntax :

&symbol(Z)&

Assuming the current date is 1.1.1994,

&DAY& -> 01

&DAY(Z)& -> 1

Regards,

Swapna.

Former Member
0 Kudos

hi

write the matnr value into character type variable and then do the SHIFTING of leading zeroes. You can try this

Former Member
0 Kudos

hi

check your formatting option whether it is in lower case or upper case... this does make difference...

IT should be in capitals

regards

padma

Edited by: Padmavathi Palli on Jul 3, 2008 12:07 PM

Former Member
0 Kudos

hi,

pls try &MATNR(CIZ)& . This will supress the leading zeros in smartforms.

-


Shiny S Krishna

Former Member
0 Kudos

Hi,

Depending on the declaration of the variable matnr

you can use these 2 lines (in the program or in the smartform directly)

SHIFT matnr LEFT DELETING LEADING SPACE.

or

SHIFT l_pcsd LEFT DELETING LEADING '0'.

Bests,

Nadja

0 Kudos

Hi

by calling this fm u can supress the zeros.

CONVERSION_EXIT_MATN1_OUTPUT

Former Member
0 Kudos

hi

&field(Z)& should have worked..(did u use Z in caps?)

ne ways...you can use this

SHIFT field LEFT DELETING LEADING '0'.

so...if say field = 00025 then it will become 25.

or else you use the fm(conversion exit)

CONVERSION_EXIT_MATN1_OUTPUT

reward if helpful

Former Member
0 Kudos

hi,

pls try &MATNR(CIZ)& . This will supress the leading zeros.

-


Shiny S Krishna

former_member206377
Active Contributor
0 Kudos

Hi Sripathi,

u can use the FM CONVERSION_EXIT_ALPHA_OUTPUT for this.

regards,

Vasuki

former_member195383
Active Contributor
0 Kudos

DATA:wf_field(20) type c.

wf_field = wf_matnr.

SHIFT wf_field left DELETING LEADING '0'.

try this..it ll work...

reward points if helpful..

Former Member
0 Kudos

Hi,

USe FM CONVERSION_EXIT_MATN1_OUTPUT.

Regards

Raju Chitale

Edited by: Raju Chitale on Jul 2, 2008 12:24 PM

Former Member
0 Kudos

sorry boss

its not coming..

i dont what this function module is used for.

one thing is,

when i used for posnr field (i.e.,posnr(z))

the zero's are supressed.

but for matnr why it is not supressed?

please give any clue boss.

former_member195383
Active Contributor
0 Kudos

hey try with the shift command that I have stated...No need to use any FM..

Simply assign ur variable to a character variable and then

use

SHIFT wf_field left DELETING LEADING '0'.

wf_field will have the required outout....