Part Configurator Problem E9 702A

I was hoping some of you could look over my code.
What I wanted the config to do:

  1. Sales Order (SO) is created with Part Number (PN) Drawer (which is a config with method rules), SO 12345
  2. SO gets date added to it
  3. MRP Runs
  4. Job is created that is Make-Direct to the SO, this Job is to make a Part Number that doesn’t exist on the item master (XXXXX-A1), Job 012345-1-1
    a. This job is Engineered, but not Firm and not Released
    i. Consist of a drawer, let’s call it part number XXXXX
    ii. Also consist of other options that bolt on or go into the drawer, let’s call this part number ZZZZZ
    iii. The part number of the Job would be XXXXX-A1 or similar to that, it’s the part number of the drawer, A is the option chosen and the 1 is for the qty
  5. MRP Runs
  6. Time phase shows that part number XXXXX and ZZZZZ are needed for 012345-1-1, but there is now MRP job to make a XXXXX or ZZZZZ, shows the Balance as negative
  7. Someone Firms and Releases Job 012345-1-1
  8. MRP Runs
  9. Now Time Phase shows MRP jobs to make both XXXXX and ZZZZZ

The problem:
The MRP Jobs are NOT being created.

The Code: Input Rules On Leave

*Page 1 On leave-----------------------------------------------------------------------*/
Define Variable varchrCompany as Character No-Undo. 

Assign CurOrderNum = GetCurrentOrderNum()
             CurOrderLine = GetCurrentOrderLine()
             CurQuoteNum = GetCurrentQuoteNum()
             CurQuoteLine = GetCurrentQuoteLine()
             VarChrCompany = GetCurrentCompany().

/*If CurOrderLine > 0 */
If CurOrderLine > 0 Then Find OrderDtl Where OrderDtl.Company = VarChrCompany and OrderDtl.OrderNum = CurOrderNum and OrderDtl.OrderLine = CurOrderLine. 

/*If Available OrderDtl */
If Available OrderDtl Then Do:
  Assign OrderDtl.DiscountPercent = gDiscPercent
  OrderDtl.OrderComment = gLineComments.
  OrderDtl.LineDesc = DrawerPNDesc.
End.
 
/*If CurQuoteLine > 0 */
If CurQuoteLine > 0 Then Find QuoteDtl Where QuoteDtl.Company = VarChrCompany and QuoteDtl.QuoteNum = CurQuoteNum and QuoteDtl.QuoteLine = CurQuoteLine.
                                   
/*If Available QuoteDtl */
If Available QuoteDtl Then Do:
  Assign QuoteDtl.DiscountPercent =gDiscPercent
  QuoteDtl.QuoteComment = gLineComments.
  QuoteDtl.LineDesc = DrawerPNDesc.
End.

LinePull = "True".



/*Assuming You Always Select a Drawer, Because Why Wouldn't You?*/
QL_10_QTY = 1.
QL_10_PART = DrawerPN.
QL_10_DESC = DrawerPNDesc.
QL_10_DISCUNITPRICE = DrawerDP.
QL_10_DISCPRICE = DrawerDP.

/*Now For The Various Options*/
/*Option 1*/
QL_20_QTY = Option1Qty.
QL_20_PART = Option1PN.
QL_20_DESC = Option1PNDesc.
QL_20_DISCUNITPRICE = Option1DP / Option1Qty.
QL_20_DISCPRICE = Option1DP.

/*Option 2*/
QL_30_QTY = Option2Qty.
QL_30_PART = Option2PN.
QL_30_DESC = Option2PNDesc.
QL_30_DISCUNITPRICE = Option2DP / Option2Qty.
QL_30_DISCPRICE = Option2DP.

/*Option 3*/
QL_40_QTY = Option3Qty.
QL_40_PART = Option3PN.
QL_40_DESC = Option3PNDesc.
QL_40_DISCUNITPRICE = Option3DP / Option3Qty.
QL_40_DISCPRICE = Option3DP.

/*Option 4*/
QL_50_QTY = Option4Qty.
QL_50_PART = Option4PN.
QL_50_DESC = Option4PNDesc.
QL_50_DISCUNITPRICE = Option4DP / Option4Qty.
QL_50_DISCPRICE = Option4DP.

/*Option 5*/
QL_60_QTY = Option5Qty.
QL_60_PART = Option5PN.
QL_60_DESC = Option5PNDesc.
QL_60_DISCUNITPRICE = Option5DP / Option5Qty.
QL_60_DISCPRICE = Option5DP.

/*Option 6*/
QL_70_QTY = Option6Qty.
QL_70_PART = Option6PN.
QL_70_DESC = Option6PNDesc.
QL_70_DISCUNITPRICE = Option6DP / Option6Qty.
QL_70_DISCPRICE = Option6DP.

/*Option 7*/
QL_80_QTY = Option7Qty.
QL_80_PART = Option7PN.
QL_80_DESC = Option7PNDesc.
QL_80_DISCUNITPRICE = Option7DP / Option7Qty.
QL_80_DISCPRICE = Option7DP.

/*Option 8*/
QL_90_QTY = Option8Qty.
QL_90_PART = Option8PN.
QL_90_DESC = Option8PNDesc.
QL_90_DISCUNITPRICE = Option8DP / Option8Qty.
QL_90_DISCPRICE = Option8DP.

/*Option 9*/
QL_100_QTY = Option9Qty.
QL_100_PART = Option9PN.
QL_100_DESC = Option9PNDesc.
QL_100_DISCUNITPRICE = Option9DP / Option9Qty.
QL_100_DISCPRICE = Option9DP.

/*Option 10*/
QL_110_QTY = Option10Qty.
QL_110_PART = Option10PN.
QL_110_DESC = Option10PNDesc.
QL_110_DISCUNITPRICE = Option10DP / Option10Qty.
QL_110_DISCPRICE = Option10DP.

Code: Inputs On Leave
Find Part Where Part.Company = GetCurrentCompany() and Part.PartNum = DrawerPN.
  If Available Part Then Do:
    DrawerPNDesc = Part.PartDescription.
    DrawerLUP = Part.UnitPrice.
    DrawerNS = Part.NonStock.
End.

Run MakeSS.
Run ListPrice.
Run DiscPrice.

/*Stuff to make things run*/

CurQuoteNum = GetCurrentQuoteNum().
CurQuoteLine = GetCurrentQuoteLine().
CurOrderNum = GetCurrentOrderNum().
CurOrderLine = GetCurrentOrderLine().

If CurQuoteLine > 0 Then Find QuoteDtl Where QuoteDtl.Company = GetCurrentCompany() and QuoteDtl.QuoteNum = CurQuoteNum and QuoteDtl.QuoteLine = CurQuoteLine.
If Available QuoteDtl Then Assign gDiscPercent = QuoteDtl.DiscountPercent.

If CurOrderLine > 0 Then Find OrderDtl Where OrderDtl.Company = GetCurrentCompany() and OrderDtl.OrderNum = CurOrderNum and OrderDtl.OrderLine = CurOrderLine.
If Available OrderDtl Then Assign gDiscPercent = OrderDtl.DiscountPercent.

Thanks in advance,

Jonathan

Jonathan,

I’m having trouble following once it gets to the end. It sound like when the job is not firm, the quantities for parts XXXX and ZZZZ are showing negative, then when marked firm and MRP runs it creates the jobs for you. Are you looking to see the jobs created earlier?

-Bobby

Hey Bobby! Thank you for looking at this.

Yes, that’s correct. So a Sales Order say 123456 Line 1 Release 1 is marked Make Direct. MRP creates a job for that Sales Order 123456-1-1 that isn’t released or firmed, but it’s still driving MRP to create the parts on the job 123456-1-1.

Jonathan Lang

No problem. Unfortunately my experience with MRP is pretty thin. It doesn’t sound like there is any problem with the configurator though. It sounds like you are wanting to change when MRP is creating jobs? If you want the job created immediately you could create from the sales order, Order Job Wizard. Based on my understanding of MRP it’s working as designed b/c the parts to make job 123456-1-1 would needed to be included in MRP to successfully schedule material.

-Bobby

Yeah, that’s what Configurator is for so you don’t have to manually configure jobs.Thanks anyway.

Are you sure your materials are setup for MRP? Also MRP won’t do anything until the Job is firm which I think you know already but just checking.

Hey Jose!

Thanks for responding!

Yes the materials are setup for MRP.

The second part of your answer is not exactly true. A Job doesn’t need to be firmed to drive demand for parts. I can have an Engineered job (Not firmed or released) drive component parts to be made.

That means I can release the parts (Firm, Release) needed for the SO Job before firming the SO Job. Because MRP sees that the linked parts to the SO Job are needed as well so it creates suggestions for those parts.

1 Like

Hmmm you are right I was thinking about Un-Firm Order Releases … those won’t trigger MRP jobs

If you manually create an order will MRP do its thing properly? So create an Order with a Part that uses the same material , will MRP pick it up?

Yes it will.