on 09-23-2011 3:42 AM
Hola que tal quisiera hacer lo siguiente, que cuando se haga una factura se actualize un campo de usuario llamado Guias el cual contiene el numero de las entregas.
Esto quiero hacer atraves del Transaction Notification. Osea que al momento que se cree la factura internamente haga un update al campo de usuario llamado Numero de Entregas y contenga los numeros de las entregas.
Actualmente tengo una BF pero no me funciona como quiero asi que quiero que se haga atravez de un update al crear la factura se que se puede hacer atraves del Transaction.
Este es el SP para que me acumule los numero de las entregas
ALTER PROC [dbo].[QA_Guias_de_Remision]
@docentry real -- Variable: numero de la factura
AS
BEGIN
--DECLARACION DE VARIABLE
DECLARE @CONTENIDO AS VARCHAR(250)
--SETEO DE VARIABLE
set @contenido=''
--ACUMULACION EN LA VARIABLE DE LOS CAMPOS QUE NECESITO
SELECT TOP 10 @contenido=@contenido+U_BPP_MDSD + '-' + U_BPP_MDCD + ', ' from ODLN
where Docnum in (select baseref from inv1
where docentry = @docentry and basetype=15)
--MUESTRO EL CONTENIDO
select @contenido
END
Espero me puedan ayudar.
Saludos
QA-Jesus
Jesus, no es recomendable hacer updates a campos de usuario si estos se encuentran en Tablas del sistema
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
14 | |
10 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.