Automatically create prod order from sales order

Hi All,

I have a BOM item and want to have ax automatically create a production order from the sales order line. I could swear I’ve done this before but can’t seem to get it to work.

I have an approved and activated BOM for the item. And, on the BOM version, I have the BOM Line Type set to Production. But, no production order is created.

Can anyone point me in the right direction on this?

Thanks in advance!

Tom

Assuming you are not talking about the inquiries and production process then your only option is to set the firming time fence appropriately on the coverage group - this would create an automatci production order. You can also create production orders referenced to the original at lower levels by the BOM setting, which is the one you reference, but this is production order to production order, not sales order.

Thanks, Adam. Perhaps I’m just remembering the automatic creation of the production order for an item in the sub-BOM.

I have the coverage group set to auto-firm within 3 days, but that’s doesn’t seem to be working. I only get planned orders. Can you think of something I’ve missed?

If it is not auto-firming it is needed further than 3 days out.

It is probably the auto-subproduciton creation you are remembering because you mentioned the bom line production setting.

I want create Production order for SubBOM of BoM which is select in Salesline… plz give Advise…

I want to Import data from Excel to Axapta…

Which or both? Why?

You may be better creating a new post!

Doesn’t the Subcontracting Worksheet do this when you run it??

Hai Adam… The problem is when creating Production Order from Salesline… when i select Item in Salesline The Item type Bom
The Sub-Boms of this Bom in BOMCONSISTSOF form linelevel are more than one… so, then I want to create Production order for
these Sub-Boms… so… When I looped these sub-Boms The production order creating for first recard only wen inserting next
record The error like"" Item identification cannot be changed when inventory transactions have been generated."" how is it done…

It is AX [:D]

You need to explain this clearer with an example and tell me your BOM settings, it is not clear. You have item BOM’s? in teh BOM and you want related production created? What is the BOM line type? Not sure what your last line means or how you are getting the error.

Hai Adam…
I want create Production order for Sub-boms of Bom(salesline ItemNumber)…

This is SalesTable form

Header:-


Sales order Customer account Invoice account Order type Status Currency Project Blanket order Customer requisition Quality order status Sales order Customer account Invoice account Contact Delivery name Delivery address Recipient Pool Currency Language One-time customer Status Document status Name Contact Customer account One-time customer Invoice account Internet address E-mail Campaign ID Status Document status Deadline Line-specific Dimension account Recipient Pool Language Sales unit Sales responsible Sales origin Site Warehouse Posting profile Settlement type Number sequence group Sales tax group Tax exempt number Prices incl. sales tax Enterprise number Reservation Sales group Customer group Associated payment attachment on sales invoice Item tagging Case tagging Pallet tagging Delivery name Street name ZIP/postal Code City County State Country/region Delivery contact Delivery address Requested receipt date Requested ship date Confirmed receipt date Confirmed ship date Delivery date control Blind ship
ment Mode of delivery Delivery terms Delivery reason Reason for export UPS zone Call tag type Time zone Carrier ID Account code Carrier account number Charge fuel surcharge Expedited shipment Residential destination Currency Fixed exchange rate Payment Due date Method of payment Payment specification Payment schedule Cash discount Discount pct. Credit card number Price group Multiline discount Total discount Total discount % Line discount Misc. charges group Quotation confirmation Confirmation Picking list Packing slip Invoice Date Date Date Date Date Transaction code Transport Port Statistics procedure List code County of origin/destination Autocreate intercompany orders Direct delivery Origin Allow indirect creation Central Bank Purpose Code Purpose text Customer requisition Customer reference RMA number Department Cost center Purpose

SO-100151 1103 1103 Sales order Delivered USD SO-100129 SO-100151 1103 1103 Cave Wholesales 456 White RoadAbbeville, GA 31001US 10 USD en-us No Delivered Packing slip Cave Wholesales 1103 No 1103 Delivered Packing slip No 10 en-us 10 7210 GEN None GA No Manual 221 None No No No Cave Wholesales 456 White Road 31001 Abbeville WILCOX GA US 456 White RoadAbbeville, GA 31001US 6/28/2008 6/28/2008 Sales lead time No 10 FOB_DS (GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi No No No USD N060 CHCK 0.00 0.00 Not included No No No

Line:—

Item number Configuration size color Site Warehouse Batch number Serial number Quantity Unit Unit price Discount Disc. pct. Net amount Item name Quality order status Requested receipt date Requested ship date Confirmed receipt date Confirmed ship date Delivery date control Mode of delivery Shipping location time zone Text External Origin Line status Stopped Complete Dimension account Lot ID Reservation Quantity Deliver remainder Deliver now Invoice remainder Return lot ID Return cost price Scrap Ledger account Item sales tax group Sales tax group Sales group Item tagging Case tagging Pallet tagging Delivery name Street name ZIP/postal Code City County State Country/region Delivery address Item sales tax group Sales tax group Requested receipt date Requested ship date Confirmed receipt date Confirmed ship date Delivery date control Overdelivery Underdelivery Mode of delivery Delivery type Time zone Carrier ID Account code Carrier account number Item number Deliver now Invoiced Invoice remainder Delivered Deliv

2009 1 11 ea 0.00 Speaker enclosure - mahog/16 inches 11/8/2010 11/8/2010 Sales lead time 10 (GMT-08:00) Pacific Time (US & Canada) Speaker enclosure - mahog/16 inches Canceled No No 00019523_068 Manual 380.70 No SPB No-Tax No No No Main Warehouse, Gate 1 678 Central Avenue, Gate 1 30005 Alpharetta GREENE AL US 678 Central Avenue, Gate 1Alpharetta, AL 30005US SPB No-Tax 11/8/2010 11/8/2010 Sales lead time 0.00 0.00 10 (GMT-08:00) Pacific Time (US & Canada) 2009 1.00 No Enclosures 1 11

In Line Level The Item 2009 select and go to main Tableform The InventTable Opernd and Select Item 2009 from
InventTable Go to Button BOM->line-> BomCOnsistsOf Form opened

In BomConsistsOf form
Line leven Related to Item 2009(InventTable) have Sumboms

like
7015
7027
7016 etc… I want create Production order for These sub boms… when i select Item in SalesLine…

when I looped these items The the production order for first Item 7015 created… when second itam come to insert
The error " Item identification cannot be changed when inventory transactions have been generated" came… How it solve…

select invent1 where invent1.itemId == salesLine.itemId
&& invent1.ItemType == itemType::BOM;
{
select bomversion1 where bomversion1.itemId == invent1.itemId;
{
while select bom1 where bom1.bomid == bomversion1.bomid
{
while select invent2 where invent2.ItemId == bom1.ItemId
&& invent2.ItemType == itemtype::BOM
{
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 = invent2.ItemId; // salesline.itemid;//Enter BomId
info(ProdTable.ProdId);
prodTable.BOMId = ‘’;
prodTable.RouteId = ‘’;
prodTable.initFromInventTable(InventTable::find(ProdTable.itemid));
info(ProdTable.ItemId);
prodTable.initBOMVersion();//Initialize BomTable
prodTable.initRouteVersion();//Initialize Route Table
// inventDim1 = inventDim::findOrCreate(inventDim);//Create InventoryDimension
// info(strfmt(‘asas%1’,inventDim1.inventDimId));
// ProdTable.InventDimId = inventDim1.inventDimId;
ProdTable.QtySched = salesline.QtyOrdered * bom1.BOMQty;
info(strfmt(’%1’,ProdTable.QtySched));
// prodTable.InventRefType = InventRefType::Sales;
ProdTable.InventRefId = salesline.SalesId;
info(prodTable.InventRefId);
prodTable.InventRefTransId = salesline.InventTransId;
info(ProdTable.InventRefTransId);
prodtable.insert();
info(‘Production Order Created’);
// salesline_ds.executeQuery();
ttscommit;
}
}
}
}

This is I used code… The error is “Item identification cannot be changed when inventory transactions have been generated.”

Really do not understand all that text you posted. Anyway set the BOM line to production, create production from the sales order and then set teh status from created to create the reference sub-BOM production orders. That is how AX wants you to process it.

Hai Adam…
I am creating Production Order from Sales Order… for this create I select
Item 00010(Type::BOM)in the seles line and click Production Like:-- Enquiry—> production

create prod order window opened. now click OK And created production order for Item 00010…

so… This item 00010 is from InventTable…relate to the salesline Item… Then now i go to lines like…
Item 00010 (type:: BOM) Button:— BOM–>lines
now opened BOMlines (BOMConsistsOf FORM)…

In This form line level(BOMTable) have components like:–

0020
0021
0022 :—these are Items (itemType::Bom)which are linked to item from InventTable 00010

sub-Boms of this item 00010… So… I want create prod Order for these Sub-BOMs(0020,0021,0022) of Item 00010…
Is it possible? if yes how this done? give code…

Have you tried advancing the status of the production order to Started? That should create the production orders for the BOM lines.

Yes it is possible…

When you estimate or start the Main production order the system will automatically create the production orders for sub-bom’s.

Provided the configuration of BOM is done according to it. means in the BOM lines you need to specify sub-bom line type as production.

Hope you understood…

hai ramesh,

I think tpur code is right. After creation of first line. When loop returns Just add this single line, after inserting every record.

ProdTable.clear();. I hope this will create u next record…

hai ramesh,

I think your code is right. After creation of first line. When loop returns Just add this single line, after inserting every record.

ProdTable.clear();. I hope this will create u next record…

There is no need to code it. The production order created has the status created which is a non-status in planning, moving it to estimated, when you are ready, will create all of the sub-productions automatically as I posted previously and as Kranthi has said. Why do you want to customise something the system does as standard?