Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Material Code Conversion

Former Member
0 Likes
2,576

Hello Experts

My requirement is to upload material,plant, unit price1 and date (tcode mm02) from flate file and the same data is required to be updated in a Z-table along with remarks so as to maintain material price with date. I am able to do this.

Now the requirement is to fetch the records from this Z-table based on material code and Plant on selection screen.

But I am not able to do so , there is some problem of conversion with material code.

In standard SAP tables, MATNR is uploaded as 00000000XXXXXXX... but in my Z-table, it is uploading as XXXXXXX because of which I am not able to fetch the records.

If anybody had the same requirement, do let me know

that can be of great help to me

Thanks i advance

8 REPLIES 8
Read only

Former Member
0 Likes
1,575

you have to use the fm CONVERSION_EXIT_MATN1_OUTPUT to convert the material number

Read only

0 Likes
1,575

You can use the FM CONVERSION_EXIT_MATN1_INPUT

to convert material to external format(with zeroes)

Read only

ferry_lianto
Active Contributor
0 Likes
1,575

Hi,

You can use this FM to convert the material.

<b>CONVERSION_EXIT_ALPHA_INPUT

CONVERSION_EXIT_ALPHA_OUTPUT</b>

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
1,575

Hi Rashmi,

 to add the leading zeroes use FM CONVERSION_EXIT_ALPHA_INPUT 

to remove the leading zeroes use FM CONVERSION_EXIT_ALPHA_OUTPUT

Read only

Former Member
0 Likes
1,575

hi,

in the domain of the field matnr you can see a convertion routine. this routine will be used automatically in dynpros. Please use the function module

CONVERSION_EXIT_MATN1_INPUT to convert the material as the dynpros of SAP are working. (if only numbers the leading zeros will be filled in, if there is an alpha-numeric sign no convertion will be done.

I hope the module can help you.

Bye

Melanie

Read only

Former Member
0 Likes
1,575

The problem is that you nedd to use conversion exit which you can get fro the domain level for Material Number in MARA table.Pass the material number into the conversion exit :CONVERSION_EXIT_MATN1_INPUT and you will not have any problem in fetching further information.

Good luck

Anand

Read only

Former Member
0 Likes
1,575

hi,

You have to use conversion routines.

There are two function modules

Convesion_exit_**input(to add zeroes), Conversionexit_**_output (to remove zeroes).

You can know the conversion exit assigned to a field at its domain level. Double click on data element and double click on the domain, there is one paramter Conv. Routine., Just double click on the value. we can see the two conversion routines.

Regards,

sailaja.

Read only

0 Likes
1,575

Thanks to all for your replies

but I have given the same type that is MATNR (data element of field MATNR in MARA) to the field in my Z-table still its not getting converted

Initial zeros are not getting added to the number

and I have seen these two Conversion Exit

CONVERSION_EXIT_MATN1_RANGE_I

CONVERSION_EXIT_MATN1_RANGE_O

but I am not able to test it

If anybody can provide test data for the same, that can be of help

Thanks for your replies