cancel
Showing results for 
Search instead for 
Did you mean: 

smartforms - retaining zeros for Shipment number while display

Former Member
0 Kudos

Hi SDN gurus,

kindly help me ..as i m displaying Shipment number - TKNUM say SAP stores it as 1376..but i want it to display wid its leading zeros 0000001376...

how do i format my text which i m displaying in smartforms..

<< Removed >>

Edited by: Rob Burbank on Feb 12, 2009 2:12 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

After using the &variable(F0)&,, move it to a variable of type n (numeric character). Hope this'll help.

Former Member
0 Kudos

Hi but i m unable to move it to another numeric variable after displaying &g_tknum(F0)& ..can u tell me the exact steps for this to avoid the comma???

Former Member
0 Kudos

HI,

&g_tknum(TF0)&

Surely it will work.

Thanks,

Nithya.

Former Member
0 Kudos

thanks a lot nithya

Answers (5)

Answers (5)

saradas
Explorer
0 Kudos

I tried this for Invoice number &vbeln(F0)& but it is not working for me. What am i doing wrong? pls help!

In my case vbeln is a dictionary field of length 10. internally the value for the field is 0012345678 but it is displayed in the form as 12345678.

I tried multiple format options none work. please help asap. thanks.

Resolved by moving it to a variable of type n and formatted.

Former Member
0 Kudos

you can use

as:

&EKPO-MENGE(T)&

this will remove the comma

Former Member
0 Kudos

Hi,

&TKNUM(F0)&

This will fill the leading spaces with 0.

Thanks,

Nithya.

Former Member
0 Kudos

Hi Nithya,

Thanks for ur reply...

my shipment number tht i wanted to display is 0000001376.. TKNUM..

by using ur suggestion --> &TKNUM(F0).. with this zeros are placed at the required position (leading)

..which is why thanks for tht..but i have declared TKNUM as integer type only then i get leading zeros..& output as 0000001,376 & not as 0000001376..where comma should be avoided..any idea abt this????

former_member196280
Active Contributor
0 Kudos

create program lines inside your smartform and use FM, CONVERSION_EXIT_ALPHA_INPUT which will pre-fix zero's.

close the thread once your question is answered.

Regards,

SaiRam

amit_khare
Active Contributor
0 Kudos

Before Display UNPACK it to a variable of desired length and use that variable for display.

Former Member
0 Kudos

unppack doesnt work after the display of the text element in smartform,...are there any text formating options in smartform...??????? for providing leading zeros