on 2010 Oct 29 6:48 AM
Dear All,
My Client is working on SAP B1 2007 B PL 19. Now I have a issue in a sense, although I have not made issue to Production than also I can make Receipt from Production and also I can Close the Production Order.
Hence My question is, Is there any way that I can restrict the user to Close the Production Order when Partial or No Issue to Production is made.
Has anybody created a Stored Procedure for it.
Regards
Hitesh Parsawala
Hi Hitesh......
You can make it possible by executing SP for Production order where your users will not be able to close the Production order if its not fully issued or received...
This SP would be user specific......
Regards,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hitesh......
Try this......
If @object_type='202' and @transaction_type='L'
BEGIN
If Exists (Select T0.ItemCode OWOR T0 INNER JOIN WOR1 T1 ON T0.DocEntry = T1.DocEntry
Where (T0.[CmpltQty]<T0.[PlannedQty] or T1.[IssuedQty]<T1.[PlannedQty])
And T0.DocEntry = @list_of_cols_val_tab_del)
BEGIN
Select @error = -1,
@error_message = 'Production Order canot be closed'
End
End
Hope this would help you......
Regards,
Rahul
Hi,
Use below code in transcation notification procedure
--Block the receipt of production without issue of componet items
IF @transaction_type = 'A' AND @Object_type = '59'
BEGIN
IF EXISTS (SELECT T0.DOCENTRY FROM dbo.IGN1 T0 WHERE T0.DOCENTRY = @list_of_cols_val_tab_del)
BEGIN
DECLARE @entry INT
SELECT @entry = T0.BASEENTRY FROM dbo.IGN1 T0 WHERE T0.DOCENTRY = @list_of_cols_val_tab_del
IF EXISTS (SELECT T1.ITEMCODE, T1.PLANNEDQTY, T2.QUANTITY, T2.BASEENTRY AS [ISSUED QTY] FROM dbo.OWOR T0 INNER JOIN dbo.WOR1 T1
ON T0.DOCENTRY = T1.DOCENTRY LEFT OUTER JOIN dbo.IGE1 T2 ON T2.BASEENTRY = T0.DOCENTRY AND T1.ITEMCODE = T2.ITEMCODE WHERE T1.PLANNEDQTY > ISNULL(T2.QUANTITY, 0) AND T0.DOCENTRY = @entry AND T1.IssueType='M')
SELECT @Error = 1, @error_message = 'Receipt from Production cannot be done withouse issue of components'
END
ELSE
SELECT @Error = 1, @error_message = 'Receipt from Production cannot be done withouse issue of components'
END
--Block production order status to be closed without receiving the finished product
IF (@object_type = '202' AND @transaction_type= 'U')
BEGIN
if exists
(Select pl.PlannedQty
From OWOR p
inner Join WOR1 pl On pl.DocEntry=p.DocEntry
Where p.DocEntry = @list_of_cols_val_tab_del
and p.Status='L'
and pl.PlannedQty>pl.IssuedQty)
Begin
set @error =1
set @error_message = 'Production Order can not be Closed,Issue or receipt is not done yet'
End
END
Thanks,
Neetu
User | Count |
---|---|
100 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.