Ramco Ramco

Ramco Ramco

  • 439
  • 3.4k
  • 544.3k

Stored Procedure

Nov 30 2023 4:45 AM

Hi

  I have below Stored Procedure & i want that it should not ask for Base document if Currecny <> INR & doctotal = 0
else in all condition it should ask for Base Document.

if exists(Select ItemCode from [dbo].[PDN1] T0
 Where T0.BaseEntry IS NULL 
   AND T0.DocEntry=@list_of_cols_val_tab_del)
begin
	SELECT @error = 33, @error_message = 'GRPO without Base Document !'
end

Thanks

 


Answers (1)