Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9159

Re: SP Valirdar documento.

$
0
0

Estimado

Utilize el siguiente codigo

if @transaction_type = ('A') and @object_type = 59 
begin      declare @Refe as Nvarchar(50)        set @Refe = (select U_NumPorcipos from OIGN where DocEntry = @list_of_cols_val_tab_del)      if exists (select count(A.U_NumPorcipos) from OIGN A INNER JOIN IGN1 B on A.DocEntry=B.DocEntry where A.U_NumPorcipos = @Refe AND B.WhsCode IN (select distinct C.WhsCode from IGN1 C where C.DocEntry=@list_of_cols_val_tab_del) having count(A.U_NumPorcipos) > 1)        begin           set @error =-5000           set @error_message ='SP:Existe Número de Referencia duplicado'      end 
end

 

Saludos cordiales

Felipe Loyola


Viewing all articles
Browse latest Browse all 9159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>