<?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: question on selection field in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744741#M323252</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of using select option just try FOR ALL entries in the second table. That might be better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides this query has 4 tables, i believe this is not a good approach,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT lfb1~lifnr lfb1~bukrs lfm1~ekorg lfa1~ktokk adrc~name1 adrc~name2

INTO TABLE it_sap_data
FROM ( lfb1 INNER JOIN lfa1 ON lfb1~lifnr EQ lfa1~lifnr )
LEFT OUTER JOIN adrc ON lfa1~adrnr EQ adrc~addrnumber
LEFT OUTER JOIN lfm1 ON lfa1~lifnr EQ lfm1~lifnr
WHERE lfa1~lifnr IN so_lifnr AND
lfb1~bukrs IN so_cocod.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kathirvel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Dec 2006 20:33:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-14T20:33:17Z</dc:date>
    <item>
      <title>question on selection field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744738#M323249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to code in my program, the ability to either select the vendor information by the vendor number that is entered on the selection which could be blank in which case I would select all vendors or by passing a vendor number from a table that I have created in the program. I have even went as far a concatenating the IEQ in front of the vendor number. when I use the vendor from the internal table, I still get all of the vendors and not just the one that I want  &lt;/P&gt;&lt;P&gt;can someone take a look at this code and let me know what I am doing wrong. (this is just a sample and not the entire program)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : so_cocod  FOR l_bukrs,&lt;/P&gt;&lt;P&gt;                 so_lifnr  FOR l_lifnr,&lt;/P&gt;&lt;P&gt;                 so_udate  FOR l_udate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.    "Main logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF so_udate IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    perform extract_change_data.&lt;/P&gt;&lt;P&gt;      LOOP at it_cdhdr into st_cdhdr.&lt;/P&gt;&lt;P&gt;        CONCATENATE 'IEQ' st_cdhdr-objectid INTO so_lifnr.&lt;/P&gt;&lt;P&gt;        perform extract_vendor_data.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    perform extract_vendor_data.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; FORM extract_change_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT distinct objectid&lt;/P&gt;&lt;P&gt;   INTO TABLE it_cdhdr&lt;/P&gt;&lt;P&gt;   FROM cdhdr&lt;/P&gt;&lt;P&gt;    WHERE objectclas = 'KRED'&lt;/P&gt;&lt;P&gt;    AND  udate in so_udate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ENDFORM. " xtract_change_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; FORM extract_vendor_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT&lt;/P&gt;&lt;P&gt;     lfb1&lt;SUB&gt;lifnr lfb1&lt;/SUB&gt;bukrs lfm1&lt;SUB&gt;ekorg lfa1&lt;/SUB&gt;ktokk adrc&lt;SUB&gt;name1 adrc&lt;/SUB&gt;name2&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;     INTO TABLE it_sap_data&lt;/P&gt;&lt;P&gt;      FROM ( lfb1 INNER JOIN lfa1 ON lfb1&lt;SUB&gt;lifnr EQ lfa1&lt;/SUB&gt;lifnr )&lt;/P&gt;&lt;P&gt;            LEFT OUTER JOIN adrc ON lfa1&lt;SUB&gt;adrnr EQ adrc&lt;/SUB&gt;addrnumber&lt;/P&gt;&lt;P&gt;            LEFT OUTER JOIN lfm1 ON lfa1&lt;SUB&gt;lifnr EQ lfm1&lt;/SUB&gt;lifnr&lt;/P&gt;&lt;P&gt;      WHERE lfa1~lifnr IN so_lifnr AND&lt;/P&gt;&lt;P&gt;           lfb1~bukrs IN so_cocod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. "extract_vendor_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance for the help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 20:19:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744738#M323249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T20:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: question on selection field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744739#M323250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Use inner join instead of Left outer join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Vara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 20:23:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744739#M323250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T20:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: question on selection field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744740#M323251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the select is just a sample of he full select that is in my program. I can include the full select if you wish. one more point - if I code the vendor number on the selection screen, the select will extract only that vendor. I am not sure why I just can fill the so_lifnr field with the vendor number from the internal table and have it select only that vendor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 20:28:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744740#M323251</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T20:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: question on selection field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744741#M323252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of using select option just try FOR ALL entries in the second table. That might be better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides this query has 4 tables, i believe this is not a good approach,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT lfb1~lifnr lfb1~bukrs lfm1~ekorg lfa1~ktokk adrc~name1 adrc~name2

INTO TABLE it_sap_data
FROM ( lfb1 INNER JOIN lfa1 ON lfb1~lifnr EQ lfa1~lifnr )
LEFT OUTER JOIN adrc ON lfa1~adrnr EQ adrc~addrnumber
LEFT OUTER JOIN lfm1 ON lfa1~lifnr EQ lfm1~lifnr
WHERE lfa1~lifnr IN so_lifnr AND
lfb1~bukrs IN so_cocod.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kathirvel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 20:33:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744741#M323252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T20:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: question on selection field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744742#M323253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Timothy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP at it_cdhdr into st_cdhdr.&lt;/P&gt;&lt;P&gt;CONCATENATE 'IEQ' st_cdhdr-objectid INTO so_lifnr.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;perform extract_vendor_data.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed that you are doing a select inside loop into table 'it_sap_data', don't your internal table 'it_sap_data'  is getting refreshed with new records everytime? This may be some other problem( i guess).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 20:34:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744742#M323253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T20:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: question on selection field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744743#M323254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  Try this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of &lt;/P&gt;&lt;P&gt;   CONCATENATE 'IEQ' st_cdhdr-objectid INTO so_lifnr.&lt;/P&gt;&lt;P&gt;use &lt;/P&gt;&lt;P&gt; so_lifnr = st_cdhdr-objectid+0(10).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the form extract_vendor_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;lfb1&lt;SUB&gt;lifnr lfb1&lt;/SUB&gt;bukrs lfm1&lt;SUB&gt;ekorg lfa1&lt;/SUB&gt;ktokk adrc&lt;SUB&gt;name1 adrc&lt;/SUB&gt;name2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTO TABLE it_sap_data&lt;/P&gt;&lt;P&gt;FROM ( lfb1 INNER JOIN lfa1 ON lfb1&lt;SUB&gt;lifnr EQ lfa1&lt;/SUB&gt;lifnr )&lt;/P&gt;&lt;P&gt;LEFT OUTER JOIN adrc ON lfa1&lt;SUB&gt;adrnr EQ adrc&lt;/SUB&gt;addrnumber&lt;/P&gt;&lt;P&gt;LEFT OUTER JOIN lfm1 ON lfa1&lt;SUB&gt;lifnr EQ lfm1&lt;/SUB&gt;lifnr&lt;/P&gt;&lt;P&gt;WHERE lfa1~lifnr = so_lifnr AND&lt;/P&gt;&lt;P&gt;lfb1~bukrs IN so_cocod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. "extract_vendor_data.&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;Vara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 20:37:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744743#M323254</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T20:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: question on selection field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744744#M323255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CONCATENATE 'IEQ' st_cdhdr-objectid INTO so_lifnr.
APPEND so_lifnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 20:38:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744744#M323255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T20:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: question on selection field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744745#M323256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your suggestion worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND so_lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what does this statement do. do you have time to expain this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 20:49:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744745#M323256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T20:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: question on selection field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744746#M323257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The select statement works with the actual table (select-option). Without doing the append, the data stays in the work area and the table remains empty. Since the table is empty, all entries will be picked up. after the append, the table has data that can be used by the select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 21:00:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744746#M323257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T21:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: question on selection field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744747#M323258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the explanation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 21:02:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744747#M323258</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T21:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: question on selection field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744748#M323259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't begin to count the number of times I've gotten into trouble by forgetting to do the append after moving the fields to the header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 21:05:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selection-field/m-p/1744748#M323259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T21:05:35Z</dc:date>
    </item>
  </channel>
</rss>

