<?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: How to implement Select option and parameter from multiple table in ABAP Report in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539834#M2006024</link>
    <description>&lt;P&gt;You could do it with a FOR ALL ENTRIES, but you have to check if the table is not empty (otherwise you will have the full table as result).&lt;/P&gt;&lt;P&gt;Or you could do INNER JOIN. It is how to make one SELECT statement and access to several table. For this you need to know the link between the tables. For MARA &amp;amp; MARC it is just the MATNR field.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT ....&lt;BR /&gt;             INTO ...&lt;BR /&gt;            FROM MARA &lt;BR /&gt;            INNER JOIN MARC&lt;BR /&gt;                        on MARA~MATNR = MARC~MATNR&lt;BR /&gt;            WHERE MARA~MATNR IN S_MATNR&lt;BR /&gt;            AND      MARC~WERKS IN  S_WERKS ...&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 23 Feb 2022 06:28:59 GMT</pubDate>
    <dc:creator>FredericGirod</dc:creator>
    <dc:date>2022-02-23T06:28:59Z</dc:date>
    <item>
      <title>How to implement Select option and parameter from multiple table in ABAP Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539832#M2006022</link>
      <description>&lt;P&gt;Hi folks,&lt;BR /&gt;&lt;BR /&gt;I'm New to SAP ABAP, need your help.&lt;BR /&gt;&lt;BR /&gt;I'm creating an alv report which displays data from multiple tables: mara, marc, one custom table, makt, mlgn.&lt;/P&gt;
  &lt;P&gt;On the selection screen, there are fields from each of these tables. It also has 2 parameters from different tables.&lt;BR /&gt;How do I implement select option and parameter, the only common field between these field is matnr,&lt;BR /&gt;&lt;BR /&gt;I know how to do it for select option from single table by using&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2023870-image.png" /&gt;.&lt;/P&gt;
  &lt;P&gt;but this is just for first table in second table&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2023871-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;doing this doesn't help as gt_marc would still have entries where s_meins doesn't match.&lt;/P&gt;
  &lt;P&gt;This is what I'm using for output&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2023872-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Please let me know if any more info is needed to resolve this.&lt;BR /&gt;&lt;BR /&gt;Also, if you could share a demo program where this has been implemented that might help too&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 00:25:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539832#M2006022</guid>
      <dc:creator>former_member1202638</dc:creator>
      <dc:date>2022-02-23T00:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement Select option and parameter from multiple table in ABAP Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539833#M2006023</link>
      <description>&lt;P&gt;Thank
you for visiting SAP Community to get answers to your questions. Since you're
asking a question here for the first time, I recommend that you familiarize
yourself with &lt;A href="https://community.sap.com/resources/questions-and-answers" target="test_blank"&gt;https://community.sap.com/resources/questions-and-answers&lt;/A&gt;, as it
provides tips for preparing questions that draw responses from our members. Feel
free to take our Q&amp;amp;A tutorial at
&lt;A href="https://developers.sap.com/tutorials/community-qa.html" target="test_blank"&gt;https://developers.sap.com/tutorials/community-qa.html&lt;/A&gt; as well, as that will
help you when submitting questions to the community.&lt;/P&gt;

&lt;P&gt;I
also recommend that you include a profile picture. By personalizing your
profile, you encourage readers to respond:
&lt;A href="https://developers.sap.com/tutorials/community-profile.html" target="test_blank"&gt;https://developers.sap.com/tutorials/community-profile.html&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Kind
regards,&lt;/P&gt;

&lt;P&gt;--Jerry&lt;/P&gt;

&lt;P&gt;Moderation
Lead&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 00:26:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539833#M2006023</guid>
      <dc:creator>jerryjanda</dc:creator>
      <dc:date>2022-02-23T00:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement Select option and parameter from multiple table in ABAP Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539834#M2006024</link>
      <description>&lt;P&gt;You could do it with a FOR ALL ENTRIES, but you have to check if the table is not empty (otherwise you will have the full table as result).&lt;/P&gt;&lt;P&gt;Or you could do INNER JOIN. It is how to make one SELECT statement and access to several table. For this you need to know the link between the tables. For MARA &amp;amp; MARC it is just the MATNR field.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT ....&lt;BR /&gt;             INTO ...&lt;BR /&gt;            FROM MARA &lt;BR /&gt;            INNER JOIN MARC&lt;BR /&gt;                        on MARA~MATNR = MARC~MATNR&lt;BR /&gt;            WHERE MARA~MATNR IN S_MATNR&lt;BR /&gt;            AND      MARC~WERKS IN  S_WERKS ...&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Feb 2022 06:28:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539834#M2006024</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2022-02-23T06:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement Select option and parameter from multiple table in ABAP Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539835#M2006025</link>
      <description>&lt;P&gt;Please paste code as text instead of image, so that people can copy it, test, and paste fixed code in the answer.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 07:20:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539835#M2006025</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-02-23T07:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement Select option and parameter from multiple table in ABAP Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539836#M2006026</link>
      <description>&lt;P&gt;Look up some online resources on the basics of relational databases/SQL if you're not familiar with databases yet. Some context on stuff like (primary and foreign) keys, relationships, and join conditions will help you a lot.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 08:53:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539836#M2006026</guid>
      <dc:creator>LaurensDeprost</dc:creator>
      <dc:date>2022-02-23T08:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement Select option and parameter from multiple table in ABAP Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539837#M2006027</link>
      <description>&lt;P&gt;Hi, check if following helpful.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT MARC~MATNR ,&lt;BR /&gt;       MARC~WERKS,&lt;BR /&gt;       MARC~QZGTP,&lt;BR /&gt;       MARC~MAXLZ,&lt;BR /&gt;       MARC~MABST,&lt;BR /&gt;       MARC~MINBE,&lt;BR /&gt;       MARA~MEINS,&lt;BR /&gt;       MARA~MATKL,&lt;BR /&gt;       MARA~MFRNR&lt;BR /&gt;  FROM MARC&lt;BR /&gt;  Inner join MARA On MARC~MATNR = MARA~MATNR&lt;BR /&gt;  WHERE werks in @s_werks&lt;BR /&gt;  and MARC~matnr in @s_matnr&lt;BR /&gt;  and MARC~qzgtp in @s_qzgtp&lt;BR /&gt;  and MARC~maxlz in @s_mabst&lt;BR /&gt;  and MARC~minbe in @s_minbe&lt;BR /&gt;  INTO table @data(IT_LOC).&lt;BR /&gt;&lt;BR /&gt;  SORT IT_LOC BY MATNR.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;    &lt;BR /&gt;    IF IT_LOC IS NOT INITIAL.&lt;BR /&gt;      CL_SALV_TABLE=&amp;gt;FACTORY( IMPORTING R_SALV_TABLE = DATA(LO_ALV)&lt;BR /&gt;                              CHANGING T_TABLE = IT_LOC ).&lt;BR /&gt;      IF LO_ALV IS BOUND.&lt;BR /&gt;        DATA(LO_FUNCTIONS) = LO_ALV-&amp;gt;GET_FUNCTIONS( ).&lt;BR /&gt;        LO_FUNCTIONS-&amp;gt;SET_ALL( 'X' ).&lt;BR /&gt;        LO_ALV-&amp;gt;DISPLAY( ).&lt;BR /&gt;      ENDIF.&lt;BR /&gt;    ELSE.&lt;BR /&gt;      MESSAGE 'NO DATA FOUND' TYPE 'E'.&lt;BR /&gt;    ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Feb 2022 10:46:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539837#M2006027</guid>
      <dc:creator>former_member9115</dc:creator>
      <dc:date>2022-02-23T10:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement Select option and parameter from multiple table in ABAP Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539838#M2006028</link>
      <description>&lt;P&gt;And, generally, JOINS are more efficient that FOR ALL ENTRIES:&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 11:19:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539838#M2006028</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-02-23T11:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement Select option and parameter from multiple table in ABAP Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539839#M2006029</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;matthew.billingham&lt;/SPAN&gt;, this is your favorite discussion &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;   &lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 11:33:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-implement-select-option-and-parameter-from-multiple-table-in-abap/m-p/12539839#M2006029</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2022-02-23T11:33:17Z</dc:date>
    </item>
  </channel>
</rss>

