Hi Carlo
In my set up, the Items Group Code is part of GL account which is segmented so I just used that.
But if not, try this link
from JDT1 a left outer join OINV b on a.transid = b.transid
left outer join INV1 c on b.docentry = c.docentry
left outer join oitm d on c.itemcode = d.itemcode
left outer join oitb e on d.ItmsGrpCod = e.ItmsGrpCod
left outer join ocrd f on a.ShortName = f.CardCode
When linking marketing documents such as invoice in journal, I don't normally link OJDT table because I find that it screws up the result. I added oitb so that I can use the Group name instead of the group code.
Hope this helps
Auie