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

Select statement

Hi friends when we write

select single *

is it necessary to have a data base and the internal table of the same structure.

I am writing,

Select Single *

From ZZSD0010

into it_zzsd0010

Where

princ_customer = it_zzsd0010-princ_customer

default_sold_2 = 'X'.

the internal table and the data base table are of different structure.

Any suggestions,

Shejal Shetty.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2006 at 08:44 PM

    Hi,

    IF the internal table and database structure are of different structure you can use INTO CORRESPONDING FIELDS OF..to move the common field values..

    You cannot use INTO alone if the database table and internal table structure are different..

    The values may not move to the correct fields..

    THanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2006 at 08:49 PM

    Hi Shejal,

    In case the db table and internal table are of different structure, then u need to write the fields you want to populate explicitly using corresponding fiels addition in select statement.

    Select Single *

    From ZZSD0010

    into <b>CORRESPONDING FIELDS OF TABLE</b> it_zzsd0010

    Where

    princ_customer = it_zzsd0010-princ_customer and

    default_sold_2 = 'X'.

    Else if the structure is same then your statement will also work.

    Cheers,

    Vikram

    Pls reward for helpful replies!!

    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.