cancel
Showing results for 
Search instead for 
Did you mean: 

Relation between OJDT & TDs Tables

former_member645084
Participant
0 Kudos

Hi

Is OJDT & TDS Tables can be related with any common fields

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

agardiles
Participant
0 Kudos

Hi!

You may relate the tables with the fields TransType and TransId in the OVPM Table.

select * from OJDT t0 
inner join OVPM t1 on T0."TransType" = '46'
and t1."TransId" = t0."TransId" 
where T1."DocType" = 'D' and T1."Canceled"='N' 

/*If you want to include also the canceled ones, use this:
and t1."DocNum" = t0."BaseRef 
instead of: 
and t1."TransId" = t0."TransId"
and delete the "Canceled" condition */

Hope it helps!

Regards

Augusto