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

sql doubt

Why we using * infront fo the table.

SELECT SINGLE mtart

matnr

matkl

INTO (*mara-mtart,

*mara-matnr,

*mara-matkl)

FROM *mara

WHERE matnr = stpo-idnrk.

cheers.

bharadwaj

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2005 at 07:19 AM

    Tables : MARA.

    Data : wa_mara type MARA.

    SELECT SINGLE mtart

    matnr

    matkl

    INTO (wa_mara-mtart,

    wa_mara-matnr,

    wa_mara-matkl)

    FROM mara

    WHERE matnr = stpo-idnrk.

    Regards,

    Ravi

    Note : Please reward points if this helps you.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      Just to add on to what Ravi has posted, you need not even declare the explicit work area WA_MARA. TABLES statement creates an implicit work area.

      TABLES mara.

      SELECT SINGLE mtart matnr matkl

      FROM mara

      INTO (mara-mtart, mara-matnr, mara-matkl)

      WHERE matnr EQ variable.

      However, in OO ABAP world it is not reccomended to use implicit work area.

      /Sagar

      Message was edited by: Sagar Acharya

  • author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2005 at 07:22 AM

    Hi,

    Please go thru this link.

    call-transaction-and-bdc-session-in-same-program

    Hope this will help you.

    Sriram.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2005 at 07:06 AM

    Hi,

    If you use * it will select all the fields of the table.

    Instead of * we will use Fields so that it will be more efficient in performance wise.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2005 at 07:08 AM

    you don't have to use that. Declare a variable of type MARA and you can dump your values into that. Only SAP uses internally that notation.

    Regards,

    Ravi

    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.