Create production order by code


 ttsbegin;
    //Initilize the number sequence class for getting new production Number
    NumberSeq =
    NumberSeq::newGetNumFromCode(ProdParameters::numRefProdId().numberSequence);
    ProdTable.ProdId = NumberSeq.num();// assign New Production Number
    ProdTable.ItemId = 'FLL-2500';//Enter BomId

    prodTable.BOMId         = '';
    prodTable.RouteId       = '';
    prodTable.initFromInventTable(InventTable::find(prodTable.ItemId));
    prodTable.initBOMVersion();//Initialize BomTable
    prodTable.initRouteVersion();//Initialize Route Table

    //ProdTable.initFromInventTable(InventTable::find('FLL-2500'));
    InventDim.configId ="B-Black"; //Enter Item Dimensions
    InventDim.InventLocationId = "GW";//Enter WereHouse
    InventDim = InventDim::findOrCreate(InventDim);//Create Inventory
    Dimension
    ProdTable.InventDimId = InventDim.inventDimId;
    ProdTable.QtySched  = 100;// Enter Production scheduled Quantity
    prodtable.insert();
    ttscommit;

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.