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

inner join

Is it possible to get output without using inner join?

:

select abukrs bnetwr bmwsbk bvbeln b~kunrg

ckunnr clifnr

alifnr axblnr

into corresponding fields of table itab1

from vbrk as b

inner join bsik as a on bvbeln = axblnr

inner join kna1 as c on bkunrg = ckunnr

where a~bukrs IN s_bukrs.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2009 at 09:42 AM

    Yes use For all entries

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2009 at 09:46 AM

    Hi,

    Split the Select and use the For All Entries.

    select bukrs lifnr xblnr
    into corresponding fields of table itab1
    from bsik 
    where a~bukrs IN s_bukrs.
    
    select netwr mwsbk vbeln kunrg
    into corresponding fields of table itab2
    from vbrk 
    for all entries in itab1
    where vbeln =  itab1-xblnr
    
    select kunnr lifnr
    into corresponding fields of table itab3
    from kna1 wherekunnr = itab3-kunrg

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2009 at 09:51 AM

    hi,

    Dont use inner join for three table unless all the joining keys are not primary key.

    use for all entries.

    Check the syntes from f1 help or abapdocu.

    Cheers,

    Rudhir

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 27, 2009 at 10:45 AM

    Hi

    Try This

    SELECT BUKRS

    LIFNR

    XBLNR

    FROM BSIK

    INTO CORRESPONDING FIELDS OF TABLE ITAB1

    WHERE BUKRS IN S_BUKRS.

    IF ITAB1[] IS NOT INITIAL.

    SELECT VBELN

    KUNRG

    NETWR

    MWSBK

    FROM VBRK

    INTO TABLE ITAB2

    WHERE VBELN = ITAB1-XBLNR.

    ENDIF.

    IF ITAB2[] IS NOT INITIAL.

    SELECT KUNNR

    LIFNR

    FROM KNA1

    INTO TABLE ITAB3

    FOR ALL ENTRIES IN ITAB1

    WHERE KUNNR = ITAB1-KUNRG.

    ENDIF.

    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.