TRANSACTION NOTIFICATION PARA ORDENES DE PRODUCCION

BUENAS TARDES. ALGUIIEN QUE ME PUEDA DECIR PARA QUE SIRVEN LAS SIG. LINEAS DEL TRANSACTION NOTIFICATION
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255) SE QUE ESTE TOMA EL VALOR DEL CAMPO CLAVE DE LA TABLA SOBRE LA CUAL HACEMOS EL CODIGO.
@list_of_cols_val_tab_del nvarchar(255)
Y SI ALGUIEN A CONSEGUIDO BLOQUEAR UNA ORDEN DE PRODUCCION PARA QUE NO PUEDA SER CERRADA SI NO HAN INGRESADO LOS PRODUCTOS QUE SE FABRICARON.

Hola...
Hace tiempo que no pasaba por acá, revisa el siguiente post..
Espero te sea de ayuda
Saludos,

Similar Messages

  • Transaction Notification para validar datos repetidos

    Buenos días,
      Tengo un problema, necesito crear un transaction N, para lo siguiente:
    Resulta que en pagos recibidos -- medios de pago -- cheque, quisiera validar que cuando el numero de cheque sea repetido entonces me arroje un error de que debe cambiar el numero de cheque, claro está que hay distintos bancos y los números de chuque podrían ser iguales, por lo que habría que validar que si el numero de cheque es igual siempre y cuando sea del mismo banco entonces se genere el error.
    Además ahí mismo en medios de pago, pero ahora en transferencias bancaria, quisiera validar en el campo de referencia (TrsfrRef), que cuando sea un mismo número de referencia entonces se genere un error.
    Agradecería mucho la ayuda para poder hacer esto.
    Muchas gracias por su atención.
    saludos.

    Buenos días,
    Floyola el código para la referencia en medios de pago sirve perfectamente pero ahora estoy intentando usar el mismo código para hacer los mismo pero ahora en el campo de referencia bancaria en el deposito.
    if @transaction_type in ('A','U') and @object_type = 25
    begin
    declare @Refe as Nvarchar(50)
    set @Refe = (select Ref2 from ODPS where DocEntry = @list_of_cols_val_tab_del)
    IF Exists (SELECT COUNT(Ref2) FROM ODPS WHERE Ref2 = @Refe HAVING COUNT(Ref2) > '1')
    begin
    set @error =100-1
    set @error_message ='Existe Número de Referencia Bancaria duplicado'
    end
    end
    Ese es el código que utilizo, el mismo que me pasaste pero cambiandole algunas cosas, pero me genera el siguiente error:
    Msg 207, Level 16, State 1, Procedure SBO_SP_TransactionNotification, Line 48
    Invalid column name 'DocEntry'.

  • Transaction Notification en Tablas de Usuario

    Buenos dias,
    Tengo la siguiente pregunta, se puede usar el SP Transaction Notification para validar el llenado de tablas de usuario y como lo hago???
    como determino el objectype????
    Gracias.
    Pasen buen dia.

    Buen dia Douglas,
    Las tablas de usuario no poseen ObjecType debido que el objec type es propio de las tablas de SAP Business one.
    Para poder colocarle Transaction Notification debes crear un UDO vinculado a tu tabla de usuario, en ese momento se crea el ObjectType a tu tabla de usuario.
    Saludos,
    Wuilmer Venegas

  • TRANSACTION NOTIFICATION, COMO BLOQUEAR CAMPO CARDNAME EN DATOS MAESTROS-SN

    COMO PUEDO PONER UN BLOQUEO EN EL TRANSACTION NOTIFICATION PARA QUE NO SE PERMITA MODIFICAR EL CAMPO DE RAZON SOCIAL (CARDNAME) NI CONDICIONES DE PAGO (GROUPNUM) DE DATOS MAESTROS DE SOCIOS DE NEGOCIOS (OCRD)??
    GRACIAS DE ANTEMANO A TODOS.

    MUCHAS GRACIAS, ME SIRVIO TU RESPUESTA PARA VER COMO IBA A SACAR EL ULTIMO CAMBIO DE X SOCIO DE NEGOCIOS.
    LO QUE PUDE CONSTRUIR FUE ESTO:
    -- BLOQUEO DE RAZON SOCIAL EN DATOS MAESTROS SN
    -- Aqui le decimos que actue solo cuando el tipo de objeto sea 2 (Ventana de Socios de Negocios, y cuando este en modo Crear y Actualizar)
         IF @object_type = 2 and @transaction_type in ('U')
              BEGIN
              -- Declaramos una variable que guarde el valor de la razon social de SN
              declare @newname varchar(100)
              --en la sig. consulta el nombre de razon social que estamos llenando lo guardamos en @newname
              Select @newname=cardname from ocrd where cardcode=@list_of_key_cols_tab_del
              --En la consulta anterior no estoy seguro si este correcto utilizar @list_of_key_cols_tab_del para que se tome el valor
              --del cardcode del campo que estamos llenando de razon social.
              if @newname <> (select CardName from acrd where CardName=@list_of_key_cols_tab_del and LogInstanc=(select max(loginstanc)
              from acrd where CardCode=@list_of_key_cols_tab_del and cardcode=@list_of_key_cols_tab_del))
              --en consulta anterior se compara si el valor nuevo a guardar o actualizar es diferente al que ya existe en la tabla de historial de SN
                   begin
                   set @error = 1
                   set @error_message = 'Acceso denegado para cambio de Razon Social'
                   end
              END
    --END
    MUCHAS GRACIAS POR SU AYUDA..

  • Ejecutar Transaction Notification

    Hola, buenas tardes, quisiera saber si me pueden ayudar con el siguiente escenario:
    Al crear una orden de venta se solicita una autorización y necesito ver si esposible ejecutar un Transaction Notification antes de solicitarla
    De antemano muchas gracias

    Hola..
    Imagino que habla de un procedimiento de autorización. Este tipo de procedimiento tiene condiciones. Si el caso es que la condición por defecto es siempre, puede modificar este criterio al cumplimiento de una condición. Luego podría crear un campo de usuario (el llenado de este campo sería la condición) que permita evitar el proceso de autorizacion. Luego su transaction notification incluye todas las validaciones que ud. necesita y obliga al usuario a llenar además este campo de usuario, para que una vez regularizado el documento....al momento de crearlo, el procedimiento de autorización se base en la condicion de campo de usuario con información.
    Realice las pruebas y nos comenta los resultados,
    Espero sea de ayuda
    Saludos Cordiales,

  • Unique Value Transaction Notification

    Hi Experts
    I have a problem in Transaction Notification
    I have a one UDF and i dont want to repeat the value . so i want to restrict if the value has repetead then system block me to add the sales invoice .
    my code is
    If @transaction_type = 'A' And @object_type = '17'
    Begin
    if exists (
    select u_dd_amt from ordr a where exists
    (select 1 from ordr where u_dd_amt =
    a.u_dd_amt)
    and  u_dd_amt =
    @list_of_cols_val_tab_del
    Begin
         select @error = 1, @error_message = 'Duplicate value not allowed in DD Amount field'
       end
    end
    the always error msg occured whenever i type any valye in UDF field please help me

    Buen dia Douglas,
    No es posible realizarlo ya que como tu indicas no tiene un Objtype, para poder realizar un transaction debe existir un Objtype.
    Saludos,
    Wuilmer venegas

  • Transaction Notification - Consulta

    Hola Comunidad SAP en español,
    Quiero consultar de que manera puedo hacer lo siguiente en el transaction notification:
    Necesito que cuando una orden de venta sea ingresada, la misma pueda ser modificada en sus valores, siempre y cuando se mantenga el precio establecido y que uno de los campos de usuario sea  el mismo.
    Como puedo realizar esto?
    Muchas Gracias.
    Saludos,
    Guillermo.-

    Revisa estas soluciones que propuse, te pueden dar una idea
    [Re: TRANSACTION NOTIFICATION, COMO BLOQUEAR CAMPO CARDNAME EN DATOS MAESTROS-SN]

  • Transaction Notification en Proceso de Autorizacion

    Sera posible ejecutar un Transaction Notification, en el momento que se aprueba un documento?
    Ejemplo:
    Recibe la alerta de solicitud de aprobación, elije Aprobar y luego da click en el boton OK o Aceptar.
    Mi pregunta es: en ese momento que le da Click, es posible ejecutar un Transaction Notification, debido a que revise la tabla
    OWDD y WDD1 y no tiene un objtype propio, o no es reconocido como un Documento.
    En espera de sus Repsuestas.
    Gracias anticipadas.

    Buen dia Douglas,
    No es posible realizarlo ya que como tu indicas no tiene un Objtype, para poder realizar un transaction debe existir un Objtype.
    Saludos,
    Wuilmer venegas

  • Inyeccion de orden de produccion

    Estimados, temgo problemas con el campo due date al intentar inyectar una orden de produccion por el DTW el cual no he podido solucionar, si alguien tiene alguna sugerencia se las agradeceré.
    Saludos
    Walter Oliva

    Saludos Walter,
    Gracias por los detalles, el mensaje de error observado podria ser generado por el uso incorrecto del formato de fecha. Como explicado en la nota 886339, para las version DTW 2005 en adelante el formato es YYYY/MM/DD.
    Adiconalmente este error podria estar vinculado a todo UDF en uso.
    Les pedimos verifiquen lo anterior.
    Queda a sus gratas ordenes,
    Juan Manuel Marrero
    SAP Business One Forums Team

  • SBO_Post Transaction Notification

    SBO_Post Transaction Notification
    Hi Experts!,
    I´d like to get information about this Stored Procedure, can somebody give me any link, papers, etc?
    Regards,
    Ronald

    Hi Ronald ,
    Files are located in SBO_Knowledge_village group and below i paste is the link ,
    Jimmy Michael (See top contributors Gordon,Suda,..Jimmy) is the moderator of the form .Ask him to join you in this group . You can acess more documentation .
    http://tech.groups.yahoo.com/group/SBO_Knowledge_Village/files/Files/
    Thank you
    Bishal

  • Outgoing Payment Transaction notification...

    Hi all,
    I designed the following Transaction notification for outgoing payment.It is working well If doctype is 'C' or 'S'. I want to do this for Doctype 'A'. But not successful....
    Waiting for your replies..
    IF @transaction_type = 'A' AND @object_type = '46'
    BEGIN
    --If exists (SELECT T0.docentry  FROM OVPM T0 where t0.docentry = @list_of_cols_val_tab_del and T0.cashsum>=20000000)
    --     begin
    --          SET @error = 10
    --          SET @error_message = N'You cannot Pay Cash More than Rs. 2000/-'
    --     end
    If not exists (SELECT T0.docentry  FROM OVPM T0  where t0.docentry = @list_of_cols_val_tab_del and
    (((t0.cardcode like '%%VDLI%%' or t0.cardcode like '%%CDLI%%' ) and t0.Series = '61' and (t0.doctype = 'S' or t0.doctype = 'C'   ))
    or ((t0.cardcode like '%%VAHD%%' or t0.cardcode like '%%CAHD%%' ) and t0.Series = '64' and (t0.doctype = 'S' or t0.doctype = 'C'  ))
    or ((t0.cardcode like '%%VMUM%%' or t0.cardcode like '%%CMUM%%' ) and t0.Series = '63' and (t0.doctype = 'S' or t0.doctype = 'C'  ))
    or ((t0.cardcode like '%%VLDH%%' or t0.cardcode like '%%CLDH%%' ) and t0.Series = '66' and (t0.doctype = 'S' or t0.doctype = 'C' ))
    or ((t0.cardcode like '%%VKOL%%' or t0.cardcode like '%%CKOL%%' ) and t0.Series = '62' and (t0.doctype = 'S' or t0.doctype = 'C' ))
         begin
              SET @error = 11
              SET @error_message = N'BP Code,Location ,Series ,Tax code combination does not match'
         end
    END
    Regards
    Deepak tyagi

    Hi Deepak,
    Try this way:#
    if @object_type='46'
    BEGIN
          IF @transaction_type='A' OR @transaction_type='U'
          BEGIN
                DECLARE @OPCHDocEntry int
                DECLARE @OPCHDocType nvarchar(1)
                 SET @OPCHDocEntry = CAST(@list_of_cols_val_tab_del as int)
                SET @OPCHDocType = (SELECT DocType FROM OPCH WHERE DocEntry=@OPCHDocEntry)
            IF @OPCHDocType in ('S','C')
                BEGIN
                    If not exists (SELECT T0.docentry  FROM OVPM T0  where t0.docentry = @list_of_cols_val_tab_del and
                                  (((t0.cardcode like '%%VDLI%%' or t0.cardcode like '%%CDLI%%' ) and t0.Series = '61' and (t0.doctype = 'S' or t0.doctype = 'C'   ))
                                  or ((t0.cardcode like '%%VAHD%%' or t0.cardcode like '%%CAHD%%' ) and t0.Series = '64' and (t0.doctype = 'S' or t0.doctype = 'C'  ))
                                  or ((t0.cardcode like '%%VMUM%%' or t0.cardcode like '%%CMUM%%' ) and t0.Series = '63' and (t0.doctype = 'S' or t0.doctype = 'C'  ))
                                  or ((t0.cardcode like '%%VLDH%%' or t0.cardcode like '%%CLDH%%' ) and t0.Series = '66' and (t0.doctype = 'S' or t0.doctype = 'C' ))
                                  or ((t0.cardcode like '%%VKOL%%' or t0.cardcode like '%%CKOL%%' ) and t0.Series = '62' and (t0.doctype = 'S' or t0.doctype = 'C' ))
                        begin
                                            SET @error = -1000
                                            SET @error_message = N'BP Code,Location ,Series ,Tax code combination does not match'
                        end
                END
             IF @OPCHDocType ='A'
             BEGIN
               If not exists  (SELECT T0.docentry FROM OVPM T0 INNER JOIN VPM4 T1 ON T0.DocEntry = T1.DocNum and t0.docentry = @list_of_cols_val_tab_del and
                                                 (t1.acctcode like '%%ADLI%%' and t0.Series = '61' and  t0.doctype = 'A' and T1.LocCode = '1' )
                                                 or (t1.acctcode like '%%AAHD%%' and t0.Series = '64' and  t0.doctype = 'A' and t1.LocCode = '2' )
                                                 or ( t1.acctcode like '%%AMUM%%' and t0.Series = '63' and  t0.doctype = 'A' and t1.LocCode = '3' )
                                                 or ( t1.acctcode like '%%ALDH%%' and t0.Series = '66' and  t0.doctype = 'A' and t1.LocCode = '5')
                                                 or ( t1.acctcode like '%%AKOL%%' and t0.Series = '62' and  t0.doctype = 'A' and t1.LocCode = '4')
                BEGIN
                            SET @error=-1001
                            SET @error_message = N'BP Code,Location ,Series ,Tax code combination does not match'
            END   
          END
    END
    END
    Thanks,
    Neetu

  • Transaction Notification for Restrict user to delere row but new item addition will allowed in Production Order

    Dear All Experts,
    My client having some custom requirement in Production Order.
    1) When Production Order will created and its status will released then it will allowed user to update any quantity of any items or add any new items but it will not allowed to delete any items from row level.
    2) When any item will be deleted then our transaction notification will be raised.
    I created one Transaction Notification Code but it will restricted to update anything or delete.
    IF (@transaction_type = 'A' or @transaction_type = 'U') AND @object_type = '202'
    BEGIN
    Declare @VisOrder1 nvarchar(255)
    Set @VisOrder1=(SELECT Top 1 T1.VisOrder+1 FROM OWOR T0 INNER JOIN WOR1 T1 ON T0.DocEntry = T1.DocEntry 
    WHERE (T0.Status = 'R' and T1.VisOrder=(select TOP 1 VisOrder from wor1 where DocEntry=@list_of_cols_val_tab_del order by VisOrder Desc)))
      If @VisOrder1 >0
      begin
      SET @error = 231
      SET @error_message =  'You have not rights to delete any Item - Please Contact System Administrator ' + @VisOrder1
      end
    END
    Please help me for solve this problem.
    I wait for your warm replay.
    Thanks & Regards,
    Nishit Makadia

    Hi,
    Please check these threads. Let me know your feedback.
    http://scn.sap.com/thread/3518208
    http://scn.sap.com/thread/3545101
    Thanks & Regards,
    Nagarajan

  • Transaction Notification with DI Server

    Hello
    I am developing a Web Site with the DI Server, when I have validations in the Transaction Procedure the error  message is incorrect.
    Message: Could not commit transaction.
    Transaction Notification
    set @error='10'
    set @error_message = 'SP: 123'
    -- Select the return values
    select @error, @error_message
    end
    I made the test with the DI - API  and the message is correct.
    Exists a workaround for this problem???
    Thanks
    Regrats
    Edited by: Andres Naranjo on Sep 1, 2010 1:25 AM

    Hello
    This problem was solved in SAP Business One 8.8 PL20.
    Regards

  • Approval procedure vs Transaction Notification

    Hello dear experts,
    I have an issue with the approval procedures and the validations I have to do using the Transaction Notificacion Stored procedure.
    this is the scenario and conditions to consider:
    1.A purchase order (Doctotal) that are between 0 and 25,000 USD needs an approval.
    2. A purchase order needs to have all the project column filled in before the approval procedure. this column is in the detail of a document, so all the rows have to be filled in with the right project code otherwise when your request have been submmited and your receive the approval you are not allowed to do any changes in the Detail Document.
    I realized that the approval procedure is launched before the Transaction Notification SP.
    So I decided to add a query for the approval procedure considering the validations in the project column:
    SELECT distinct 'true'
    FROM OPOR
    WHERE $[OPOR.DocTotalSy.number] Between 0 and 24999.99   ---This part works perfeclty!!!
    AND LEN(isnull($[POR1.Project.0],''))>0 and $[POR1.U_SubJob.0]>0  )  --This part does not work
    As you see in the query, I am trying to validate that all the rows have the project code (Project) and a UDF (U_SubJob) filled in.
    Have anybody been done this before? How can I access to the detail values of the document? It is easy to acces values on the header.
    I appreciate any help on this. Thank you very much
    Regards,
    Mary

    Hi,
    You must use both in approval procedure or use both in SBO store procedure transaction notification.
    To request approval for a project, you this following approval query:
    if (SELECT $[$38.31.0]) > ' '
    select 'true'
    the other query is for doctotal approval as follows:
    if ($[opor.doctotalsys.number]) between 0 and 24999.99
    SELECT 'true'
    or
    select distinct 'true' FROM OPOR
    WHERE $[OPOR.DocTotalSy.number] Between 0 and 24999.99
    Both are able to use and work simultanously.
    JimM

  • Transaction Notification for Blocking Batch

    Dear Experts,
    I am facing a critical situation. My Client wants to Block the material movement  if it is not inspected through Quality Personal. I have already Locked batches through General Settings > Inventory > Batch Status . But it only blocks the batches for Goods Issue and Receipts Transactions. It is not working in case of Inventory transfers.
    I have created UDF on GRPO called U_InspStatus where by default value is Pending once the Quality personal changes the UDF value to Completed then only the batch should be able to move through Inventory Transfer.
    Can anyone help me in creating Transaction Notification on Inventory Transfer Document  which can block batches if there status is pending ?
    Waiting for your replies.
    Regards,
    RK

    Hi Naga,
    Please find below mentioned answer to your queries -
    1. Inventory transfer done by means of posting inventory transfer document? - Yes
    2. Inventory transfer as applicable to customer not vendor. How do you select vendor in inventory transfer document? - Not selecting the customer in Inventory Transfer document not required I am moving material from one warehouse to another.
    3. How did you update inspection status in inventory transfer document - Inspection status is updated in Quality Add on and not in Inventory Transfer. But if I am transferring material from one warehouse to another without Inspection then it should block the batch whose Inspection status is pending.

Maybe you are looking for

  • Closing characteristic after a time period

    Dear All, I am looking for a way to close an inspection charcateristic automatically after a certain time period. I have 3 characteristics for my inspection lot. The first should be closed 20 hours after generation of the inspection lot. The second 1

  • Audio Cache read only error

    HI there First time post -- MAC user We are getting an error message on our FCP G4 that is not allowint us to access an existing projects. The error message says Audio Cahce I/O error ready only. Any suggestions on how we can trouble shoot this? We'r

  • Sring to Object Array problem

    Hi every body, I have string in following format String s= "root, new Object[]{Folder1,SubA,SubB},Folder2,new Object[]{Folder3,SubC,SubD}, new Object[]{Folder4, new  Object[]{SubE,SubSubA}}";And I want to convert in following form Object[] hierarchy=

  • Oracle 10g and 11g diff

    Dear Frineds previously i am usning 10g rt now i have installed 11g can u tell me the exact differance between 10g and 11g how can i find this practilcally, thanks

  • Live cache Consistency

    Hi Folks, Seeks your help urgently.. I am executing the transaction code  /n/sapapo/om17 with object type as product location combination  to check the LIve Cache consistency. But its getting stuck in the sense when it comes to Pegging Id check.. It