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

How to get data from morethan 7 tables?

How to get data from morethan 7 tables?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 25, 2006 at 11:06 AM

    Hi,

    very first u find the link betn the table-flds

    ie,if u want item details go with header data and go for

    item details(by for all entries ).

    also u can fetch data into itabs independently

    and process on the itabs which is very efficient

    regards

    giri

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 25, 2006 at 11:07 AM

    Hello,

    Display tables what u are going to use.

    So that we can get clear picture.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 25, 2006 at 11:08 AM

    Hi adiseshi,

    1. getting data in 1 shot

    using sql and joins,

    is not feasible in this case.

    2. This would be the logic, i would personally follow.

    3.

    a) create one itab, with all required fields.

    b) first get data from 1st table (1,2 tables, if join is compulsary)

    c) Then

    d) Loop at itab (using for all entries)

    e) get the other fields (from other 3,4,5,6,7 tables)

    f) modify itab.

    g) endloop.

    regards,

    amit m.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 25, 2006 at 11:12 AM

    Hi,

    It depends on the dependency of the tables. If all the tables having the same comman field, its very esay get data from 7 tables. get data from each table to internal table. and loop the one internal table , based on the key field read the each internal table.

    Another way u can create a view for 7 tables and provide dependency in the views.

    please reward if it is needfull.

    Regards,

    Rajesh Yadla

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 25, 2006 at 11:21 AM

    Hi Adiseshi,

    First of all, check their foreign keys so you will know which table will connect to another. Also, check whether they are header or details/line item table. That would help too.After that you can use FOR ALL ENTRIES statement, join or event select single inside a loop to get the data but for all entries is recommended provided that you have the proper keys in your where clause since it is faster.

    Hope this helps...

    P.S. Please award points for useful answers.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 25, 2006 at 02:22 PM

    Hello,

    First write down the common fields in all the tables. Using these fields create one internal table.

    Now loop at the data table ( from query) and use move corresponding to move to the final internal table created in the first step.

    Regs,

    Venkat

    Add a comment
    10|10000 characters needed characters exceeded

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.