Skip to Content

SAP B1 Transaction notification not working on AP invoice draft

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


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 16 at 11:45 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • Apr 18 at 09:39 AM

    Hi

    change your SQL statement and try this:

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

    Kind regards

    Agustín

    Add comment
    10|10000 characters needed characters exceeded

    • 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.