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

abap reports

how to select records from two tables without any primary key between them?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 08:57 AM

    HI

    Its not possible to create a table wihout a primary key .

    Its possible to create a structure without a primary key.

    So for every table in SAP there must be a primary key

    Rewar dif usefull

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 03, 2007 at 08:57 AM

    Hi,

    I think its not possible

    Regards,

    Prashant

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 03, 2007 at 09:00 AM

    Hi sujit sahoo,

    its not possible to create table without a primary key.

    If you want to get the fields from two tables means, you can use views.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 09:32 AM

    Hi,

    Sujit

    u mean to say there is no relationship between those tables

    if u have data in common then it is possible to estabilish connection between thos two tables as concered with the program

    try like this

    do.

    read table tabl1_name where condition.

    read table tab2_name where conditon(i.e. data based on the previuosly retrieved)

    append work area to internal_table.

    if .

    some exit condition.

    endif.

    enddo.

    plzzz reward if usefull.

    feel free to ask any quiries

    my mail id is mutyalasunilkumar@gmail.com

    dont forget to reward.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 08:58 AM

    hi sujit,

    welcome to sdn forum.

    to retreive data from 2 tables without any key in common.

    u can create an internal table using begin of statement.

    then use the queries :

    select * from table1 into corresponding fields of itab where cond.

    select * from table2 into corresponding fields of itab where cond.

    loop at itab into wa.

    write : wa-f1,wa-f2......

    endloop.

    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.