Creating a PO in a BPM - trying to marked approve

I am trying to create a purchase order in a BPM. I have successfully created the PO header and the PO lines but I’m having a hard time marking the PO as Approved.

When I did the trace, the method PO.ChangeApproveSwitch is called with parameters:
ApproveValue = true
ViolationMsg = ‘’
PODataSet

My lines in the BPM are:
poTableset.POHeader[0].RowMod = “U”;
poSvc.ValidateAcctForGLControl(poTableset.POHeader[0].PONum, out outMessage);
poSvc.ChangeApproveSwitch(true, out ViolationMsg, ref poTableset);
poSvc.CheckBeforeUpdate(out cOrderChangedMsgText, out taxableChangedMsgText, out vendorChangedMsgText, “POHeader”, poTableset);
poSvc.Update(ref poTableset);

Then I go to PO Entry and the PO is not marked approve.
What am I missing?

For the Buyer that is on the PO; is the PO above their limit?

This is a zero dollar PO…or more specifically, it is a Customer Managed PO…so zero dollar.

There are three fields that need to be set:

POHeader.Approve = TRUE
POHeader.ReadyToPrint = TRUE
POHeader.ApprovalStatus = “A”

If they aren’t all set, the PO will not appear as approved in the system.

So should I just set these values and Update or should I set these values before calling ChangeApproveSwitch ?

As far as I remember I’ve always set them on Update in Preprocessing.

Thanks Ernie. For now, I’m going to use your approach so I can keep moving but I am curious why my original approach didn’t work…but I’ll save that for another day.