Skip to Content
author's profile photo Former Member
Former Member

Error con Modelo de Autorizacion con Consulta de usuario

Estimados foristas, deseo establecer un modelo de autorizacion, basado en una consulta de usuario, la idea es que si el monto total de una entrada de mercancias OP difiere de la orden de compra original, pida autorizacion.

La consulta que desarrolle es la siguiente:

SELECT DISTINCT 'TRUE' from opor t1 where t1.docentry=$[pdn1.baseentry] and t1.doctotal<>$[opdn.doctotal]

Cuando doy a salvar, me da un mensaje de Error interno, y deja pasar la entrada, aunque sea erronea.

Estoy con SAP B1 2007 SP 00 PL 47

Muchisimas gracias desde ya.


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on May 10, 2011 at 05:33 PM

    Intenta con

    declare @docbase as int
    declare @doctotal as int
    set @docbase =(select top 1 baseentry from pdn1 a join opdn b on a.docentry=b.docentry where b.docnum in (select $[opdn.docnum]))
    set @doctotal = (select doctotal from opdn where docnum in (select $[opdn.docnum]))
    select 'TRUE' from opor where docentry=@docbase and doctotal != @doctotal

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.