on 05-06-2013 7:02 AM
I want to restrict the Product Order to be raised in below condition.
for a sale order say 101 which contains 3 item say Item1, Item2, Item3.
Then Prod order should be raise for sale order 101 and for item1 only once. Means
Multiple production order based on a sale order for an item(finished goods) should be blocked..
Can anybody let me know how can i achieve this via Stored Procedure.
Thanks
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
You got to compare created production orders header items with saleorder Line items using a primary key as Salesorder number. You could even cross check the partial orders created and allow system to check quantites, in which case you need a new coloumn in production order to acheive this.
Regards
Venkatesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
tried with following sp, but not getting any fruitful result.
BEGIN
declare @a varchar(20)
set @a = (Select Distinct p.Series from OWOR p where p.Series = @list_of_cols_val_tab_del)
declare @b varchar(20)
set @b = (Select Distinct p.OriginNum from OWOR p where p.OriginNum = @list_of_cols_val_tab_del)
declare @c varchar(20)
set @c = (Select Distinct p.ItemCode from OWOR p where p.ItemCode = @list_of_cols_val_tab_del)
If ((select Count(*) from OWOR
where DocEntry in
(select Distinct a.DocNum from OWOR a
inner join NNM1 b on a.Series = b.Series
inner join ORDR c on c.DocNum = a.OriginNum
and c.CardCode = a.CardCode
inner join POR1 d on d.DocEntry = c.DocEntry
where
a.Series = @a
and a.OriginNum = @b
and a.ItemCode = @c
GROUP BY a.DocNum
)
)) > 0
begin
return false
end
end
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Try this...
IF
@transaction_type IN (N'A') AND (@Object_type = N'202')
BEGIN
if Exists (select T2.ItemCode,T0.OriginAbs,COUNT(*) from OWOR T0
INNER JOIN ORDR T1 ON T0.OriginAbs=T1.DocEntry
INNER JOIN RDR1 T2 On T2.DocEntry=T1.DocEntry AND T2.ItemCode=T0.ItemCode
WHERE T0.DocEntry=@list_of_cols_val_tab_del
GROUP BY T0.OriginAbs,T2.ItemCode
HAVING COUNT(*)=1)
BEGIN
SELECT @Error = 1, @error_message = 'Production Order Already Exist!'
END
END
Regards,
Shanmugam V.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if @transaction_type in ('A','U') and @object_type = '202'
BEGIN
if exists (select Distinct a.DocNum, a.ItemCode, a.CardCode, a.OriginNum,
a.Series, b.Series, b.SeriesName
from OWOR a
inner join NNM1 b on a.Series = b.Series
inner join ORDR c on c.DocNum = a.OriginNum and c.CardCode = a.CardCode
inner join POR1 d on d.DocEntry = c.DocEntry
where
a.Series = @list_of_cols_val_tab_del and a.OriginNum = @list_of_cols_val_tab_del and a.ItemCode = @list_of_cols_val_tab_del
GROUP BY a.DocNum, a.ItemCode, a.CardCode, a.OriginNum,
a.Series, b.Series, b.SeriesName
Having Count(*) > 0)
select @error = 1,@error_message = N'Production Order Control: Multiple Production Order Based on a sale order for an item are not allowed (Contact to Administrator) '
end
please let me know wht is wrong in above query
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Experts,
Production Order is not having object type, how can we write stored procedure to block production order...
please reply me asap.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
7 | |
7 | |
4 | |
3 | |
3 | |
3 | |
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.