cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding production order

Former Member
0 Kudos

Hi,

In production order, for example there are 4 items, enduser can not add or delete row items in that particular production order. Once raise the production order, if any one can add or delete any row that screen can not be updated. is there any restrictions to using stored procedure to block that production order or disable that update button.

Kindly provide the query for me.

Regards,

VRK

Accepted Solutions (0)

Answers (2)

Answers (2)

ganeshram_v
Explorer
0 Kudos

Hi VRK,

We can block the production order update when child item missing or different from bill of material.

Regards,

Ganesh

Former Member
0 Kudos

Hi VRK,

You can use Sp_TransactionNotification stored procedure to block the updation of "Released" production order. Please use following sp

GO

/****** Object:  StoredProcedure [dbo].[SBO_SP_TransactionNotification]    Script Date: 12/09/2013 11:52:49 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER proc [dbo].[SBO_SP_TransactionNotification]

@object_type nvarchar(20), -- 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 And @transaction_type in ('A','U'))

begin

if exists (select * from AWOR T0 where T0.DocEntry =@list_of_cols_val_tab_del and T0.Status ='R' )

begin

select @error =1

select @error_message ='You can not update prodution order'

end

end

-- Select the return values

select @error, @error_message

end

Please go through the following link

http://scn.sap.com/people/lisa.mulchinock/blog/2009/05/22/the-sptransactionnotification-stored-proce...

Hope this will help to resolve your issue.

Regards

Manoj

Former Member
0 Kudos

hi manoj

issue not resolve..  after run  this query, in SAP production order screen new items are added and deleted rows also successfully.

Former Member
0 Kudos

HI VRK,

It working successfully on my side. Please mention your SBO version, I tested it on 9.0 PL6.

Regards

Manoj

Former Member
0 Kudos

sap 9 PL 0