Skip to Content

SP TN for delivery serial numbers expiry date

Hi All,

Is it possible to use SP transaction notification to block adding delivery docket if any of the serial numbers selected expires with in the next 10 days?


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jul 22, 2016 at 02:34 PM

    Hi Dick,

    Please try below Query for your reference... & Change accordingly...

    IF @object_type = '15' AND @transaction_type IN ('A', 'U')


    IF EXISTS ( SELECT t4.ExpDate from ODLN T0 inner join DLN1 T1 on T0.DocEntry=T1.DocEntry

    left outer join SRI1 I1 on T1.ItemCode=I1.ItemCode and (T1.DocEntry=I1.BaseEntry and T1.ObjType=I1.BaseType)

    inner join OSRN T4 on T4.ItemCode=I1.ItemCode and I1.SysSerial=T4.SysNumber where T0.docentry = @list_of_cols_val_tab_del and t4.ExpDate>= (dateadd(day,10,getdate()))



    SELECT @Error = 1,

    @error_message = 'Expiration Date is next 10 date!!'

    --select dateadd(day, 10, getdate())




    Kamlesh Naware

    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.