‎2005 Sep 28 10:20 AM
hi,
I am tring to insert the unit of measure in mm02 for a given material through a BDC.
The place of insertion is mm02-> matnr-> select all->additional data-> Units of measure tab.
I cant insert an "Alternative Unit of Measure for Stockkeeping Unit" which is already there. So i must delete that entry and enter my new entry. In a BDC u can't read the index of the entry to be deleted. So i went to table MARM to get the unit of measures for a material. i ahve records for the material in MARM.
So in my program i check whether the entry exists or not, it it exists then i sort the records in some order and then find the index delete the record of that index in mm02 and the insert the new entry.
I want to know in which order the unit of measures are sorted in mm02. If i insert a new entry the entry doess'nt go as a last record but it inserts in between. I want to know under what criteria it is doing that.
‎2005 Sep 28 10:25 AM
‎2005 Sep 28 10:25 AM
‎2005 Sep 28 11:51 AM
Looks like the unit of measure maintained in the basic data ( usually which will be EA ) will always appear on first tab, and then the unit of measures whichever are added are inserted in aplhabetical order. ( so 1" comes before ACR ).
All u have to do is from the records obtained from MARM first find the unit of measure maintained in basic data, which will be the first record. Sort the rest of the records in ascending order, I think this should solve ur problem.
‎2005 Sep 28 12:36 PM
‎2005 Sep 29 6:44 AM
First query MARA for the field MEINS. This will be the first unit of measure that will be displayed in the additional data tab.
Now get all the records from MARM, and delete the record which has field MEINH same as MEINS of MARA. ( for example EA ).
Now sort the table MARM by field MEINH ( character wise ).
u will get the order that is maintained in the transaction