Skip to Content
0
Mar 14, 2019 at 01:53 PM

Not Allowed to Make Delivery & Invoice Without Tracker ID

82 Views

Hi All,

if @object_type = '13' and @transaction_type in (N'A', N'U')
begin
if exists (select * from inv1 a
inner join oinv b on a.DocEntry = b.DocEntry
inner join oitm c on a.ItemCode = c.ItemCode
inner join OITB d on c.ItmsGrpCod = d.ItmsGrpCod
where a.DocEntry = @list_of_cols_val_tab_del
and ( c.ItmsGrpCod in('188','110') or c.ItemCode in('FBT04168', 'FBT04169', 'FBT04171', 'FBT04170'))
and Isnull(b.TrackNo,'')='')
Begin SET @error = 10101-01 SET @error_message = N'Tracker No is missing'
End
End

I need to some updation's in above query, please update with below details.

Find the attachment.dathulworkssap-community14-3-195.jpg

1. I want to block while adding two item groups in Delivery & Invoice , nd 4 item Numbers in Invoice without mention 'Tracker ID'.

* Item Group Code - '188 & 110'

* Item Number - 'FBT04168, FBT04169, FBT04171, FBT04170'

2. Please reply with 2 different query's

Attachments