Hi Harry and all I managed to hack at the ReqTrans to get serial number passed along the master planning :) Please see below for how. In the table ReqTrans.createdBOM() method I added just one line of code :))). I have added some comments to the code for this email based on my understanding of what is happening: Starting at line 54: BOMInventDim = BOM.inventDim(); //this gets the InventDim of the BOM line (i.e. what dims you set on the BOM line) inventDim.copyItemDim(childSetup.dimGroupId(),BOMInventDim); //this copies only the dims that are set to coverage plan for the BOM line item from the BOM line dims (e.g. if you set warehouse on the BOM line but the item does not have warehouse set for coverage plan then the warehosue would not get copied) inventDim.InventLocationId = childSetup.inventTableInvent().inventLocationId(BOMInventDim.InventLocationI d); //standard code that sets default location if warehouse had a value
inventDim.inventSerialId = setupDim.inventDim().inventSerialId; //my code to set serial number for the BOM line from the BOM item :))) reqTransBOM.CovInventDimId = inventDim.reqCovDimId(childSetup.dimGroupId()); //copying the inventdim that has been built up in the above code to the ReqTrans line based on what dimensions are active for the BOM line item //if serial number is not set as coverage plan in the BOM line item then serial number will not be copied so this works perfectly for my case where I have //some BOM lines that need serial number passed along and some that do not Many many many many many many many many thanks once again Harry!!!! Your input really saved me days and hours James _____ From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Harry Deshpande Sent: 17 September 2008 21:44 To: Axapta-Knowledge-Village@yahoogroups.com Subject: RE: [Axapta-Knowledge-Village] Re: Master planning and batch number flow through Sorry, you will need to enable batch dimension and make code changes. I think the name of the method is createBOMRoute? I think this method is on reqTrans. Regards Harry From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of James Flavell Sent: Tuesday, September 16, 2008 8:21 PM To: Axapta-Knowledge-Village@yahoogroups.com Subject: RE: [Axapta-Knowledge-Village] Re: Master planning and batch number flow through Thanks Harry once again for your help I tried with Batch number turned on for coverage but the batch number would not flow into the BOM line items, am I missing some setup that can allow this (I thought I would have to enable this as well as do some code change but your reply seems to suggest otherwise)? I am not sure of performance at this point but there is not a huge number of demand requirements or production orders so I am still tempted to go down this route, any idea where to start looking at the code to pass on the batch number to BOM sub items? Also taking your idea of scrolling up the pegging I guess I could also use it to actually populate the batch number field once the master planning has run right? I.e. actually have a value in the batch number field rather than just a display method. Thanks James _____ From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Harry Deshpande Sent: 17 September 2008 10:55 To: Axapta-Knowledge-Village@yahoogroups.com Subject: RE: [Axapta-Knowledge-Village] Re: Master planning and batch number flow through If u need it on the planned production orders then most likely you will have to enable planning by batch dimension. Either you do this or modify code to achieve the same effect. It will kill performance either way. Otherwise at the time of firming you can just scroll up the production order hierarchy to find the sale order and hence the batch number. Since the number of firmed orders are very less this should not mucho effect on performance. Another advantage will be very few code changes. If you really really want it on the planned orders you could write a display function to scroll thru hierarchy. Remember to display this field on any tab other than the overview tab. You do have a headache when multiple requirements are grouped together for e.g. multiple sales orders or minimum stock and sales order etc. Regards Harry Ps: Everything ok over here. Now it does not matter if the stock market goes down any further, I do not have any money left to lose anyway J From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of James Flavell Sent: Tuesday, September 16, 2008 7:02 PM To: Axapta-Knowledge-Village@yahoogroups.com Subject: RE: [Axapta-Knowledge-Village] Re: Master planning and batch number flow through Hi Harry Good to hear from you again, hope all is well for you and your family mmm I would say it would be far better to have on the planned production orders although it might be possible to get away with just at the time of firming. maybe you can explain a little more the possible pors/cons to have it on planning versus only at firming etc Thanks once again James _____ From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Harry Deshpande Sent: 17 September 2008 00:17 To: Axapta-Knowledge-Village@yahoogroups.com Subject: RE: [Axapta-Knowledge-Village] Re: Master planning and batch number flow through Hi Batch number of production order and sub-items. Do you also need them for planned production orders? Or rather is it a must-have functionality that you need to see batch number on planned production orders. Or is it enough if you get the batch number on the real production orders (i.e batch number introduced at the time of firming). Regards Harry From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of James Flavell Sent: Monday, September 15, 2008 11:03 PM To: Axapta-Knowledge-Village@yahoogroups.com Subject: RE: [Axapta-Knowledge-Village] Re: Master planning and batch number flow through Thanks Steve and sorry it has taken me so long to reply (lot of things happening good and bad) I understand what you have done but my focus at this point is more on the flowing of batch number through the master planning Basically what I want to do is if I have a sales order line for an item that is a BOM and I put a batch number on it, then when I run master planning I want the batch number to be put on the planned production order for the finished good (std AX does this) but also to flow through and be put on the BOMs sub item lines. The reason is actually for project based manufacturing where material is purchased for a specific project and so the whole operations from production and purchasing need to capture and work with this information (e.g. they cannot just buy 100 tons of item A as they need to issue purchase orders per project requirement and then track their inventory per project). I could do 'per requirement' planning but the tracking is a nightmare since you will only have AX marking to go by (and all its many realted problems) So there are 2 places for the flow through of batch number the way I see it: 1) During master planning when the system sees that the planned production order has a batch number it should pass the batch number on to the planned actions for the sub items (whether the action be a another planned production order or a planned purchase order). So basically the batch number flows all the way through the planning 2)If the user creates a production order directly from the sales line, the batch number for the production order should be set from the sales line adn the the batch number on the production order's picking list lines should be populated with the batch number on the production order headed (finished good's batch number) I think point 1 is the trickier bit but again I think its just I need to find the code where the batch number is not passed on to sub items in a BOM so I hope someone familair with the master planning class might be able to help point me in the right direction Thanks James _____ From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of slees32 Sent: 01 August 2008 10:06 To: Axapta-Knowledge-Village@yahoogroups.com Subject: [Axapta-Knowledge-Village] Re: Master planning and batch number flow through Hello James, I can't answer your question regarding planned orders but we are doing something similar so I thought I'd describe that and maybe it is of some help. We know our batch number when we create the sales order - in fact we are using the sales order number as the batch number. So when a sales order line is created, we have modified the code to go to the batch number table and create a new line. The modified code then also inserts the batch number in the existing field on the sales order line. At the moment we are always creating a production order from the sales order. We do not use planned orders in our process. And the batch number is automatically passed from the sales order to the production order (this is standard Axapta functionality). I do not know whether this same facility exists to pass the batch number to a planned order and then on to the purchase order - sorry. I should also add that our modified code has a bug we have not yet been able to isolate, where occassionaly, the batch number, although created, does not get added to the sales order. This is each to then add at receiving time so is not a huge issue for us - probably partly why we haven't fixed it yet. Regards - Steve AX 3.0 SP2 --- In Axapta-Knowledge- <mailto:Axapta-Knowledge-Village%40yahoogroups.com> [EMAIL PROTECTED], "James Flavell" <[EMAIL PROTECTED]> wrote: > > Thanks, > > It is basically that we purchase items for a specific sales and we need that > visiblity (marking just does not cut it especially when the flow goes > through several BOm levels and marking is also rather buggy from my > experience...). So we will do something like set the batch on the sales > order equal to the sales order number and want it to flow through > > Thanks > James > > > _____ > > From: Axapta-Knowledge- <mailto:Axapta-Knowledge-Village%40yahoogroups.com> [EMAIL PROTECTED] > [mailto:Axapta-Knowledge- <mailto:Axapta-Knowledge-Village%40yahoogroups.com> [EMAIL PROTECTED] On Behalf Of Krishnan > Sundararajan > Sent: 31 July 2008 18:57 > To: Axapta-Knowledge- <mailto:Axapta-Knowledge-Village%40yahoogroups.com> [EMAIL PROTECTED] > Subject: Re: [Axapta-Knowledge-Village] Master planning and batch number > flow through > > > > > Hi > > Logically batch numbers are created on completion of receipt transactions. I > dont understand the need for planning wrt to the sales order batch numbers. > If you book the sales order with the batch numbers it means the material is > lying in stock and hence need not planned at all. Please let me undertand > your scenario to put my thoughts on. > > Krish > > > On 7/31/08, James Flavell <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> com> > wrote: > > > > Hi everyone, > > I would like to do modification so that the batch number from a sales order > flows all the way through master planning so that my firmed purchase order > will have the batch number. > > I know there is marking but this is not visible enough to the user so I > would like to look at using batch number. > > Can any one direct me to where in the code I can look to be passing the > batch number on to the next ReqTrans being created in the planning etc? > Of course if anyone has any other ides how to address the problem please > feel free to share > > Thanks > James >