‎2008 Apr 09 8:25 AM
Hi all,
I'm using this statement:
CONCATENATE matdescr pa_matnr 'from' vendorname pa_lifnr
INTO v_head SEPARATED BY space.
TRANSLATE v_head TO UPPER CASE.
but the problem is that I'm getting the matnr with zeros '000000000000055501' and the lifnr as ' 0000300205'.
Is there a way I can show the material no. and vendor without leading zeros. I tried to use NO-ZEROS but did not work.
‎2008 Apr 09 8:33 AM
For these kind of problems use the conversion exit routines. You can find them by going to the data type of the material (or whatever for that matter), than double click on domain. In one of the tabs of the domain you will find at the bottom the field EXIT (or conversion, not sure). Double click this field and you will be navigated to the conversion FM (input and output conversion routines). Use these for deleting and adding zeros.
‎2008 Apr 09 8:28 AM
HI,
see this code.
data:abc(10) value '0000123'.
WRITE:/ abc.
SHIFT abc LEFT DELETING LEADING '0'.
write:/ abc.
rgds,
bharat.
‎2008 Apr 09 8:30 AM
Hi Shaheen
Use FM 'CONVERSION_EXIT_ALPHA_OUTPUT'
This FM will remove leading zeroes,
Rewards if useful
Regards,
Talwinder
‎2008 Apr 09 8:33 AM
Hi Shaheen,
You can use the FM " Conversion_exit_alpha_output".
This will truncate the leading zeros.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = pa_matnr
IMPORTING
output = pa_matnr.
Use this for concatenation.
Regards,
Chitra
‎2008 Apr 09 8:33 AM
For these kind of problems use the conversion exit routines. You can find them by going to the data type of the material (or whatever for that matter), than double click on domain. In one of the tabs of the domain you will find at the bottom the field EXIT (or conversion, not sure). Double click this field and you will be navigated to the conversion FM (input and output conversion routines). Use these for deleting and adding zeros.
‎2008 Apr 09 8:38 AM
Hi,
Use this FM,
CONVERSION_EXIT_CCMAT_INPUT Function Module for Material Number Conversion (INPUT)
CONVERSION_EXIT_CCMAT_OUTPUT Function Module for Material Number Conversion (OUTPUT)
Regards,
sathish