on 07-23-2020 5:49 PM
Hello,
I'm a new in SAP B1.
Have a task to show the Sales and Returns for the period by BP in one query and after to create the Crystal Report based on data.
ORDR and RDR1 - Sales
ORDN and RDN1 - Returns.
Can you please advise how can I join them? Thanks in advance.
Hi,
Your query should be based on Delivery and Return, not from sales order and Return.
Try this query,
SELECT T0.[DocNum], T0.[DocDate], T1.[ItemCode], T1.[Dscription], T1.[Quantity] FROM ODLN T0 INNER JOIN DLN1 T1 ON T0.[DocEntry] = T1.[DocEntry] WHERE T0.[CardCode] = [%0] and T0.[DocDate] between [%1] and [%2]
UNION ALL
SELECT T0.[DocNum], T0.[DocDate], T1.[ItemCode], T1.[Dscription], -1* T1.[Quantity] FROM ORDN T0 INNER JOIN RDN1 T1 ON T0.[DocEntry] = T1.[DocEntry] WHERE T0.[CardCode] = [%0] and T0.[DocDate] between [%1] and [%2]
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Igor,
Business One has their own Incident Portal, I suggest you log one there. B1 Rep's don't come here and it's an OEM version of standard CR which most people don't know the B1 Databases.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
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.