on 11-24-2022 10:49 AM
Hi all,
We want a list with all invoiced articles of a certain period. This data can be retrieved from SAP with the query below.
However, this query is missing 1 field and I don't know how to add it.
The missing field is "Base Price" from the "Gross Profit of Outgoing Invoice" window (screenshot below). How can I add this field?
SELECT
T0.[DocNum],
T0.[DocDate],
T0.[CardCode],
T0.[CardName],
T1.[ItemCode],
T1.[Dscription],
T3.[ItmsGrpNam],
T1.[Quantity],
T1.[WhsCode],
T1.[PriceBefDi],
T1.[DiscPrcnt],
T1.[LineTotal],
T1.[TreeType],
T4.[CardName]
FROM OINV T0
INNER JOIN INV1 T1 ON T0.[DocEntry] = T1.[DocEntry]
INNER JOIN OITM T2 ON T1.[ItemCode] = T2.[ItemCode]
INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
INNER JOIN OCRD T4 ON T2.CardCode = T4.CardCode
WHERE
T0.[DocDate] >=[%0] and T0.[DocDate] <=[%1] AND
T1.[TreeType] <> 'I'
ORDER BY
T0.[DocNum]
Hi Jeroen,
try T1.GrossBuyPr
regards Lothar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi jeroenw,
Would you please double check, because that is the field the Base Price is stored in. If you see a price on screen, it should be in that field.
By the way, what does this do:
AND
T1.[TreeType] <> 'I'
Regards,
Johan
User | Count |
---|---|
102 | |
12 | |
11 | |
6 | |
5 | |
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.