Skip to Content

Help on joining tables.

Greetings of the Experts.

Can anyone help me in joining OPOR, POR1, OPDN and PDN1 tables.

By default B1 joins OPOR and POR1, OPDN and PDN1.

Need some information for PO and GRPO comparison.

Regards.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Dec 31, 2014 at 02:34 PM

    Hi,

    Try this link between tables:

    OPOR T0  INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry left join PDN1 T2 on  T2.[BaseEntry] =  T1.[DocEntry] and T2.[BaseLine]  =  T1.[LineNum] INNER JOIN OPDN T3 ON T2.DocEntry = T3.DocEntry

    Thanks & Regards,

    Nagarajan

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 31, 2014 at 10:01 AM

    hi try with this Query

    SELECT T0.[DocNum],T0.[DocDate],T0.[TaxDate],T0.[CardCode], T0.[CardName], T1.[Dscription], T1.[FreeTxt],T1.[Quantity], T1.[Price], T0.U_TRPSHT "Trip Sheet",T0.U_StockEntry "Stock Entry", T0.[DocStatus] FROM OPDN T0  INNER JOIN PDN1 T1 ON T0.DocEntry = T1.DocEntry WHERE T1.[BaseType] = 22 and  T1.[BaseRef]  =[%0]

    Thanks&regards

    Andakondaramudu

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 31, 2014 at 10:03 AM

    Hi

    check bellow thread it may help you

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 31, 2014 at 10:07 AM

    hii, Mekhala

    try this Query  for Quantity & DocTotal  for comparison.,,,,,,,,,,,,,

    it show the result in for mismatch of Quantity Or Document total between grpo & po.

    SELECT T1.[DocNum] AS [Purchase Order No], T0.DocEntry AS [Purchase Order No] ,T1.DocNum AS [GRPO No] ,T0.[Quantity] AS [Purchase Quantity] , T2.[Quantity] AS [GRPO  Quantity],T3.[DocTotal] AS [GRPO Rate],T1.[DocTotal] AS [Purchase Rate] FROM OPOR T3 INNER JOIN POR1 T0 ON T3.DocEntry = T0.DocEntry , OPDN T1 INNER JOIN PDN1 T2 ON T1.DocEntry = T2.DocEntry WHERE T0.[TrgetEntry]= T1.[DocNum] and  (T0.[Quantity] < > T2.[Quantity] or T3.[DocTotal]  <> T1.[DocTotal])

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 02, 2015 at 05:14 AM

    Greetings of the day.

    Thank you, AndakondaRamudu A, Veer Prajapati, Nagarajan K for the replies.

    All the queries were useful to us.

    Have started to learn about joining the tables.

    Thanks for the help and support.

    Regards.

    Add comment
    10|10000 characters needed characters exceeded