on 07-14-2017 8:13 AM
Hi,
Please, could you give a simple example of creating BOM (BO ProductionBillOfMaterial) in ABSL?
Thank you.
Aleksei
A simple example:
// Create New BOM
var productionbillofmaterialData : elementsof ProductionBillOfMaterial;
productionbillofmaterialData.ID.content = "100009";
var productionbillofmaterial = ProductionBillOfMaterial.Create ( productionbillofmaterialData );
var descriptionData : elementsof ProductionBillOfMaterial.Description;
descriptionData.Description.content = "BOM Test2";
var description = productionbillofmaterial.Description.Create ( descriptionData );
var variantData : elementsof ProductionBillOfMaterial.Variant;
variantData.ID = "VAR1";
variantData.Quantity.content = 1;
variantData.Quantity.unitCode = "EA";
variantData.MaterialKey.ProductID.content = "P100709";
var variant = productionbillofmaterial.Variant.Create ( variantData );
var variantdescriptionData : elementsof ProductionBillOfMaterial.Variant.VariantDescription;
variantdescriptionData.Description.content = "VAR1 Test2";
var variantdescription = variant.VariantDescription.Create ( variantdescriptionData );
var itemgroupData : elementsof ProductionBillOfMaterial.ItemGroup;
itemgroupData.ID = "1";
itemgroupData.MultipleSelectionAllowedIndicator = true;
var itemgroup = productionbillofmaterial.ItemGroup.Create ( itemgroupData );
var itemgroupitemData : elementsof itemgroup.ItemGroupItem;
itemgroupitemData.ID = "1";
var itemgroupitem = itemgroup.ItemGroupItem.Create ( itemgroupitemData );
var itemgroupitemchangestateData : elementsof itemgroupitem.ItemGroupItemChangeState;
itemgroupitemchangestateData.MaterialKey.ProductID.content = "P100213";
itemgroupitemchangestateData.Quantity.content = 2;
itemgroupitemchangestateData.Quantity.unitCode = "EA";
itemgroupitemchangestateData.EngineeringChangeOrderID.content = newECO; // "1"
var itemgroupitemchangestate = itemgroupitem.ItemGroupItemChangeState.Create ( itemgroupitemchangestateData );
itemgroupitemData.ID = "2";
itemgroupitem = itemgroup.ItemGroupItem.Create ( itemgroupitemData );
itemgroupitemchangestateData.MaterialKey.ProductID.content = "P110801";
itemgroupitemchangestateData.Quantity.content = 3;
itemgroupitemchangestateData.Quantity.unitCode = "EA";
itemgroupitemchangestateData.EngineeringChangeOrderID.content = "1";
itemgroupitemchangestate = itemgroupitem.ItemGroupItemChangeState.Create ( itemgroupitemchangestateData );
Best regards,
Aleksei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
11 | |
10 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.