on 03-10-2014 7:41 PM
Saludos a todos los Foreros...
Regreso nuevamente con una nueva necesidad, Tengo que realizar una TN donde un grupo de usuario no pueda realizar cambios en la cantidad Planificada, Claro si la Orden de Fabricación ya esta Liberada. se que tendría que irme al log de modificaciones pero no ubico como SBO relaciona esta ultima parte.
MI ejemplo es: X= No encontre el numero de Tabla que le corresponde al OWOR
IF @object_type = X and @transaction_type in ('U')
BEGIN
If exist (SELECT PlannedQty,LogInstanc
FROM OWOR|
WHERE (Status = 'L') and UserSign not in (1,47,48) and docentry = @list_of_cols_val_tab_del) and --Validación del Log de Modificaciones
begin
set @error = 3 | |
set @error_message = 'Usted no puede Modificar la Cantidad Planificada, Contacte a su supervisor' |
end
end
Saludos
Nelson
Buenas tardes
Prueba el siguiente código
if @object_type='202' and @transaction_type='U'
begin
declare @Line2 char(1)
set @Line2=(select top 1 'A' from OWOR T0 where T0.DocEntry=@list_of_cols_val_tab_del and T0.UserSign2 not in (1,47,48) and T0.PlannedQty<>(select top 1 A0.PlannedQty from AWOR A0 where A0.DocEntry=@list_of_cols_val_tab_del order by A0.LogInstanc desc))
if @Line2 is not null
begin
set @error=30000
set @error_message='TN: Usted no puede Modificar la Cantidad Planificada, Contacte a su supervisor'
end
end
Saludos
FLR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
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.