I am wanting to create a BPM to do a Mass issue to manufacturing to a job that is linked to the sales order line of the parts being shipped.
i am trying to eliminate the manual entry that is being performed when the job is complete. we are not using MES
clocking any operations, so i cannot just back flush the material.
I have written similar solutions in the past. It’s just a matter of tracing the manual process of the Mass Issue, then replicating it in code using adapter or BO (BO in your case in a BPM)
We’ve run into issues where we issue enough materials to make some of the job, and ship those before issuing anymore. It messes up the unit cost - unless you report qty’s.
Were you able to get this working? I believe I’m trying to do the same thing. I’ve made a post-processing directive on CustShip.UpdateMaster. However when I add the Mass Issue Tableset I get the following compile error.
There is at least one compilation error.
UpdateMaster.CommonTypes.cs(375,33): error CS0433: The type 'LegalNumGenOptsTable' exists in both
'Erp.Contracts.BO.CustShip, Version=10.2.200.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992' and
'Erp.Contracts.BO.MassIssueToMfg, Version=10.2.200.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992'
@OnurCam External methods are DLLs compiled from C# or VB. I’m not very knowledgeable with them, the embedded help has a section on them if you need a starting point though.
I have managed to make some progress, but it’s kinda a silly hack. I use a post-process on CustShip.UpdateMaster to parse a list of the jobs that require materials issued then calling UD110.UpdateExt to put that list onto the UD table. Then a post-process on UD110.UpdateExt uses the changed rows to call Mass Issue methods.
That sounds like a cool hack especially for people who are not much into programming DLLs. I will try to use it in another area where we had the same issue.
Happy to be able to help. It’s not too complicated though! It gives a nice log of all the submitting to mass issuance which is nice too. The only difference from my original reply was that I’m utilizing the job adjustments rather than mass issue to manufacturing.To break it down a little bit further:
Post processing method directive on CustShip.UpdateMaster
Checks which jobs need materials issued to them
Parses job numbers, shipment quantities (Will need to track an “unship” too if somebody unchecks the box to correct a pack), if the line is shipped complete, and some other reference info like date for the jobs that need issuance
Posts these records to UD110 via UD110.UpdateExt
Post Processing on UD110.UpdateExt
Parses the job numbers and quantities posted to UD110 from the post processing on CustShip.UpdateMaster
Uses those job numbers to post to job adjustments
Here is the CustShip.UpdateMaster Method Directive:
The method validates the ship state of the pack (just shipped/just unshipped). Uses it to set a flip, checks that there are valid lines on the shipment. Populates the UD110. Populates a job entry table, ensures that the jobs are set as engineered and released. Ensures UD110 has records, posts them, and then displays a message if there was any error.
Here is the post processing method directive on UD110.UpdateExt
It starts by populating the jobs that were just submitted into the jobs table. Then the StartAdjusments and GetAvailTranDocTypes methods of JobAdjustment are run. The adjustment quantity is then populated from the UD110 entries to the job adjustment table. Jobs are marked complete if line was marked complete. The JALabourDtl table is populated. The Validate rate method is run, the output message is checked if it is not null, displayed if it. Lastly these records are posted using the below code.
var jobAdj = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.JobAdjustmentSvcContract>(Db);
foreach (var job in (JobAdjustTable.Jobs)){
jobAdj.CommitLaborAdj(ref JobAdjustTable);
}
Again this is really a hack and I do believe that the external method route would be better (or perhaps the issue will eventually get resolved and you won’t have to work around) but it does work.