Skip to Content
0
Jun 07, 2018 at 05:56 AM

Block From Adding Journal Voucher through transaction notification.

595 Views Last edit Jun 07, 2018 at 05:59 AM 2 rev

Dear Experts.

I have a condition to add journal voucher, where it is compulsory to fill in the distribution rule before adding.

Thus, i create a Transaction Notification to block user from adding the journal voucher when they miss out the distribution field as below:

However,when i tested the scenario, SAP prompted this error. Can someone help me to solve this issue? I have been searching inside the forum, but cannot find out what is the root of this error.

I applied the same transaction notification at AP Invoice and Outgoing Payment, it worked well.Only when it for Journal Voucher, this error appear.

[Microsoft][SQL Server Native Client 11.0][SQL Server]Conversion failed when converting the nvarchar value '31' to data type int. (CINF)

IF @object_type = '28' AND @transaction_type = 'A'
BEGIN
If EXISTS(SELECT T0.profitcode FROM [dbo].[btf1] T0 WHERE  T0.TransId  = @list_of_cols_val_tab_del AND T0.ProfitCode IS NULL )
BEGIN
set @error = 1
set @error_message = 'Field name Distr. Rule is must'
select @error, @error_message
END
end