Query to display result based on specific item group of the parent item in production order instead of parent item code itself
Can anyone help with the query so that user can filter based on the item group rather than list of parent item code in the production order field of OWOR.ItemCode.
For eg, if the query written as OWOR.ItemCode, it will display the list of item code, it is possible to show the item group of the items ?
Nagarajan K replied
SELECT DISTINCT Case When T4.[Type] = 'S' Then 'Standard' When T4.[Type] = 'P' Then 'Special' When T4.[Type] = 'D' Then 'Disassembly' End 'Type', T0.[DocNum], T0.[DocDate], T3.[ItmsGrpNam], T2.[ItemCode], T5.[IssueType], T1.[Price], T2.[AvgPrice], T1.[Quantity], T1.[LineTotal] FROM OIGN T0 INNER JOIN IGN1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod LEFT JOIN OWOR T4 ON T1.[BaseRef] = T4.[DocNum] AND T4.[ItemCode] = T2.[ItemCode] inner JOIN WOR1 T5 ON T4.Docentry = T5.Docentry WHERE T3.[ItmsGrpNam] = 'SEMIPRODUCT'