3697055 – Approval procedure not triggered after editing approved drafts

Symptom

Approval conditions fail to retrigger the approval procedure when editing an approved document due to incorrect query syntax implementation.

Environment

SAP Business One

Resolution

By design the query automatically reads properties from the currently active window (OINV, ORDR, and so on in case of first approval; ODRF in case of approved documents).

For this reason, if the approval should apply also to approved documents, please follow these requirements:

  • Do not include a FROM table clause
  • Use column syntax instead of table references: For instance, for OINV.”CardCode” use: $[$4.0.0], for ODRF.”DocTotal” use: $[$29.0.number]

In addition, use IN-clause syntax instead of table JOIN for referencing related data.

Example of correct syntax:

SELECT DISTINCT ‘True’

FROM DUMMY

WHERE $[$4.0.0] IN (
SELECT T1.”CardCode”
FROM OCRD T1
INNER JOIN OCRG T2 ON T2.”GroupCode” = T1.”GroupCode”
WHERE T2.”GroupName” <> ‘SAP’
) AND $[$29.0.number] > 1

This example triggers approval when:

  • Business partner group is NOT ‘SAP’
  • Document total is greater than 1
  • Approval is retriggered when approved documents are modified

See Also

Picture of Trần Văn Sơn

Trần Văn Sơn

Với 18+ năm kinh nghiệm và 50+ dự án thành công, tôi chuyên giải quyết bài toán quản trị từ gốc rễ quy trình và con người. Phương châm của tôi là hướng doanh nghiệp vận hành theo chuẩn SAP B1 toàn cầu, đảm bảo hệ thống vận hành đơn giản, hiệu quả ở hiện tại và dễ dàng nâng cấp, mở rộng trong tương lai.
Thảo luận và chia sẻ kinh nghiệm
Bạn có gặp tình huống tương tự khi sử dụng hệ thống SAP Business One?

Bài có liên quan theo chủ đề đang xem

Scroll to Top