10-24-2007 9:21 AM
hi
my issue is that i have to remove leading zeros for material number when displaying in alv grid.iam getting output.but leading have to truncated automatically.
eg: 000000000000000102
the ouput should be 102.
please do provide solution for this or any function module.thanks in advance.
10-24-2007 9:23 AM
use the fm :CONVERSION_EXIT_MATN1_OUTPUT
its a conversion exit for MATNR
Regards
Gopi
10-24-2007 9:23 AM
hi
use this function module
CONVERSION_EXIT_ALPHA_OUTPUT- converts any number with zeroes right into a simple integer
10-24-2007 9:24 AM
to supress zeroes , use FM CONVERSION_EXIT_ALPHA_OUTPUT
try with this
regrds
karthik
10-24-2007 9:24 AM
if wa_fcat is your prefix for the fieldcatalog, just add
wa_fcat-no_zero = 'X'.
to the settings of that field in the fieldcatalog.
10-24-2007 9:26 AM
Hi sanjana
You can delete the leading zero by using the shift operator as follows:
SHIFT <field-name> LEFT DELETING LEADING 0.
You can also use the Conversion exit for MATNR for this purpose.
CONVERSION_EXIT_MATN1_OUTPUT
THanks,
Vijay
<b>PLZ reward points if helpful</b>
10-24-2007 9:27 AM
Hi Sanjana,
You can try this function module CONVERSION_EXIT_ALPHA_OUTPUT. INPUT parameter is your material no. and OUTPUT is your result after truncate the leading zero infront.
Hope this help.
Thankyou.
Cheers.
10-24-2007 9:27 AM
Hi
You can use
shift Matnr left deleting leading ' 0 '.
Reward if useful.
Regards
Shibin
10-24-2007 9:30 AM
10-24-2007 9:31 AM
Hi,
Use FM <b>CONVERSION_EXIT_MATN1_OUTPUT</b>
OR
<b>SHIFT itab-matnr LEFT DELETING LEADING '0'</b>
Thanks,
Sriram Ponna.
10-24-2007 9:39 AM
Hi Sanjana,
while populating the internal table use the conversion exit available for MATNR. this will remove the leading zeros.
oter possible way, declare the internaltable by referring the data element MATNR, i hope if you do this, it will delete the leading zeros automaticallt.
or if you declare the internal table field as charecter type, use the ALPLA_CONVERSION_EXIT_INPUT ot OUTPUT function module to remove the leading zeros.
Reward the points if it is helpful..