Custom Attestation Procedure sililar to Approval Procedure D0 - Manager of shelfs department


We have business roles service items in it shop shelves assigned to departments.

We can use the D0 approval procedure to have the manager of the shelf's department approve the requests.

Now we need that manager to attest the ordered business roles.

There's no D0 attestation procedure.

Has anybody written or an idea how to write an attestation Procedure (SQL Query) similar to D0 from the attestation case?

Thanks for any ideas in advance