Hi,
I know this topic is a little old, but I wanted to comment this unanswered post.
Table ITM12 can only be used when working with UoM Groups.
In this case you should try to assign an UoM Group to the item and then setting the default Packaging unit via UnitOfMeasurements.DefaultPackage.
It would be something like this: (You need to define the UoM Entry and Group before trying this)
oDoc.ItemCode = "A000001"
oDoc.UoMGroupEntry = 1 'Here goes the UoM Group key
oDoc.UnitOfMeasurements.UoMEntry = 1 'Here goes the UoM key for purchase
oDoc.UnitOfMeasurements.UoMType = SAPbobsCOM.ItemUoMTypeEnum.iutPurchasing
oDoc.UnitOfMeasurements.Packages.PackageTypeEntry = 1 'Here goes the entry of the package "Container"
oDoc.UnitOfMeasurements.Packages.QuantityPerPackage = 2 'The quantity per package
oDoc.UnitOfMeasurements.DefaultPackage = 1'Here goes again the entry of the package "Container"
'....
oDoc.Add()
I didn't test this yet but I hope this help can help you.
Best regards.