cancel
Showing results for 
Search instead for 
Did you mean: 

SAP B1 Transaction notification not working on AP invoice draft

former_member630601
Participant
0 Kudos

Hi All,

I have applied below validation for AP invoice those going for approval. But this validation is not working. any workaround.

IF (@object_type = N'112' and @transaction_type in (N'A',N'U'))
BEGIN
   	IF EXISTS 
(
SELECT ODRF.DocEntry FROM ODRF
INNER JOIN DRF1 ON ODRF.DocEntry = DRF1.DocEntry
          WHERE (DRF1.OcrCode IS NULL OR DRF1.OcrCode='') AND 
ODRF.ObjType='18' AND	ODRF.DocEntry= @list_of_cols_val_tab_del)
BEGIN
   SET @error = 1000
   SET @error_message = 'Department Can Not Be Blank'
   END
END


Accepted Solutions (0)

Answers (2)

Answers (2)

agustin_marcoscividanes
Active Contributor
0 Kudos

Hi

change your SQL statement and try this:

if (@object_type ='10000013') and (@transaction_type not in ('A','U'))

Kind regards

Agustín

former_member630601
Participant
0 Kudos

Thank you for the reply. Above solution is also not working. Even if we specify particular vendor code in the condition of TN then also it is not validating.

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

The above TN is working and getting blocked if AP Invoice dimension blank.

Note that, approval and TN does not trigger together. Deactivate approval for AP Invoice and then try.

Regards,

Nagarajan

Abdul
Active Contributor
0 Kudos

Try this isnull(DRF1.OcrCode,0) = 0 in where condition instead of DRF1.OcrCode ISNULL OR DRF1.OcrCode=''

Further kothandaraman.nagarajan Transaction notifications works with Approval procedure also if deployed on draft tables because during approval procedure data is saved in draft tables.

former_member630601
Participant
0 Kudos

isnull(DRF1.OcrCode,0) = 0 is not working. after AP invoice approved, If we check Dimension is blank or not then SAP will not allow to update data on row level. thats why we need validation while sending document to approval.

This validation is working perfectly for sales order draft also.

Regards,

Amey