on 05-29-2018 6:44 AM
Hi Expert !
I want to know about ,how to get current month goods issue data.
SELECT t0."DocNum" AS "DocNum", T0."DocDate" AS "Date", T1."ItemCode" AS "ItemCode",
T1."Dscription" AS "ItemDesc", t3."ItmsGrpNam", T1."Quantity" AS "Received Qty", T0."Comments"
FROM OIGE T0
INNER JOIN IGE1 T1 ON T1."DocEntry" = T0."DocEntry"
INNER JOIN OITM T2 ON T1."ItemCode" = T2."ItemCode"
INNER JOIN OITB t3 ON t2."ItmsGrpCod" = t3."ItmsGrpCod"
WHERE (MONTH(t0."DocDate") = '12' AND MONTH(NOW()) = '1' AND YEAR(t0."DocDate") = (YEAR(NOW()) -1)
Thanks
Danish
Hi,
Try this,
SELECT t0."DocNum" AS "DocNum", T0."DocDate" AS "Date", T1."ItemCode" AS "ItemCode", T1."Dscription" AS "ItemDesc", t3."ItmsGrpNam", T1."Quantity" AS "Received Qty", T0."Comments"
FROM OIGE T0 INNER JOIN IGE1 T1 ON T1."DocEntry" = T0."DocEntry" INNER JOIN OITM T2 ON T1."ItemCode" = T2."ItemCode" INNER JOIN OITB t3 ON t2."ItmsGrpCod" = t3."ItmsGrpCod"
WHERE
DAYOFMONTH(t0."DocDate") = MONTH(CURRENT_DATE)
AND YEAR(TO_DATE(t0."DocDate")) = YEAR(CURRENT_DATE)
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Danish,
Use GETDATE() instead of NOW() function.
WHERE (MONTH(t0."DocDate") = MONTH(GETDATE())... etc
Regards, Ivan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Johan,
I found this SAP Note: https://launchpad.support.sap.com/#/notes/2406955
It's exactly the same situation. Unfortunately it's a HANA bug.
Regards,
Ivan
Hi Danish,
MONTH(t0."DocDate") = MONTH(NOW()) AND YEAR(t0."DocDate") = YEAR(NOW())
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SELECT t0."DocNum" AS "DocNum", T0."DocDate" AS "Date", T1."ItemCode" AS "ItemCode",
T1."Dscription" AS "ItemDesc", t3."ItmsGrpNam", T1."Quantity" AS "Received Qty", T0."Comments"
FROM OIGE T0
INNER JOIN IGE1 T1 ON T1."DocEntry" = T0."DocEntry"
INNER JOIN OITM T2 ON T1."ItemCode" = T2."ItemCode"
INNER JOIN OITB t3 ON t2."ItmsGrpCod" = t3."ItmsGrpCod"
WHERE MONTH(t0."DocDate") = MONTH(NOW())
AND YEAR(t0."DocDate") = YEAR(NOW())
yes sir i posted.2018-05-29-121541.png
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.