new to group new to open edge bpm programming

Posted by mtrzaska on 11-Dec-2013 16:19

Hello all, I am, at best a beginner with open edge .p programs. I am requesting help. But first here is background info on our system. We currently are using OpenEdge Release 10.1B0333 as of Mon Sep 15 11:02:51 EDT 2008. Epicor Vantage 803.410 I am trying to create a very simple bpm once a bam is triggered. the bpm is to simply state that a job operation qty completed has reached the run qty. along with that there would various other fields that would be in the e-mail further describing the job. I don't know if im in the wrong place. I am sure that this is child's play for most of members in this group. But like a baby, you have to crawl before you walk. {ud/GlbAlert.i &TableName = "JobOper"} assign SendEmail = false. Define variable Planner as character no-undo. define variable EmailAddress as Character no-undo initial '':U. define variable UserName as Character no-undo initial '':U. define variable vFrom as character no-undo initial '':U. define variable vTo as character no-undo initial '':U. define variable vCC as character no-undo initial '':U. define variable vSubject as character no-undo initial '':U. define variable vBody as character no-undo initial '':U. Find UserFile where UserFile.DCDUserID = DCD-UserID no-error. assign Username = Userfile.Name. assign EMAIL-From = UserFile.EmailAddress. Message " In JobOperEmail". Find UserFile where UserFile.DCDUserID = ProdGrup.PersonID no-lock no-error. assign vTo = UserFile.EmailAddress. /* Create the new body of the email */ Assign vBody = "Need By Date changed for Part # " + OrderDtl.PartNum + " by " + UserName + "~n~n~tCustomer " + Customer.CustID + "~n~n~tPart " + OrderDtl.PartNum + "~tPart Description: " + OrderDtl.LineDesc + "~n~n~tQty: " + trim(string(OrderRel.OurReqQty)) + "~tpc" + "~n~n~tOrder Number: " + string(OrderRel.OrderNum) + "~tLine Number: " + string(OrderRel.OrderLine) + "~n~n~tOld Need By Date " + string(OLDOrderRel.NeedByDate,"99/99/99") + "~n~n~tNew Need By Date " + string(OrderRel.NeedByDate,"99/99/99"). vCC = "Mtrzaska@stanleymachining.com;ertrzaska@stanleymachining.com;cmikucki@stanleymachining.com;gjez@stanleymachining.com;". /* CC to check out alert */ /* Exampes of formatting and conditions */ /* "~n~n~tMA Cost ~t" + string(Part.StdMaterialCost,"$>>>,>>>,>>9.99") + "~tExtended Cost " + trim(string(Part.StdMaterialCost * OrderRel.XOrderQty,"$>>>,>>>,>>9.99")) + "~n~tPO Cost ~t" + string(OrderRel.UnitCost,"$>>>,>>>,>>9.99") + "~tExtended Cost " + TRIM(string(OrderRel.UnitCost * OrderRel.XOrderQty,"$>>>,>>>,>>9.99")) + if (CostAtPO - CostAtStd) > 50 then do: assign vTO = vTO + "info@comp.com;". end. if (CostAtPO - CostAtStd) > 1000 then do: assign vCC = vCC + "sales@comp.com;". end. */ Message "DEBUG Email - vTO = " + vTO. EMAIL-To = vTO. EMAIL-CC = vCC + EMAIL-From. assign EMAIL-Subject = 'Need By Date Has Changed on Sales Order ' + string(OrderRel.OrderNum). assign EMAIL-Text = vBody. If Customer.CustID = "VETCOGRA" then assign SendEmail = true. I do know that the fields are incorrect in most of this code. the table name I use is joboper and the trigger fields are qtycompleted and runqty. I understand that this is half of any info that you would need. but if someone out there can guide my to either a book that maybe consists of examples. or understands what im asking for and would offer help would be appreciated.

Posted by Jean Richert on 16-Jan-2014 09:03

Sorry for the delay. Based on your description you should be able to write a piece of ABL code get what you're trying to do but as you are using an Epicor product, may I suggest you post your question to the Epicor users group forum or even to Epicor themselves. 

All Replies

Posted by Jean Richert on 16-Jan-2014 09:03

Sorry for the delay. Based on your description you should be able to write a piece of ABL code get what you're trying to do but as you are using an Epicor product, may I suggest you post your question to the Epicor users group forum or even to Epicor themselves. 

This thread is closed