cancel
Showing results for 
Search instead for 
Did you mean: 

Good receipt PO

Former Member
0 Kudos

Hi all,

does anyone know how to protect quantity receipt not more than outstanding PO quantities?

for example, in my PO i have 20 pcs. then i only received 5 pcs in my first GRPO. so, the open PO quantity will be 15 pcs.

i need a protection message appear when i receipt more than 15 pcs in my next GRPO.

we tried to using stored procedure for this case, but that procedure also protect partial receipt.

does anyone can sharing with me about this case?

please help me. it's very urgent.

thanks

sisca

Accepted Solutions (1)

Accepted Solutions (1)

former_member583013
Active Contributor
0 Kudos

Sisca

Stored Procedure is the only way and I am sure it can be done. Please paste your original Stored proc code here and I will take a look.

Check this out

SELECT T0.BaseEntry, SUM(T0.Quantity) FROM [dbo\].[PDN1\] T0 INNER JOIN [dbo\].[POR1\] T1 ON T1.DOCENTRY = T0.BASEENTRY

WHERE T0.BaseType = 22 AND T0.ItemCode = T1.ItemCode AND T0.BaseLine = T1.LineNum

GROUP BY T0.BaseEntry

HAVING SUM(T0.Quantity) < SUM(T1.Quantity)

Suda

Former Member
0 Kudos

Hi suda,

Can u explain what stored procedure means.I dont know how to generate warning when the receipt exceeds the base document quantity.Is it an approval or alert?

Thanks in advance

Regards,

kannan

Former Member
0 Kudos

Hi Suda,

thanks for your response.

do you have any experience about this case?

your query that you post here, should i apply it in stored procedure?

thanks

Former Member
0 Kudos

Hi..

eh sisca, nemu jg. kok jauh2 sih..:p

_____________________________________________________________________________________

DECLARE @numlinii int

-


-- ADD YOUR CODE HERE

IF @transaction_type IN (N'A', N'U') AND (@Object_type = N'20')

BEGIN

SELECT @numlinii = (LineNum + 1) FROM PDN1

WHERE PDN1.DocEntry = @list_of_cols_val_tab_del AND

((Quantity > BaseOpnQty))

ORDER BY LineNum ASC

IF (ISNULL(@numlinii, 0) <> 0)

BEGIN

SET @error = 10

SET @error_message = N'YunPho TOP Bgt ' + CONVERT(nvarchar(4), @numlinii) + N' is invalid !'

--GOTO error_mesg

END

_______________________________________________________________________________________

HTH,

Yun Pho

Edited by: Yun Pho on Jan 30, 2008 2:17 PM

Answers (0)