on 11-28-2013 8:34 PM
Hola que tal, soy nuevo en este mundo de SAP, les explico mi problema tengo el siguiente query el cual me trae las ov, entregas y facturas en un periodo determinado a elegir, pero el problema es que cuando hay una entrega parcial no me lo muestra espero me puedan ayudar
SELECT DISTINCT
T0.[CardCode], T0.[CardName], T0.DocNum 'Orden de Venta',
T2.DocNum 'Entrega',
T4.DocNum 'Factura',T4.DocTotal, T4.DocDate, T5.PymntGroup
FROM ORDR T0
LEFT JOIN RDR1 T1
ON T0.DocEntry = T1.DocEntry
LEFT JOIN ODLN T2
ON T1.TrgetEntry = T2.DocEntry
LEFT JOIN DLN1 T3
ON T2.DocEntry = T3.DocEntry
LEFT JOIN OINV T4
ON T3.TrgetEntry = T4.DocEntry
LEFT JOIN OCTG T5
ON T4.GroupNum = T5.GroupNum
WHERE T4.[DocType] = 'I' AND T4.[DocDate] >=[%1] AND T4.[DocDate] <=[%2]
Así es ya cheque y efectivamente si existen esas entregas con sus facturas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola Roger, agradezco tu respuesta, sabes que ya intente con el full join pero el resultado es similar falta de jalar algunas entregas tengo el listado 15481 y se brinca al 15483 y así sigue aproximadamente del rango de fechas que elijo me faltan como 6 entregas de que aparezcan en el reporte.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
podrias probar quiza cambiando el LEFT JOIN, por un FULL JOIN.
avisame si funciona!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
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.