2020 Sep 07 10:36 AM
Hi! I am new to the query generator. How do I create a summary of all issue for production rows (IGE1) with posting date range? I tried using the query wizard, but I cannot seem to add the filter for posting date range. Thanks.
2020 Sep 08 7:43 AM
Hi,
the reason you cannot find the filter is because the date itself is saved in the header table (OIGE). You need to join those two tables:
SELECT *
FROM IGE1 T0
INNER JOIN OIGE T1 ON T0."DocEntry" = T1."DocEntry"
WHERE T1."DocDate" > [%0] AND T1."DocDate" <= [%1]
BR,
Matija
2020 Sep 07 10:37 AM
Hi and welcome to the SAP Community!
Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers (if you haven't already), as it provides tips for preparing questions that draw responses from our members. For example, you can outline what steps you took to find answers (and why they weren't helpful) and share screenshots of what you've seen/done. The more details you provide, the more likely it is that members will be able to assist you.
Should you wish, you can revise your question by selecting Actions, then Edit (although once someone answers your question, you'll lose the ability to edit the question -- but if that happens, you can leave more details in a comment).
Finally, if you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: https://www.youtube.com/watch?v=F5JdUbyjfMA&list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS. By personalizing your profile with a photo of you, you encourage readers to respond.
Cheers,
Julia SAP Community Moderator
2020 Sep 08 7:43 AM
Hi,
the reason you cannot find the filter is because the date itself is saved in the header table (OIGE). You need to join those two tables:
SELECT *
FROM IGE1 T0
INNER JOIN OIGE T1 ON T0."DocEntry" = T1."DocEntry"
WHERE T1."DocDate" > [%0] AND T1."DocDate" <= [%1]
BR,
Matija
2020 Sep 11 1:08 AM
Hi Matija,
Thank you! It works. 🙂 Can you also help me figure out how I can add the header details of OIGE, specifically the document number?
2020 Sep 11 7:06 AM
Hi,
Document Number is OIGE."DocNum" so just add it to your select.
BR,
Matija
2020 Sep 15 7:20 AM
2021 Jan 26 2:45 AM
I have a simple query for that.
SELECT T1.[ItemCode], T1.[Dscription], SUM(T1.[Quantity]) FROM OIGE T0 INNER JOIN IGE1 T1 ON T0.[DocEntry] = T1.[DocEntry] WHERE T0.[DocDate] BETWEEN [%0] AND [%1] GROUP BY T1.[ItemCode], T1.[Dscription], T1.[Quantity] ORDER BY T1.[ItemCode]