‎2007 Jan 26 6:32 PM
Hi All,
When uploading matnr from a text legacy file , should i add leading zeroes to the sku value. For ex the data from the lagacy is 1000123456 (10 digits length). The values are always numbers. The matnr in SAP is 18 chars. Should my program transform it into 000000001000123456 before saving it into mara-matnr?
Regards, Oli
‎2007 Jan 26 6:34 PM
Hi,
You can use this FM CONVERSION_EXIT_ALPHA_INPUT to add leading zeros.
...
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_MATNR
IMPORTING
OUTPUT = WA_MATNR.
...
Regards,
Ferry Lianto
‎2007 Jan 26 6:34 PM
Hi,
You can use this FM CONVERSION_EXIT_ALPHA_INPUT to add leading zeros.
...
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_MATNR
IMPORTING
OUTPUT = WA_MATNR.
...
Regards,
Ferry Lianto
‎2007 Jan 26 6:36 PM
‎2007 Jan 26 6:35 PM
Hi Oli,
Yes, it will implicitly use conversion exits for your values but prior to this you need to these values to the exact table field.
Otherwise, Use conversion exits before passing these values to a conversion program
<b>CONVERSION_EXIT_ALPHA_INPUT</b> is used to convert from external to internal format.
Thanks,
Vinay
‎2007 Jan 26 6:50 PM
‎2007 Jan 26 7:19 PM
HI Oli bumchi...
as simply u can use UNPACK statement...
data matnr like mara-matnr.
matnr = '12345'.
Unpack matnr to matnr.
Regards
SAB
‎2007 Jan 26 8:02 PM
Are you sure that in configuration, the Indicator for lexicographical material numbers is unchecked? If it checked, then SAP will not then the all numeric material numbers will not get leading zeros by default. =====>
Indicator for lexicographical material numbers
Defines the way numeric material numbers are stored in the database.
Use
Caution
It is only possible to set or reset (cancel) this indicator if no numeric material numbers have been used yet in the system since they would no longer be interpretable after setting or resetting this indicator.
If this indicator is not set, numeric material numbers are padded with leading zeros and stored right-justified
‎2014 May 06 2:32 PM
i am facing similar issue... my matnr is not getting printed in alv... i appended extra zeros in front then it came... my question is matnr has implicit conversion right? so what is the need of expicit conversion function module...
‎2007 Jan 26 6:59 PM
There's another, admittedly dirty(!) way of doing it -
SHIFT MATNR RIGHT DELETING TRAILING SPACE.
OVERLAY MATNR WITH '000000000000000000' ONLY SPACE.
‎2007 Jan 26 7:01 PM
‎2007 Jan 26 8:21 PM
Hi Oli,
use Funciton Module 'CONVERSION_EXIT_ALPHA_INPUT'
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = input_value
IMPORTING
OUTPUT = output_value.