Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Linking invoices with delivery

vhzl123
Explorer
0 Kudos
432
  • SAP Managed Tags:

Hello everyone,

I want to build a query where i can see the invoices where its delivery has a specific value in the NumAtCard.

I've tried with this but its not working. Can someone help?

INV1."BaseEntry" of invoice and DLN1."DocEntry" of delivery is the link i think but its not working...

SELECT distinct T0."DocNum", T1."DocNum" FROM OINV T0 , ODLN T1 INNER JOIN DLN1 T2 ON T1."DocEntry" = T2."DocEntry" INNER JOIN INV1 T3 ON T2."DocEntry" = T3."BaseEntry" WHERE T0."BPLId" =4 and T1."NumAtCard" Like '%%/22' AND T0."CANCELED" ='N'

1 ACCEPTED SOLUTION

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos
364
  • SAP Managed Tags:

vhzl123

You can build a query to see invoices where its delivery has a specific value in the NumAtCard by us...1:

SELECT DISTINCT T0."DocNum", T1."DocNum" 
FROM OINV T0 
INNER JOIN INV1 T3 ON T0."DocEntry" = T3."DocEntry" 
INNER JOIN DLN1 T2 ON T3."BaseEntry" = T2."DocEntry" 
INNER JOIN ODLN T1 ON T2."DocEntry" = T1."DocEntry" 
WHERE T0."BPLId" = 4 AND T1."NumAtCard" LIKE '%/22' AND T0."CANCELED" = 'N'

This query will display the invoice number and delivery number where the delivery has a specific val...1.

I hope this helps!

2 REPLIES 2

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos
365
  • SAP Managed Tags:

vhzl123

You can build a query to see invoices where its delivery has a specific value in the NumAtCard by us...1:

SELECT DISTINCT T0."DocNum", T1."DocNum" 
FROM OINV T0 
INNER JOIN INV1 T3 ON T0."DocEntry" = T3."DocEntry" 
INNER JOIN DLN1 T2 ON T3."BaseEntry" = T2."DocEntry" 
INNER JOIN ODLN T1 ON T2."DocEntry" = T1."DocEntry" 
WHERE T0."BPLId" = 4 AND T1."NumAtCard" LIKE '%/22' AND T0."CANCELED" = 'N'

This query will display the invoice number and delivery number where the delivery has a specific val...1.

I hope this helps!

0 Kudos
364
  • SAP Managed Tags:

Thank you very much!! This works 🙂