<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: All fields are needed during INNER JOIN in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919506#M687428</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : mara,mard.&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;       matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;       mtart like mara-mtart,&lt;/P&gt;&lt;P&gt;       werks like mard-werks,&lt;/P&gt;&lt;P&gt;       lgort like mard-lgort,&lt;/P&gt;&lt;P&gt;       end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * &amp;lt;b&amp;gt;into corresponding fields of table itab&amp;lt;/b&amp;gt; from mara as a join&lt;/P&gt;&lt;P&gt;                                     mard as b on a&lt;SUB&gt;matnr = b&lt;/SUB&gt;matnr up to 30 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;write : / itab-matnr, itab-mtart,itab-werks,itab-lgort.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 13 Oct 2007 06:41:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-13T06:41:45Z</dc:date>
    <item>
      <title>All fields are needed during INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919504#M687426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I come across with a scenario during the inner join of table A and table B, the result should contains all the fields from table A and B. Normally we will only select particular fields that we need in the INNER JOIN statement, but never have a chance to select all fields like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence, i would need your advice on &amp;lt;u&amp;gt;how to code&amp;lt;/u&amp;gt; by selecting all fields from table A and B during INNER JOIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2007 06:30:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919504#M687426</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-13T06:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: All fields are needed during INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919505#M687427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this Sample code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables: zvijirank,
        zvijirank1.
*        ZVIJIRANK2.

data : a type zvijirank occurs 10 with header line,
       b type zvijirank1 occurs 10 with header line.
*       C TYPE ZVIJIRANK2 OCCURS 10 WITH HEADER LINE.

data : name like zvijirank-name,
       total like zvijirank1-total,
       reg_no like zvijirank.
*       regno type i.


data : begin of wa,
       name type zvijirank-name,
       total type zvijirank1-total,
       branch type zvijirank1-branch,
       reg_no type zvijirank-reg_no,
*       FNAME TYPE ZVIJIRANK2-F_NAME,
*       MNAME TYPE ZVIJIRANK2-M_NAME,
*       CITY TYPE ZVIJIRANK2-CITY,
*       TEL_NO TYPE ZVIJIRANK2-TEL_NO,
       end of wa.



data : it like standard table of wa with header line,
       it1 like standard table of wa with header line.

*
selection-screen : begin of screen 9010.
parameters : regno type i matchcode object zreg.
selection-screen : end of screen 9010.

*regno = '00100'.

call selection-screen 9010.

select a~name b~total b~branch a~reg_no into table it from zvijirank as a inner join zvijirank1 as b on a~reg_no = b~reg_no .

loop at it.

if it-reg_no eq regno.

write : 'NAME   :', it-name,
        'REG_NO :', it-reg_no,
         'TOTAL :', it-total.

ENDIF.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Reward If Helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2007 06:34:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919505#M687427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-13T06:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: All fields are needed during INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919506#M687428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : mara,mard.&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;       matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;       mtart like mara-mtart,&lt;/P&gt;&lt;P&gt;       werks like mard-werks,&lt;/P&gt;&lt;P&gt;       lgort like mard-lgort,&lt;/P&gt;&lt;P&gt;       end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * &amp;lt;b&amp;gt;into corresponding fields of table itab&amp;lt;/b&amp;gt; from mara as a join&lt;/P&gt;&lt;P&gt;                                     mard as b on a&lt;SUB&gt;matnr = b&lt;/SUB&gt;matnr up to 30 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;write : / itab-matnr, itab-mtart,itab-werks,itab-lgort.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2007 06:41:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919506#M687428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-13T06:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: All fields are needed during INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919507#M687429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi shiba dutta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your prompt reply. However to be specific below is my scenario:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to perform inner join between MARA and MARC. Where the result only need to grab all fields from MARC. And im using code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES: BEGIN OF TY_MARC.
           INCLUDE STRUCTURE MARC.
TYPES: END OF TY_MARC.
DATA: TA_MARC TYPE STANDARD TABLE OF TY_MARC.

SELECT * INTO CORRESPONDING FIELD OF TABLE TA_MARC
  FROM MARA AS A INNER JOIN MARC AS C
  ON A~MATNR = C~MATNR
  WHERE A~MATNR IN SO_MATNR. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since MARC hacing 200++ fields, im just worried for the statement "INTO CORRESPONDING" will dramatically reduce the selection performance. What you think? Is there a better way to achieve the above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please comment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2007 07:25:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919507#M687429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-13T07:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: All fields are needed during INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919508#M687430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes it is correct that into corresponding fields will decrese the performance. But i think there is no other way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why dont you try for all entries?&lt;/P&gt;&lt;P&gt;try this sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : mara, marc.&lt;/P&gt;&lt;P&gt;data : imarc like table of marc with header line.&lt;/P&gt;&lt;P&gt;data : imara like table of mara with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from mara into table imara up to 10 rows.&lt;/P&gt;&lt;P&gt;if not imara[] is initial.&lt;/P&gt;&lt;P&gt;select * from marc into table imarc for all entries in imara where matnr = imara-matnr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2007 08:00:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919508#M687430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-13T08:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: All fields are needed during INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919509#M687431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI FSCHU,&lt;/P&gt;&lt;P&gt;                what is the need of into corresponding fields here beause u have already taken the entire structure of marc &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think it is not needed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sandhya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2007 08:09:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919509#M687431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-13T08:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: All fields are needed during INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919510#M687432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi shiba dutta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically i did tried on the FOR ALL ENTRIES as well. &amp;lt;u&amp;gt;But the result doesn't seems better than the INNER JOIN&amp;lt;/u&amp;gt;, because the number of data being processed is &amp;lt;b&amp;gt;100,000&amp;lt;/b&amp;gt; where it caused FOR ALL ENTRIES performing bad.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did posted a thread for this issue with subject "issue FOR ALL ENTRIES".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please comment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2007 08:17:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919510#M687432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-13T08:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: All fields are needed during INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919511#M687433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;there's a nice workaround - you can of course select all fields of just one table in the SELECT command with INNER JOIN - first prepare the list of fields (all fields of a table) to be selected - AUTOMATICALLY - and then perform the desired SELECT command &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fell free to see and use the code snippet from my blog: &lt;A class="jive-link-external-small" href="http://oprsteny.com/?p=1368"&gt;ABAP - Select * (all columns) and INNER JOIN&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 08:21:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-fields-are-needed-during-inner-join/m-p/2919511#M687433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-03-31T08:21:27Z</dc:date>
    </item>
  </channel>
</rss>

