Join on two tables mseg and bsim

hi
i have to select data from both these tables based on select-option datum as basim-budat and sakto as mseg-sakto.
base on these two elect-options i have to fetch material from these tables . where both datum and sakto conditions match.
Thanks

One program i wrote sometime ago had the following logic :
  select * from mbew into table t_mbew
    for all entries in t_mara
    where matnr = t_mara-matnr
      and bwkey in s-bwkey
      and bwtar in p-bwtar
      and ( bwtty = space or ( bwtty <> space and bwtar <> space ) ).
  sort t_mbew by matnr.
  select * from mseg
           join mkpf on mkpfmblnr = msegmblnr and
                        mkpfmjahr = msegmjahr
           into table t_mseg_mkpf
           for all entries in t_mbew
           where mkpf~budat >= p-budat-low
             and mseg~werks in s-werks
             and mseg~bwtar = t_mbew-bwtar
             and mseg~matnr = t_mbew-matnr.
  select * from bsim
           into table t_bsim
           for all entries in t_mbew
           where budat >= p-budat-low
             and bwkey in s-bwkey
             and bwtar = t_mbew-bwtar
             and matnr = t_mbew-matnr.
  loop at t_mbew into mbew.
    loop at t_bsim into bsim
         where matnr = mbew-matnr
           and bwkey = mbew-bwkey
           and bwtar = mbew-bwtar.
    endloop.
    loop at t_t001w into t001w
         where bwkey = mbew-bwkey.
      loop at t_mseg_mkpf
           where mseg-matnr = mbew-matnr
             and mseg-werks = t001w-werks
             and mseg-bwtar = mbew-bwtar.
      endloop.
    endloop.
  endloop.
Hope this may help you.
Regards

Similar Messages

  • Join on two tables using "LIKE"

    Hi all,
    I need make join on two tables (QMEL and STXL) using keys for connection:
    - field for join of first table is (QMEL-QMNUM - Notif. number - Char 12)
    - field for join of second table is  (STXL-TDNAME - Char 70)
    If it is connection based on EQ, I think, it's no problem but I need to connect it on base of 'LIKE'.
    Example:
    QMEL-QMNUM = '100100698075'
    I would like get all rows from STXL which contain or even better start with notif. number.
    Examples I would like connect with QMEL-QMNUM:
    STXL-TDNAME = '100100698075'
    STXL-TDNAME = '1001006980750001'
    STXL-TDNAME = '10010069807500010001'
    STXL-TDNAME = '10010069807500010002'
    etc..
    Am I able to manage that with select which join these two tables this way?
    Thanks for any solution
    Vaclav Hosek.

    Hi,
    Write 2 separate selects for this.
    select * from QMEL
    where......
    if sy-subrc = 0.
    loop at i_qmel into wa.
    r_tdname-option = 'CP'.
    r_tdname-sign = 'I'
    concatenate wa-qnum '*' into r_tdname-low.
    append r_tdname.
    endloop.
    select *
    from STL
    where tdname in r_tdname.
    endif.

  • Join two  tables BKPF and VBRK

    I need a report that will join two  tables BKPF and VBRK in QuickViewer. The only field with the right character length is XBLNR but when creating the join no records are dispalyed beacuse the values of this field in both tables are not the same.
    There are also other fields available in BKPF but the char length is not the appropriate.
    Does anyone have any idea how I can link these two tables?
    Thank you

    Neither  of these combinations  is possible with QuickViewer because the fields need to have the same length of characters in order to create the join.
    VBRK - VBLEN char(10) and BKPF - AWKEY char(20)
    VBRK -ZUONR char(18)     BKPF- BELNR char (10)
    Any other idea?
    Thank you, JP

  • Joining two tables LIKP and VBUK

    HI,
    I want to join two tables LIKP and VBUK, can u give some explaination ?
    points will be given for good answers...
    regards
    Vijaya

    Hi,
    see this example of joining two tables zairln & zflight.
    These 2 tables are logically joined by the airln field.
    Select a~airln
           a~lnnam
           b~fligh
           b~cntry
    Into table int_airdet
    From zairln as a inner join zflight as b on aairln = bairln.
    In order to restrict the data as per the selection criteria, a where clause can be added to the above inner join.
    rgds,
    latheesh
    Message was edited by: Latheesh Kaduthara

  • Prcedure to joining of two tables and pls explore the primary & foriegn key

    Dear All,
    Am new to this forum looking forward to have some discussions and guidance reg ABAP.
    <b>My query is</b>
    what is the prcedure to joining of two tables and pls explore the primary & foriegn key relationships.
    Your kind help is required in this query .
    Thanks n regards
    Carol P

    Hi Carol,
    Joining two tables fetch data from tables that has relevent entry based on the keys. like LIKP and LIPS these are delivery tables. if the business requirement is fetching delivery data that are exists in both two tables. here LIKP will conatins a single entry against a condition and LIPS may contains several entry because one delivery may has multiple line items. so, fetch the data joining the two tables on vbeln that is delivrey number. this is used to increase the performance of the program except for all entries.
    Foreign key is poiting twowards primary key; it may be 1:1 , 1:many and many:many. if field1 of table a is pointing towards field1 of table b. then based on these condition at the time of entry SAP will check how many entry can be entred in field1 of table a.
    regards
    Krishnendu

  • Two tables KUWEV and KUAGV joining

    Hi all,
    I have two tables KUWEV and KUAGV
    The following field I have taken  from two tables
    KUWEV u2013VABED
    KUWEV- LLAND
    KUAGV-LAND1
    If  KUWEV u2013VABED =TRLOZ  - VABED
      and KUWEV- LLAND =  TRLOZ  - LLAND
        and KUAGV-LAND1 =  TRLOZ  - LAND1
    then only I have to pickup TRLOZ- ROUTE
    after that i have to  Substitute  the value in VBAP-ROUTE
    can anybody help  to write the code
    I have doubt that how can  data we will pick up 2 fields from one table 1 field from another table and two tables (KUWEV and KUAGV) having common field KUNNR
    Pointes will be rewarded by useful information
    Thanks in advance
    krishna

    Hi KCH,
    either use joins or write separate select statements.
    Hope it helps.
    Aditya

  • Can we implement the custom sql query in CR for joining the two tables

    Hi All,
    Is there anyway to implement the custom sql query in CR for joining the two tables?
    My requirement here is I need to write sql logics for joining the two tables...
    Thanks,
    Gana

    In the Database Expert, expand the Create New Connection folder and browse the subfolders to locate your data source.
    Log on to your data source if necessary.
    Under your data source, double-click the Add Command node.
    In the Add Command to Report dialog box, enter an appropriate query/command for the data source you have opened.
    For example:
    SELECT
        Customer.`Customer ID`,
        Customer.`Customer Name`,
        Customer.`Last Year's Sales`,
        Customer.`Region`,
        Customer.`Country`,
        Orders.`Order Amount`,
        Orders.`Customer ID`,
        Orders.`Order Date`
    FROM
        Customer Customer INNER JOIN Orders Orders ON
            Customer.`Customer ID` = Orders.`Customer ID`
    WHERE
        (Customer.`Country` = 'USA' OR
        Customer.`Country` = 'Canada') AND
        Customer.`Last Year's Sales` < 10000.
    ORDER BY
        Customer.`Country` ASC,
        Customer.`Region` ASC
    Note: The use of double or single quotes (and other SQL syntax) is determined by the database driver used by your report. You must, however, manually add the quotes and other elements of the syntax as you create the command.
    Optionally, you can create a parameter for your command by clicking Create and entering information in the Command Parameter dialog box.
    For more information about creating parameters, see To create a parameter for a command object.
    Click OK.
    You are returned to the Report Designer. In the Field Explorer, under Database Fields, a Command table appears listing the database fields you specified.
    Note:
    To construct the virtual table from your Command, the command must be executed once. If the command has parameters, you will be prompted to enter values for each one.
    By default, your command is called Command. You can change its alias by selecting it and pressing F2.

  • To recover data of two tables ORACLE and to create IDOC Finsta

    Hello expert:
    I have the following scene:
    SAPR/3    <----
       XI   <----
    ORACLE
    (To process Idoc)         (CREAR IDOC PAYEXT)        (Table:  Header and Table: Detail).
    i need to recover the information of ORACLE of two tables (Headed and it details), to take the data to XI
    and to create the IDOC(PAYEXT), finally to give it to SAPR/3.
    my problems are two:
    Not like recovering the information of the two tables at the same time related by the field key.
    In addition I need to create in IDOC (Finsta) to SAPR/3.
    I hope that they can help me
    thanks
    Raúl.

    Help me please!
    Example one:
    select H.ID_TRANSAC H.FEC_PAGO H.HOR_PAGO D.NUM_REFERENCIA D.IMPTE_PAGO
    FROM PPQ_PAGO_CENTRA_H AS H INNER JOIN PPQ_PAGO_CENTRA_d AS D ON H.ID_TRANSAC = D.ID_TRANSAC where H.ID_TRANSAC = '5686496'
    Example two:
    SELECT PPQ_PAGO_CENTRA_H.ID_TRANSAC PPQ_PAGO_CENTRA_H.FEC_PAGO PPQ_PAGO_CENTRA_D.ID_TRANSAC PPQ_PAGO_CENTRA_D.NUM_REFERENCIA
    FROM PPQ_PAGO_CENTRA_H INNER JOIN PPQ_PAGO_CENTRA_d ON PPQ_PAGO_CENTRA_H.ID_TRANSAC = PPQ_PAGO_CENTRA_D.ID_TRANSAC
    WHERE PPQ_PAGO_CENTRA_H.ID_TRANSAC = '5686496'
    It gives errors me of the two forms. You help me with an example of the Join?

  • Doubt on creating join between  two tables

    Hi friends,
    I have two tables , ekes and eine
    my requirement is  if Ekes-ebtyp = 'X1'.
    then Ekes-ebtyp = EKES-EINDT + Eine-j_3alitra.
    the doubt is there is no primary key common between this table . actually in my whole program for purchase order i used EBELN for extracting details when two tables are involved . in this two tables no two primary keys are common to extract data ...is there any ways please suggest..
    the code i wrote is
    loop at li_ekes assigning <fl_ekes>.
    read table li_eine assigning <fl_eine> with table key (here i need to give some unique fields to join these two fields please guide me which field i can use.).
    <fl_ekes>-ebtyp = <fl_ekes>-EINDT + <fl_eine>-j_3alitra.

    Hi,
    Both tables have field EBELN in common.
    You can use it to extract data from both.
    Hope this helps.
    reward if helpful.
    Regards,
    Sipra

  • Join this two table HELP

    Hi to all.. i have this two table , the problem is i dunno how to join this two table into one, becoz in the forms i have two button "BUTTON A IS FOR TABLE A WHICH IS THE EMPLOYEE.. AND BUTTON B IS FOR ADMIN... WHAT I WANT IS TO MAKE THIS TWO BUTTON INTO ONE BUTTON.. i;m using form6i and run in client server..
    Guys any one here know plz help how to do this..
    TABLE 1
    BEGIN
    iF :username IS NULL THEN
    MESSAGE ('Please enter Username ');
    MESSAGE ('Please enter Username ');
    GO_ITEM('username');
    RAISE FORM_TRIGGER_FAILURE;
    end if;
    IF :PASSNAME1 IS NULL THEN
    MESSAGE('Please enter password.');
    MESSAGE('Please enter password.');
    GO_ITEM('PASSNAME1');
    RAISE FORM_TRIGGER_FAILURE;
    end if;
    select username,passname
    into :pass.username,:pass.passname1
    from Employees
    where :pass.username=username
    and :pass.passname1=passname;
    Message('Access Granted');
    Message('Access Granted');
    go_block('maina');
    hide_view('pass1');
    exception
    when no_Data_found then
    set_alert_Property('wrong',Alert_Message_text,'Invalid Password');
    if show_alert('wrong')=alert_button1 then
              go_item('PASSNAME1');
              :passname1:=null;
              end if;
    end;
    TABLE 2
    BEGIN
    iF :username IS NULL THEN
    MESSAGE ('Please enter Username ');
    MESSAGE ('Please enter Username ');
    GO_ITEM('username');
    RAISE FORM_TRIGGER_FAILURE;
    end if;
    IF :PASSNAME1 IS NULL THEN
    MESSAGE('Please enter password.');
    MESSAGE('Please enter password.');
    GO_ITEM('PASSNAME1');
    RAISE FORM_TRIGGER_FAILURE;
    end if;
    select username,passname
    into :pass.username,:pass.passname1
    from Admin1
    where :pass.username=username
    and :pass.passname1=passname;
    Message('Access Granted');
    Message('Access Granted');
    go_block('maina');
    hide_view('pass1');
    exception
    when no_Data_found then
    set_alert_Property('wrong',Alert_Message_text,'Invalid Password');
    if show_alert('wrong')=alert_button1 then
              go_item('PASSNAME1');
              :passname1:=null;
              end if;
    end;

    like i told you before in this posting How to join this two tables
    use a union
    select username,passname
    into :pass.username,:pass.passname1
    from Employees
    where :pass.username=username
    and :pass.passname1=passname
    union
    select username,passname
    into :pass.username,:pass.passname1
    from Admin1
    where :pass.username=username
    and :pass.passname1=passname;

  • Sql join on two tables where column like another column

    hi all,
    been trying to get the results from a join between two tables where one column is like another one.
    table1 (nameA) examples: black2, green1
    table2 (nameB) example: black2.location.uk.com, green1.location.uk.com
    so for example I want to match all those in table1 with black2 to the column in table2 that begins with black2 and so on if you see what im trying to get at!
    my sql so far:
    select * from  schema.table1 a
    join schema.table2 b
    on a.nameA like concat('%', b.nameB, '%'); but it errors:
    ORA-00909: invalid number of arguments
    00909. 00000 - "invalid number of arguments"
    Any help or advice would be greatly appreciated, thankyou!

    Either of these should do it...
    select * from  schema.table1 a
    join schema.table2 b on a.nameA like '%'||b.nameB||'%';or
    select * from  schema.table1 a
    join schema.table2 b on instr(b.nameB,a.nameA) > 0

  • Compares  two tables S780 and S720 by material , Print the Difference value

    Hi abapers,
    Report  which compares the two tables S780 and S720 by material
    the Statistic currency value of these two tables if show the differences
    the report should display only Diffrece value:
    The selection should be by
    Revenue country, Salesorganisation , month and version
    output like this
    Material  Value S720  / Value S780 /   currency difference should be print out.
    Regards
    Raj

    Hi
    Use join or for all entries
    then move the records into a final table
    loop at itab
    then get the difference.
    modify the itab by transporting the difference.
    Regards
    Shiva

  • Subject: How to do join between two tables using something like SE16

    SE16, SE11 provide form based interface query information from a single table. Is there a way to do join between two tables without creating an infoset erc? I am looking for something similar to sql join but in SAP BI 7.0
    Thanks.

    Hi
    Pls look into below links. Hope this helps you.
    1. http://help.sap.com/saphelp_46c/helpdata/EN/d2/cb45bf455611d189710000e8322d00/content.htm
    2. http://help.sap.com/saphelp_46c/helpdata/EN/d2/cb45a5455611d189710000e8322d00/content.htm
    Regards
    Sirigiri

  • Join two tables FBL5N and collection management

    Hi All,
    I want to join two tables i.e T code FBL5N and table UDM_P2P_ATTR. But I am unable to see common fields/tables between the two. Can anyone suggest how can I join this in SE11. Pls suggest the common fiels between two indipendent tables.
    Thanks,
    Vishal Pant
    Edited by: vishal_pant on Jul 19, 2010 12:04 PM

    Neither  of these combinations  is possible with QuickViewer because the fields need to have the same length of characters in order to create the join.
    VBRK - VBLEN char(10) and BKPF - AWKEY char(20)
    VBRK -ZUONR char(18)     BKPF- BELNR char (10)
    Any other idea?
    Thank you, JP

  • Select and calculate average on joining two tables - normal and archive.

    Hello,
    I am in process of writing a query to calculate (daily/or weekly/or monthly)average time taken by orders raised from different system. Order creation date is in one table, and order finalization date is in another table.
    Now both these tables are getting archived every three months, so in order to get the average for orders before these three months, i am forced to make an union of two archive tables for entry date, and two archives table for the end date. And this query is taking a lot of time to be executed. I am not a DB guy and have less idea of running the execution plan. Any help on this will be a great help for me.
    My current query is as below:
    SELECT DOP.SYSTEMID,AVG( H1.ENTRYDATE - DOP.ENTRYDATE) AS AVERAGETIME,
                TO_CHAR(DOP.ENTRYDATE ,'DD/MM/YY')  AS CREATIONDATE
                  FROM (
                     SELECT SYSTEMID,ENTRYDATE, INTERNALORDERID FROM ORDERS_TAB WHERE
                        ENTRYDATE
                        BETWEEN TO_DATE('01/10/2008','DD/MM/YY')
                        AND TO_DATE('21/10/2009','DD/MM/YY')
                     UNION  ALL
                     SELECT SYSTEMID,ENTRYDATE, INTERNALORDERID FROM ORDERS_TAB_ARCH
                        WHERE ENTRYDATE
                        BETWEEN TO_DATE('01/10/2008','DD/MM/YY')
                        AND TO_DATE('21/10/2009','DD/MM/YY')
                     )  DOP, 
                     SELECT ENTRYDATE,INTERNALORDERID FROM ORDERS_HEAD_HISTORY
                     WHERE
                        ENTRYDATE >TO_DATE('01/10/2008','DD/MM/YY')  AND STATUSID = 7
                     UNION ALL
                     SELECT ENTRYDATE,INTERNALORDERID FROM ORDERS_HEAD_HIST_ARCH
                        WHERE ENTRYDATE >TO_DATE('01/08/2008','DD/MM/YY')  AND STATUSID = 7 
                     ) H1
                       WHERE DOP.INTERNALORDERID=H1.INTERNALORDERID
                       GROUP BY DOP.MASTERSYSTEMID, TO_CHAR(DOP.ENTRYDATE ,'DD/MM/YY')Regards,
    Edited by: A R on Oct 23, 2009 9:37 AM

    Thanks etbin. Yes I am joining the archive table only when the date contains that of archive data. I am doing it conditionally via java.
    @damorgan.
    Version:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
    PL/SQL Release 10.2.0.3.0 - Production
    "CORE     10.2.0.3.0     Production"
    TNS for Solaris: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Query plan
    <ExplainPlan>
      <PlanElement object_ID="0" id="0" operation="SELECT STATEMENT" optimizer="ALL_ROWS" cost="276.594" cardinality="12.565" bytes="678.510" cpu_cost="38.788.639.859" io_cost="266.656" time="1.646">
        <PlanElements>
          <PlanElement object_ID="0" id="1" operation="HASH" option="GROUP BY" cost="276.594" cardinality="12.565" bytes="678.510" cpu_cost="38.788.639.859" io_cost="266.656" time="1.646">
            <PlanElements>
              <PlanElement object_ID="0" id="2" operation="NESTED LOOPS" cost="276.591" cardinality="12.565" bytes="678.510" cpu_cost="38.777.027.861" io_cost="266.656" time="1.646">
                <PlanElements>
                  <PlanElement object_ID="1" id="3" operation="VIEW" object_owner="HIDE_USER" object_instance="4" cost="276.587" cardinality="2" bytes="48" cpu_cost="38.777.004.963" io_cost="266.652" time="1.646">
                    <PlanElements>
                      <PlanElement object_ID="0" id="4" operation="UNION-ALL">
                        <PlanElements>
                          <PlanElement object_ID="0" id="5" operation="PARTITION LIST" option="ALL" cost="55.239" cardinality="1" bytes="17" partition_start="1" partition_stop="12" partition_id="5" cpu_cost="5.061.473.580" io_cost="53.942" time="329">
                            <PlanElements>
                              <PlanElement object_ID="2" id="6" operation="TABLE ACCESS" option="FULL" optimizer="ANALYZED" object_owner="HIDE_OBJECT_OWNER" object_name="ORDERS_HEAD_HISTORY" object_type="TABLE" object_instance="5" cost="55.239" cardinality="1" bytes="17" partition_start="1" partition_stop="12" partition_id="5" cpu_cost="5.061.473.580" io_cost="53.942" filter_predicates="&quot;ENTRYDATE&quot;&gt;TO_DATE('2009-06-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND &quot;STATUSID&quot;=7" time="329"/>
                            </PlanElements>
                          </PlanElement>
                          <PlanElement object_ID="0" id="7" operation="PARTITION LIST" option="ALL" cost="221.348" cardinality="1" bytes="17" partition_start="1" partition_stop="12" partition_id="7" cpu_cost="33.715.531.383" io_cost="212.710" time="1.318">
                            <PlanElements>
                              <PlanElement object_ID="3" id="8" operation="TABLE ACCESS" option="FULL" optimizer="ANALYZED" object_owner="HIDE_OBJECT_OWNER" object_name="ORDERS_HEAD_HIST_ARCH" object_type="TABLE" object_instance="6" cost="221.348" cardinality="1" bytes="17" partition_start="1" partition_stop="12" partition_id="7" cpu_cost="33.715.531.383" io_cost="212.710" filter_predicates="&quot;ENTRYDATE&quot;&gt;TO_DATE('2009-06-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND &quot;STATUSID&quot;=7" time="1.318"/>
                            </PlanElements>
                          </PlanElement>
                        </PlanElements>
                      </PlanElement>
                    </PlanElements>
                  </PlanElement>
                  <PlanElement object_ID="1" id="9" operation="VIEW" object_owner="HIDE_USER" object_instance="1" cost="2" cardinality="1" bytes="30" cpu_cost="11.449" io_cost="2" time="1">
                    <PlanElements>
                      <PlanElement object_ID="0" id="10" operation="UNION ALL PUSHED PREDICATE">
                        <PlanElements>
                          <PlanElement object_ID="4" id="11" operation="TABLE ACCESS" option="BY GLOBAL INDEX ROWID" optimizer="ANALYZED" object_owner="HIDE_OBJECT_OWNER" object_name="ORDERS_TAB" object_type="TABLE" object_instance="2" cost="1" cardinality="1" bytes="23" partition_start="ROW LOCATION" partition_stop="ROW LOCATION" partition_id="11" cpu_cost="5.730" io_cost="1" filter_predicates="&quot;ENTRYDATE&quot;&gt;=TO_DATE('2009-06-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND &quot;ENTRYDATE&quot;&lt;=TO_DATE('2009-10-21 00:00:00', 'yyyy-mm-dd hh24:mi:ss')" time="1">
                            <PlanElements>
                              <PlanElement object_ID="5" id="12" operation="INDEX" option="UNIQUE SCAN" optimizer="ANALYZED" object_owner="HIDE_OBJECT_OWNER" object_name="ORDERS_TAB_PK" object_type="INDEX (UNIQUE)" search_columns="1" cost="1" cardinality="1" cpu_cost="3.823" io_cost="1" access_predicates="&quot;INTERNALORDERID&quot;=&quot;H1&quot;.&quot;INTERNALORDERID&quot;" time="1"/>
                            </PlanElements>
                          </PlanElement>
                          <PlanElement object_ID="6" id="13" operation="TABLE ACCESS" option="BY GLOBAL INDEX ROWID" optimizer="ANALYZED" object_owner="HIDE_OBJECT_OWNER" object_name="ORDERS_TAB_ARCH" object_type="TABLE" object_instance="3" cost="1" cardinality="1" bytes="23" partition_start="ROW LOCATION" partition_stop="ROW LOCATION" partition_id="13" cpu_cost="5.719" io_cost="1" filter_predicates="&quot;ENTRYDATE&quot;&gt;=TO_DATE('2009-06-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND &quot;ENTRYDATE&quot;&lt;=TO_DATE('2009-10-21 00:00:00', 'yyyy-mm-dd hh24:mi:ss')" time="1">
                            <PlanElements>
                              <PlanElement object_ID="7" id="14" operation="INDEX" option="UNIQUE SCAN" optimizer="ANALYZED" object_owner="HIDE_OBJECT_OWNER" object_name="ORDERS_TAB_A_PK" object_type="INDEX (UNIQUE)" search_columns="1" cost="1" cardinality="1" cpu_cost="3.823" io_cost="1" access_predicates="&quot;INTERNALORDERID&quot;=&quot;H1&quot;.&quot;INTERNALORDERID&quot;" time="1"/>
                            </PlanElements>
                          </PlanElement>
                        </PlanElements>
                      </PlanElement>
                    </PlanElements>
                  </PlanElement>
                </PlanElements>
              </PlanElement>
            </PlanElements>
          </PlanElement>
        </PlanElements>
      </PlanElement>
    </ExplainPlan>All the columns involved are index.

Maybe you are looking for