<?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 Function module problem.... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/1261927#M147931</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a problem with my function module below. What I want to do is to convert the werks found in my itab to their respective bukrs and put it in a range so I may later use them in my select statement. My code below does not run I dont know why. Help would be greatly appreciated. Thanks a lot and have a nice day!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_equz.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'CF_TA_T001W_READ'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              t001w_exp       = gv_bukrs&lt;/P&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;P&gt;              werks_imp       = it_equz-iwerk&lt;/P&gt;&lt;P&gt;         EXCEPTIONS&lt;/P&gt;&lt;P&gt;              not_found_werks = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    r_iwerk-sign = 'I'.&lt;/P&gt;&lt;P&gt;    r_iwerk-option = 'EQ'.&lt;/P&gt;&lt;P&gt;    r_iwerk-low = gv_bukrs.&lt;/P&gt;&lt;P&gt;    APPEND r_iwerk.&lt;/P&gt;&lt;P&gt;    CLEAR r_iwerk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Apr 2006 01:32:29 GMT</pubDate>
    <dc:creator>aris_hidalgo</dc:creator>
    <dc:date>2006-04-25T01:32:29Z</dc:date>
    <item>
      <title>Function module problem....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/1261927#M147931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a problem with my function module below. What I want to do is to convert the werks found in my itab to their respective bukrs and put it in a range so I may later use them in my select statement. My code below does not run I dont know why. Help would be greatly appreciated. Thanks a lot and have a nice day!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_equz.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'CF_TA_T001W_READ'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              t001w_exp       = gv_bukrs&lt;/P&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;P&gt;              werks_imp       = it_equz-iwerk&lt;/P&gt;&lt;P&gt;         EXCEPTIONS&lt;/P&gt;&lt;P&gt;              not_found_werks = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    r_iwerk-sign = 'I'.&lt;/P&gt;&lt;P&gt;    r_iwerk-option = 'EQ'.&lt;/P&gt;&lt;P&gt;    r_iwerk-low = gv_bukrs.&lt;/P&gt;&lt;P&gt;    APPEND r_iwerk.&lt;/P&gt;&lt;P&gt;    CLEAR r_iwerk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2006 01:32:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/1261927#M147931</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-04-25T01:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Function module problem....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/1261928#M147932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi viraylab,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  r u trying to export gv_bukrs and get the plant value? looks like what you need and what you are trying is totally different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Why dont you use normal select statements to achieve the same. I think there is a table which holds the relation between werks and bukrs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I think in your code you are passing bukrs value to get plant value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Regards&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2006 01:51:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/1261928#M147932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-25T01:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Function module problem....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/1261929#M147933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijayendra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I solved my prblem. I instead used FM HRCA_PLANT_GET_COMPANYCODE and it worked fine. However, is there a way to just select all the distinct records in a particular field in an itab since I do not need duplicates.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2006 01:53:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/1261929#M147933</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-04-25T01:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Function module problem....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/1261930#M147934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Viraylab,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; You can select distinct fields from the database directly. I would prefer using delete adjacent duplicates after sorting the table. This makes it even faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Again it depends on which table you are using to select data from.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2006 01:56:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-problem/m-p/1261930#M147934</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-25T01:56:28Z</dc:date>
    </item>
  </channel>
</rss>

