I have created a Crystal Report which has a column that contains the POLINE.REC_QTY field. The report has two parameters (Start and End date based on POLINE.REC_ACT_DATE) for a date range. At the end of the report, I total the POLINE.REC_QTY column.
The users of the report are comparing the Crystal Report’s POLINE.REC_QTY total to the “Location Totals Receipt” total at the end of IC220 (IC220.prt Report Viewer) in Lawson. They are running the IC220 report for a date range and Transaction Type, “PO – PO Receiving.”
I am trying to either get the POLINE.REC_QTY total on my report to match with the “Location Totals Receipt” total on the IC220 report; or find another screen and total in which I can compare to the POLINE.REC_QTY total.
Questions:
1.How is the IC220 “Location Totals Receipt” calculated (table, fields, where clause)?
2.Can POLINE.REC_QTY actually be compared to “Location Totals Receipt”? If not, is there another screen in Lawson S3 Supply Chain in which I can compare to the POLINE.REC_QTY total?
Thanks
Thank you for the clarification!
No, I am not converting POLINE.REC_QTY to the Stock UOM QTY. So, that is one source of the problem; and, I am sure that the POLINE.REC_ACT_DATE is another cause for the discrepancy between IC220 and the Crystal Report. I will use the formula that you provided and see if I can get the Crystal Report’s total to come closer to IC220’s total.
FYI, below, is the Where Clause taken from the Crystal Report:
WHERE ("PURCHORDER"."LOCATION"='98MDC' OR "PURCHORDER"."LOCATION"='MDC') AND ("POLINE"."REC_ACT_DATE">=TO_DATE ('01-09-2014 00:00:00', 'DD-MM-YYYY HH24:MI:SS') AND "POLINE"."REC_ACT_DATE"
Here's the entire query:
SELECT "POLINE"."LINE_NBR", "POLINE"."ITEM", "POLINE"."DESCRIPTION", "POLINE"."REC_ACT_DATE", "POLINE"."REC_QTY", "PURCHORDER"."LOCATION", "POLINE"."PO_NUMBER", "POLINE"."ENT_BUY_UOM", "POLINE"."ENT_UNIT_CST" FROM "PURCHORDER" "PURCHORDER" INNER JOIN "POLINE" "POLINE" ON ((("PURCHORDER"."COMPANY" ="POLINE"."COMPANY") AND ("PURCHORDER"."PO_NUMBER" ="POLINE"."PO_NUMBER")) AND ("PURCHORDER"."PO_RELEASE"="POLINE"."PO_RELEASE")) AND ("PURCHORDER"."PO_CODE" ="POLINE"."PO_CODE") WHERE ("PURCHORDER"."LOCATION"='98MDC' OR "PURCHORDER"."LOCATION" ='MDC') AND ("POLINE"."REC_ACT_DATE" >=TO_DATE ('01-09-2014 00:00:00', 'DD-MM-YYYY HH24:MI:SS') AND "POLINE"."REC_ACT_DATE" ORDER BY "POLINE"."REC_ACT_DATE"
Then, I total POLINE.REC_ACT_DATE at the end of the report.
Ok, I made changes to the query; however, the total receipt qty that the query produces is still more than the total that IC220 displays. I ran the following query:
SELECT PRL.REC_DATE AS PORECLINE_REC_DATE, PRL.ITEM AS PORECLINE_ITEM, PRL.DESCRIPTION AS PORECLINE_DESCRIPTION, PRL.PO_LINE_NBR AS PORECLINE_PO_LINE_NBR, PRL.LOCATION AS PORECLINE_LOCATION, PRL.ENT_REC_QTY AS PORECLINE_ENT_REC_QTY, ( CASE PRL.ENT_REC_UOM WHEN ITE.STOCK_UOM THEN PRL.ENT_REC_QTY WHEN ITE.ALT_UOM_02 THEN (PRL.ENT_REC_QTY * ITE.ALT_UOM_CONV_02) WHEN ITE.ALT_UOM_03 THEN (PRL.ENT_REC_QTY * ITE.ALT_UOM_CONV_03) WHEN ITE.ALT_UOM_04 THEN (PRL.ENT_REC_QTY * ITE.ALT_UOM_CONV_04) WHEN ITE.ALT_UOM_05 THEN (PRL.ENT_REC_QTY * ITE.ALT_UOM_CONV_05) WHEN ITE.ALT_UOM_06 THEN (PRL.ENT_REC_QTY * ITE.ALT_UOM_CONV_06) WHEN ITE.ALT_UOM_07 THEN (PRL.ENT_REC_QTY * ITE.ALT_UOM_CONV_07) WHEN ITE.ALT_UOM_08 THEN (PRL.ENT_REC_QTY * ITE.ALT_UOM_CONV_08) WHEN ITE.ALT_UOM_09 THEN (PRL.ENT_REC_QTY * ITE.ALT_UOM_CONV_09) WHEN ITE.ALT_UOM_10 THEN (PRL.ENT_REC_QTY * ITE.ALT_UOM_CONV_10) ELSE PRL.ENT_REC_QTY END ) AS PORECLINE_ENT_REC_QTY_CONV FROM PORECLINE PRL LEFT OUTER JOIN ITEMMAST ITE ON ITE.ITEM = PRL.ITEM WHERE (PRL.LOCATION='98MDC' OR PRL.LOCATION='MDC') AND (PRL.REC_DATE >= TO_DATE ('01-09-2014 00:00:00', 'DD-MM-YYYY HH24:MI:SS') AND PRL.REC_DATE < TO_DATE ('01-10-2014 00:00:00', 'DD-MM-YYYY HH24:MI:SS')) AND PRL.PO_CODE <> 'PRT'