04-14-2006 11:41 AM
Dear All .
Mat . 0000000980
I wnat to remove preceeding zeros
I want It to be displayed as
mat . 980 .
What I should do .
04-14-2006 11:43 AM
hi Raghu
Use this
call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
exporting
input = it_sales-matnr
importing
output = it_sales-matnr.
Regards,
Suruchi
Dont forget to award points
04-14-2006 11:44 AM
04-14-2006 11:45 AM
04-14-2006 11:48 AM
HI,
Use the below code. hope it solves your problem.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = itab-matnr
IMPORTING
OUTPUT = itab_matnr.
regs
Rakesh
04-14-2006 11:49 AM
Hi,
data: material(10).
material = '0000000980'.
write: material no-zero.
Regards
vijay
04-14-2006 11:53 AM
Hi Raghavendra,
data: material(10),
test(10).
material = '0000000980'.
<b>write: material to test no-zero.</b>
write test.
now test is holding a value with out leading zeroes.
the bold one will work.
Regards
vijay
04-14-2006 12:47 PM
Use CONVERSION_EXIT_ALPHA_OUTPUT.
Also you can use pack and unpack keyword.
See F1 for pack and unpack.
Regards,
Sangeeta.
04-14-2006 1:01 PM
hi,
try this.
if you have the matnr in inetnal table
LOOP AT itab.
SHIFT itab-matnr LEFT DELETING LEADING '0'.
MODIFY itab.
ENDLOOP.
otherwise
SHIFT matnr LEFT DELETING LEADING '0'
Message was edited by: Ronie James
04-17-2006 5:40 AM
Hi Raghavendra,
1. I don't think anything
is specifically required to be done for this.
(This is SAP default behaviour)
2. I suppose your field is Material Number.
(of for that matter , any other field,
which has a data element)
3. If the FIELD is defined as TABLE-FIELD,
(reference to the data element)
then sap will automatcially do the conversion.
4. Just copy paste in new program,
to get the taste of it.
report abc.
data : begin of itab occurs 0,
matnr like mara-matnr,
end of itab.
*----
select * from mara
into corresponding fields of table itab.
*----
loop at itab.
write 😕 itab-matnr.
endloop.
regards,
amit m.