Skip to Content
0

SAP B1 Transaction notification not working on AP invoice draft

Apr 16 at 11:19 AM

44

avatar image

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


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Nagarajan K Apr 16 at 11:45 AM
0

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

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

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

0

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

0
Agustin Marcos Cividanes Apr 18 at 09:39 AM
0

Hi

change your SQL statement and try this:

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

Kind regards

Agustín

Show 1 Share
10 |10000 characters needed characters left 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.

0