<?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 Difficulties with table output in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588528#M2010010</link>
    <description>&lt;P&gt;Hi everyone.&lt;/P&gt;
  &lt;P&gt;I am having some problems with a program. I know that the problem is that I am using two Selects. Could someone please help me with this issue? The problem is in &lt;STRONG&gt;locnr&lt;/STRONG&gt; value. The table shows dublicated values. Screenshot will be attached.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;SELECT-OPTIONS : &lt;BR /&gt; filia FOR wint_carrh-asort DEFAULT ' ' &lt;BR /&gt; MATCHCODE OBJECT wsor, &lt;BR /&gt; p_locnr FOR wrsz-locnr, &lt;BR /&gt; p_artnr FOR wlk1-artnr. &lt;BR /&gt;LOOP AT i_werks.&lt;BR /&gt; FREE i_wlk1.&lt;BR /&gt; SELECT wlk1~* INTO TABLE @i_wlk1 FROM wlk1&lt;BR /&gt; JOIN wrsz ON wrsz~asort EQ wlk1~filia&lt;BR /&gt; WHERE filia EQ @wlk1-filia&lt;BR /&gt; AND wlk1~datbi GE @datum_rc&lt;BR /&gt; AND wlk1~datbi LE @max_datum&lt;BR /&gt; AND quell EQ '3' &lt;BR /&gt; AND locnr IN @p_locnr &lt;BR /&gt; AND wlk1~artnr IN @p_artnr. &lt;BR /&gt;.........&lt;BR /&gt;ENDLOOP.&lt;BR /&gt;LOOP AT lt_output ASSIGNING &amp;lt;fs_output&amp;gt;.&lt;BR /&gt; PERFORM material_read_mara(saplwso1)&lt;BR /&gt; USING &amp;lt;fs_output&amp;gt;-artnr sy-datum mara makt.&lt;BR /&gt; &amp;lt;fs_output&amp;gt;-maktx = makt-maktx.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;BR /&gt; SELECT SINGLE locnr INTO &amp;lt;fs_output&amp;gt;-locnr FROM wrsz WHERE asort EQ &amp;lt;fs_output&amp;gt;-filia AND datbi GE sy-datum AND locnr IN p_locnr. &lt;BR /&gt; SELECT SINGLE name1 INTO &amp;lt;fs_output&amp;gt;-name1 FROM t001w WHERE werks EQ &amp;lt;fs_output&amp;gt;-locnr.&lt;/P&gt;
  &lt;P&gt;ENDLOOP.&lt;/P&gt;
  &lt;P&gt;Result:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2047659-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2047660-photo-2022-05-10-18-13-03.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;If any other piece of code is needed, I will provide it.&lt;/P&gt;
  &lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
    <pubDate>Wed, 11 May 2022 09:24:00 GMT</pubDate>
    <dc:creator>former_member797394</dc:creator>
    <dc:date>2022-05-11T09:24:00Z</dc:date>
    <item>
      <title>Difficulties with table output</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588528#M2010010</link>
      <description>&lt;P&gt;Hi everyone.&lt;/P&gt;
  &lt;P&gt;I am having some problems with a program. I know that the problem is that I am using two Selects. Could someone please help me with this issue? The problem is in &lt;STRONG&gt;locnr&lt;/STRONG&gt; value. The table shows dublicated values. Screenshot will be attached.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;SELECT-OPTIONS : &lt;BR /&gt; filia FOR wint_carrh-asort DEFAULT ' ' &lt;BR /&gt; MATCHCODE OBJECT wsor, &lt;BR /&gt; p_locnr FOR wrsz-locnr, &lt;BR /&gt; p_artnr FOR wlk1-artnr. &lt;BR /&gt;LOOP AT i_werks.&lt;BR /&gt; FREE i_wlk1.&lt;BR /&gt; SELECT wlk1~* INTO TABLE @i_wlk1 FROM wlk1&lt;BR /&gt; JOIN wrsz ON wrsz~asort EQ wlk1~filia&lt;BR /&gt; WHERE filia EQ @wlk1-filia&lt;BR /&gt; AND wlk1~datbi GE @datum_rc&lt;BR /&gt; AND wlk1~datbi LE @max_datum&lt;BR /&gt; AND quell EQ '3' &lt;BR /&gt; AND locnr IN @p_locnr &lt;BR /&gt; AND wlk1~artnr IN @p_artnr. &lt;BR /&gt;.........&lt;BR /&gt;ENDLOOP.&lt;BR /&gt;LOOP AT lt_output ASSIGNING &amp;lt;fs_output&amp;gt;.&lt;BR /&gt; PERFORM material_read_mara(saplwso1)&lt;BR /&gt; USING &amp;lt;fs_output&amp;gt;-artnr sy-datum mara makt.&lt;BR /&gt; &amp;lt;fs_output&amp;gt;-maktx = makt-maktx.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;BR /&gt; SELECT SINGLE locnr INTO &amp;lt;fs_output&amp;gt;-locnr FROM wrsz WHERE asort EQ &amp;lt;fs_output&amp;gt;-filia AND datbi GE sy-datum AND locnr IN p_locnr. &lt;BR /&gt; SELECT SINGLE name1 INTO &amp;lt;fs_output&amp;gt;-name1 FROM t001w WHERE werks EQ &amp;lt;fs_output&amp;gt;-locnr.&lt;/P&gt;
  &lt;P&gt;ENDLOOP.&lt;/P&gt;
  &lt;P&gt;Result:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2047659-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2047660-photo-2022-05-10-18-13-03.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;If any other piece of code is needed, I will provide it.&lt;/P&gt;
  &lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 09:24:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588528#M2010010</guid>
      <dc:creator>former_member797394</dc:creator>
      <dc:date>2022-05-11T09:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties with table output</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588529#M2010011</link>
      <description>&lt;P&gt;Please edit your question, select your code and press the button [CODE], which makes the code appear colored/indented, it will be easier for people to look at it. Thank you! &lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 11:21:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588529#M2010011</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-05-11T11:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties with table output</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588530#M2010012</link>
      <description>&lt;P&gt;Your question is not more clear than your previous one (https://answers.sap.com/questions/13634681/selection-screen-problems-1.html).&lt;/P&gt;&lt;P&gt;If you don't post the whole code, then please explain the details which are needed for us to understand.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 11:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588530#M2010012</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-05-11T11:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties with table output</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588531#M2010013</link>
      <description>&lt;P&gt;The code itself works well, however it duplicates the values after I made some additions to my code. Shall I share whole code for better understanding? &lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 11:34:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588531#M2010013</guid>
      <dc:creator>former_member797394</dc:creator>
      <dc:date>2022-05-11T11:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties with table output</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588532#M2010014</link>
      <description>&lt;P&gt;I prefer that you don't post the whole code, I prefer that you investigate and locate approximately your error so that to ask a more precise question. But if you don't know what details to give so that people can understand, then it's better that you post the whole code (please attach txt file).&lt;/P&gt;&lt;P&gt;Example about missing info: you didn't post any code about LT_OUTPUT, which is the most important information. I guess that it's the ALV internal table, but nobody can know how you fill it...&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 11:53:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588532#M2010014</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-05-11T11:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties with table output</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588533#M2010015</link>
      <description>&lt;P&gt;yeah, sorry that I could not fully explain the problem, I am not that good in this. I would rather post the source code. If anything else is needed, I am here to provide. Thank you! &lt;A href="https://answers.sap.com/storage/temp/2047681-source-code.txt" data-attachment="2047681"&gt;source-code.txt&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 12:46:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588533#M2010015</guid>
      <dc:creator>former_member797394</dc:creator>
      <dc:date>2022-05-11T12:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties with table output</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588534#M2010016</link>
      <description>&lt;P&gt;Your program is too complex for anyone in the forum, and most importantly we can't play it with your data.&lt;/P&gt;&lt;P&gt;If I understand your question, you say that you have duplicate values for LOCNR.&lt;/P&gt;&lt;P&gt;If that's the question, I don't see any code in your program where you remove the duplicates.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 18:14:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588534#M2010016</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-05-11T18:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties with table output</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588535#M2010017</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;sandrarossi&lt;/SPAN&gt; thank you for your time and effort! &lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 04:23:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulties-with-table-output/m-p/12588535#M2010017</guid>
      <dc:creator>former_member797394</dc:creator>
      <dc:date>2022-05-12T04:23:07Z</dc:date>
    </item>
  </channel>
</rss>

