BPM to stop printing pack slip if last Oper is not complete

Hello -

We have a BPM that should stop the end user printing packing slips if the last operation is not completed.

Script

	find JobHead where jobhead.JobNum = ttshipdtl.JobNum and jobhead.JobComplete  = false no-error.
	if Available JobHead then do: 
	
	{lib/PublishInfoMsg.i &InfoMsg = '"For Shipment the Job should be Completed !"' &InfoSeverity = {&MESSAGE_ERR}}.
	end.
end.

The error show up find, but the form fill out in customer ship entry and the end user is able to print off a pack slipā€¦ Is there any way i can clear the form so the end user connect enter data when this error is displayedā€¦

Kind of a hackā€¦ How about you set a user field in the Shiphead table, update the PackSlip RDD to include the userfield, and then edit the Report style to hide the contents of the report when that user field is set.

Or even better, have the Report show ā€œJOB OPERATIONS INCOMPLETEā€ on the packer.

One pro of this is the shipper not having to redo the packer (unless you want them to for timing issues between packer generation and job material/operations changes)

A con would be that they can still mark the Packer as shipped, even if a ā€œblankā€ packer was printed.

Use the same BPM to stop the line from being added to the Customer Shipment. If it canā€™t be added to the shipment, it canā€™t be printed on the Pack Slip.

1 Like

Iā€™ am using the GetRows function but it seems to be pass the error and still can printā€¦

Try using the Update method to stop adding the line to the shipment.

Hi,

Yes i did give that a try and no luck with update method.

CODE ____

find ttshipdtl where ttshipdtl.RowMod=ā€œAā€ or ttshipdtl.RowMod=ā€œUā€ no-error.
if Available ttshipdtl then do:
if ttshipdtl.JobNum <> ā€œā€ then do:
find first JobOper where joboper.JobNum = ttshipdtl.JobNum and joboper.Opcode = ā€˜FGRecvā€™ and joboper.OpComplete = false no-error.
if Available JobOper then do:

	{lib/PublishInfoMsg.i &InfoMsg = '"LM - This JOB contains an Operation THAT IS NOT COMPLETE... PLEASE DO NOT SHIP THIS LINE, DELETE the LINE and complete the operation before trying again"' &InfoSeverity = {&MESSAGE_ERR}}.

CODE___

Try this. No code necessary.

1 Like

I do this kind of stuff with ABL on CustShip.UpdateMaster

1 Like

great thanks for info.