Skip to Content
author's profile photo Former Member
Former Member

Journal entries Referring data

I nead to recover data of a document referred in a jpurnal entries.I know only the journal entries data (table OJDT) and I have to use 'query generator'.

Can you help me?

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2005 at 04:28 PM

    Hi,

    This is a sample of the query that you need to execute.

    here i am getting information from de document and the journal entry.

    /purchase invoices/

    select

    a.docnum,

    a.objtype,

    a.cardcode,

    a.cardname,

    b.transid,

    b.taxdate,

    c.Account,

    c.debit,

    c.credit

    from

    opch a, ojdt b, jdt1 c

    where

    a.docnum = b.baseref

    and b.transid = c.transid

    /*

    sales invoices

    */

    /purchase invoices/

    select

    a.docnum,

    a.objtype,

    a.cardcode,

    a.cardname,

    b.transid,

    b.taxdate,

    c.Account,

    c.debit,

    c.credit

    from

    oinv a, ojdt b, jdt1 c

    where

    a.docnum = b.baseref

    and b.transid = c.transid

    I hope this helps..

    Sergio Arrivillaga

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Antonio,

      In the OJDT table you have the TransType field wich tells you what type is the base document. have a look at the BoObjectType enumeration to know what each number is. Then the BaseRef field is the number of the document who has created the journal entry.

      Hope helps,

      Ibai Peñ

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.