01-13-2016 6:32 AM
hi,
I facing problem with remove leading zero. simply I use this SHIFT a LEFT DELETING LEADING '0'. so this statement remove all leading zeros but my problem is if some material start with zero i.e 01234567 like this i want to show same and using this SHIFT a LEFT DELETING LEADING '0'. all zero removed. so is there any solution to find exact no. or length. if i am using strlen or describe field it gives me length 18 can any tell me how to find length 01234567 i.e.8 or is any solution
and matnr length is not fix it will be 11, 9 or 10 or any no.
can anyone help for this
regards,
dipti
01-13-2016 9:05 AM
Hi Dipti,
you can use one of the several Conversion Routines.
You find them if you search in the Tx se84 with *Conversion*Matnr* or have a look at the domains in the Data Dictionary there are sometimes Conversion Routines in the Domain.
Regards
Tobi
01-13-2016 9:52 AM
Call transaction SE11 and look at domain MATNR, depending on your system you can find a conversion routine as ALPHA, MATN1, MATN2 or another value I'm not aware of. As your material id begin with a zero in your system, you cannot/must not find ALPHA in the domain, else you got a serious problem (try to execute transaction MM03 on your material id to check for problem that would prevent use of this reference by user of any standard SAP transaction...)
Then use the associated input FM (double-click on conversion routine field), e.g. CONVERSION_EXIT_MATN1_INPUT.
Regards,
Raymond
01-13-2016 10:09 AM
HI ALL,
I am using this function but using this it removes all zero .
i want to show if in mara table material is 0988665543 then it show same no 0988665543
regards,
dipti
01-13-2016 1:30 PM
What is the conversion routine of MATNR in your system?
From where do you get the original number with multiple zeroes, note that if 0988665543 00988665543 and 988665543 are valid material id and if someone used Excel on a file where id was considered a numeric field, this guy may have messed up the data to a nearly unrecoverable point. Be ready to check database (tables like MARA or MATERIALID) for existence of every possible number of zeroes (SELECT with values
988665543 to 000000000988665543 !)
Regards,
Raymond
01-13-2016 10:20 AM
hi,
In table mara material is like 0123456789 (here first zero is important) or 123456789.
but in internal table in both cases it shows like this 000000000123456789 & same can be seen in output also.
so i want to delete leading zero for material which start with zero.
02-05-2016 7:48 AM
02-17-2016 3:40 PM
Hi Dipti,
You can check the value if the value has matnr+0(2) = 00. then use leading zeors,
If the matnr+0(2) = 0X. then leave it.
Thanks,
Sivandh
02-18-2016 7:33 AM
At the risk of repeating myself, what is the conversion routine of MATNR in your system, a 0123456 may not comply with your system parameters and would mess up your database ?
03-01-2016 8:46 AM