cancel
Showing results for 
Search instead for 
Did you mean: 

Connection between entries

Former Member
0 Kudos

In our company we use the "Purchase Accounts Posting System"

Now I must to create a report, with Crystral report, where I must to connect the two entries of this system

the first entry was created when we posting the Good Receipt PO

the second was created when we posting the AP Invoice

Which are the field that connect the two entries?

I hope I explained

Best regards

Angelo Palladino

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

thanks to all

I solved

Former Member
0 Kudos

Great.

Please close the thread.

Thanks,

Harshal

former_member227598
Active Contributor
0 Kudos

Hi Angelo,

Please take reference form below query .....

Please find the following query for Purchase Summary ..

        SELECT T0.[DocNum] as 'PO NO', T0.[DocDate] as 'PO DATE',

T0.[CardCode] as 'Party Code', T0.

        [CardName] as 'Name Of Party',T0.[DocStatus] as 'PO Status',

T0.[DocTotal] as 'Total Amount' ,

        IsNull((Select Sum(IsNull(DocTotal,0)) From OPDN Where DocEntry In

(Select Distinct DocEntry from PDN1 Where BaseEntry=T0.DocEntry  And

BaseType=T0.ObjType)),0) +

        IsNull((Select Sum(IsNull(DocTotal,0)) From OPCH Where DocEntry In

(Select Distinct DocEntry from PCH1 Where BaseEntry=T0.DocEntry And

BaseType=T0.ObjType)),0) 'GR/INV Amt'

         FROM OPOR T0 WHERE T0.[DocDate]>='[%0]' AND T0.[DocDate]



Rgds,

Kamlesh Naware

frank_wang6
Active Contributor
0 Kudos

If the A/P invoice is copied from GRPO, then in PCH1, the BaseEntry and BaseLine will refer to PDN1's DocEntry and LineNum. This is the link you should rely on.

But if u create A/P invoice independently without using copy function, then u will need to tell us a little more about the situation.

Frank

Former Member
0 Kudos

Hi,

If you explain in more detail it would easy for us to help you.

Thanks,

Harshal

Former Member
0 Kudos

Hi Harshal,

I want understand which are the Key that connect the two entries

both the entries are un OJDT and JDT1 but which are the connection?

I must to realize a Report where I have the Supplier and her offset, but this offset are on the first entry

than I need the key between the two entries

Thanks,

Angelo

Former Member
0 Kudos

Hi,

Still confuse with the requirement but below are the joins can help you.

OJDT T0  INNER JOIN JDT1 T1 ON T0.[TransId] = T1.[TransId]

Thanks,

Harshal