Function to LPAD matnr with zeroes...

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Post Reply
John Sapora

Function to LPAD matnr with zeroes...

Post by John Sapora » Wed Dec 04, 2002 6:18 am

Please forgive me, I have searched and searched this site for this information, which I know is here somewhere, I just can't find it.

I've also seached for all functions with 'MATNR' and 'MAT', but alas can not find the function that converts and pads material with leading zeroes.

I've used it countless times, it's just that I don't have access to my historical code and try as hard I can I simply can't find the function.

I even went via SE11, using matnr against the data type and looking at all related functions, but still no joy.

Please put an end to my misery.... and save my sanity....

Regards

John S.

ponnada_sk
Posts: 15
Joined: Tue Dec 03, 2002 8:33 am
Location: india
Contact:

Re: Function to LPAD matnr with zeroes...

Post by ponnada_sk » Wed Dec 04, 2002 6:30 am

Hi john,
Don't worry, use this function module CONVERSION_EXIT_ALPHA_INPUT

regards
sri krishna ponnada

John Sapora

Many thanks, but...

Post by John Sapora » Wed Dec 04, 2002 6:37 am

Thanks for that quick reply.

Yes, this'll work, however it was not the fuction that I had in mind. I though that there was specific function for material to do this job.

Does the function recommended deal with Alpha-numeric code in the material code ?

Don't answer that because I'll try myself, I mentioned as a thought...

Many thanks

John.

Rich
Posts: 7116
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool
Contact:

Post by Rich » Wed Dec 04, 2002 7:18 am

Hi John,

When you get strange values appearing in Databases (such as material numbers with leading zeroes, or WBS Projects that are 8 digits instead of a line of text), have a look at the domain for the table field.

There you may find a conversion exit. Stick the words 'CONVERSION_EXIT_' and '_INPUT' or '_OUTPUT' on the end and hey presto - the functions that you are looking for.

Conversion exits are SAP's ways of translating database readable info into human readable and vice verse. They are called implicitly from Parameters and outbound via Writes. Any other time you have to use them yourself.

Oh - and PS - they always come in pairs.

Rich

Post Reply