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

production order Qty update-urgent.

Hi all,

I want a query that must not allow me to update the Qty in the Production order.Once production order created from the MRP,it should not allow me to update any Qty at the production orer level what should be query its urgent.

mona.

thanx in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Aug 04, 2008 at 11:49 AM

    I suggest a little modification to the above code, to allow modifying the orders manually entered:

    IF (@object_type=202)
    BEGIN
    if (@transaction_type='U') 
     and 
      (select OriginType from OWOR
       where DocEntry=@list_of_cols_val_tab_del )='R'
    BEGIN
    	set @error = 1
    	set @error_message = 'Update Not Allowed in Production Order'
    END
    END
    -- Select the return values
    select @error, @error_message
    end

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 04, 2008 at 10:01 AM

    The following Code, when written inside the SP_TransactionNotification Stored procedure, doen not allow to update production order.

    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    
    
    
    ALTER proc [dbo].[SBO_SP_TransactionNotification] 
    @object_type nvarchar(25),     -- SBO Object Type
    @transaction_type nchar(1),   -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
    @num_of_cols_in_key int,
    @list_of_key_cols_tab_del nvarchar(255),
    @list_of_cols_val_tab_del nvarchar(255)
    AS
    begin
    -- Return values
    declare @error  int    -- Result (0 for no error)
    declare @error_message nvarchar (200)   -- Error string to be displayed
    select @error = 0
    select @error_message = N'Ok'
    --------------------------------------------------------------------------------------------------------------------------------
    -- ADD YOUR CODE HERE
    --------------------------------------------------------------------------------------------------------------------------------
    IF (@object_type=202)
    BEGIN
    if (@transaction_type='U')
    BEGIN
    	set @error = 1
    	set @error_message = 'Update Not Allowed in Production Order'
    END
    END
    -- Select the return values
    select @error, @error_message
    end
    

    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.