cancel
Showing results for 
Search instead for 
Did you mean: 

Delivery Triggers

0 Kudos

Hola, buen dia.
Estoy intentando poner un trigger en SAP al momento de generar una entrega, el problema es que al ponerlo en DLN1 y generar una entrega en SAP marca error de una conexión OCUPADA con la tabla DLN4, se cambio a DLN4 y marca error en DLN6 y de ahi a DLN12, en este ultimo marca un error: para generar este documento primero defina la serie de numeración en el módulo gestión, si se quita el tigger se puede generar correctamente la OV. pongo el trigger que quiero usar, espero me puedan ayudar

CREATE TRIGGER delivery ON DLN12 AFTER INSERT AS BEGIN DECLARE @cmd varchar(200) DECLARE @doc varchar(20) DECLARE @line varchar(20) DECLARE @item varchar(20) DECLARE @qty varchar(20) DECLARE @order varchar(20) select @doc=t3.DocEntry, @line=t3.LineNum, @item=t3.ItemCode, @qty=t3.Quantity, @order=t3.BaseEntry from INSERTED t1 INNER JOIN ODLN t2 on t2.DocEntry = t1.DocEntry INNER JOIN DLN1 t3 on t3.DocEntry = t2.DocEntry where t2.U_Origen_CRM = 'Y' SET @cmd = 'php C:\web\apps\stocks\delivery.php "'+@doc+'" "'+@line+'" "'+@item+'" "'+@qty+'" "'+@order+'"' EXEC xp_cmdshell @cmd END

former_member751591
Participant

Welcome to the SAP Community! We wanted to give you the opportunity to take the tutorial to get started in SAP Community, as it provides tips for preparing questions that draw responses from our members.

Additionally, by adding a picture to your profile you encourage readers to respond to your question. Learn more about your profile using Profile Tutorial

Thank you!

Accepted Solutions (0)

Answers (0)