on 06-01-2016 9:44 PM
Muy buen día apreciados Consultores
Tengo un procedimiento de autorización en la Orden de compra,
Pero al mismo tiempo tengo un Sp que no me permite Crear la orden de compra
si algunos campos no están Diligenciados ,
el Inconveniente es que como queda un documento en Borrador No me hace la validación del Sp, y luego que autorizan el Documento no se puede crear ya que faltaba diligenciar algunos campos, y después de autorizado el Documento no se me dejan modificar las Lineas
que puedo hacer
de antemano muchas gracias por su amable atención
Hola Gerardo Buenas tardes
lo he intentado pero no me funciona
mira
IF @OBJECT_TYPE IN ('15')
BEGIN
IF @TRANSACTION_TYPE IN ('A')
BEGIN
IF (SELECT COUNT(*) FROM ODRF WHERE ObjType ='22'
AND DocEntry = @LIST_OF_COLS_VAL_TAB_DEL) > 0
BEGIN
SET @ERROR=10
SET @error_message= '**SP: HACE FALTA INFORMACIÓN LINEA DE NEGOCIOS,LINEA DE PROYECTO, Y PROYECTO REVISA POR FAVOR'
END
END
END
Quedo atento a tus amables comentarios
Cordial saludo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Eres un gran maestro Listo me funciona Muchisimas gracias
IF @OBJECT_TYPE IN ('112') BEGIN
IF @TRANSACTION_TYPE IN ('A')
BEGIN
IF (SELECT count (*)
from odrf t0 inner join drf1 t1
on t0.DocEntry=t1.DocEntry
where (t1.OcrCode is null or t1.OcrCode2 is null or t1.Project is null)
and t0.Docentry = @LIST_OF_COLS_VAL_TAB_DEL)>0
BEGIN
SET @ERROR=10
SET @ERROR_MESSAGE= '***SP: HACE FALTA INFORMACIÓN: REVISA LINEA DE NEGOCIOS,LINEA DE PROYECTO, Y PROYECTO'
END
END
END
Desde Villavicencio Colombia un abrazo
Prueba direccionando tu SP hacia la tabla ODRF en lugar de la OPOR y nos comentas.
Saludos.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Quiero pensar que con SP te refieres al TransactionNotification. Tendrías que reorientar tu SP con la tablas de documentos preliminares (ODRF y DRF1), no hacia las tablas y objeto de Orden de Compra. Ya que primero se guarda como preliminar.
Saludos,
JC.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
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.