<?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: INNER JOIN problem in Funtion Module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848317#M45688</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arjan and Seshi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried doing the same way. My code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM trans_tab APPENDING CORRESPONDING FIELDS OF TABLE itab_trans.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN CURSOR WITH HOLD S_CURSOR FOR&lt;/P&gt;&lt;P&gt;SELECT * FROM pooled_tab APPENDING CORRESPONDING FIELDS OF TABLE itab_pooled FOR ALL ENTRIES IN itab_trans&lt;/P&gt;&lt;P&gt;WHERE field1 EQ itab_trans-field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error is: &lt;/P&gt;&lt;P&gt;The INTO clause must be specified with "FETCH NEXT CURSOR". It is not allowed with "OPEN CURSOR".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the cursor because i am implementing it in the Function Module. I don't understand the error. Could you tell me the reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jun 2005 20:27:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-06-02T20:27:24Z</dc:date>
    <item>
      <title>INNER JOIN problem in Funtion Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848313#M45684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am implementing a Function Module for creating a Generic DataSource. I am trying to extract data from 2 tables. One is a Transaparent table and the other is a pooled table. The problem is, i cannot perform a JOIN on Trasnparent and pooled tables. Can someone tell me any alternative way of extracting data by JOINING both these tables within the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2005 13:25:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848313#M45684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-02T13:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN problem in Funtion Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848314#M45685</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;As far as I know you can not use pooled tables or clusters in joins. For the tables the fields you see in the dictionary do not exist in the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to fetch the data from table 1 into an internal table and than make a selection on the second table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arjan Aalbers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2005 13:43:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848314#M45685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-02T13:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN problem in Funtion Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848315#M45686</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;Arjan is right , use an internal table to fetch records from the first DB table then use for all entries on thisn internal table and the 2nd DB table to fetch records into the final internal table where you intended to &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Seshi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2005 14:25:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848315#M45686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-02T14:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN problem in Funtion Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848316#M45687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Arjan and Seshi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try and let you know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2005 15:22:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848316#M45687</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-02T15:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN problem in Funtion Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848317#M45688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arjan and Seshi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried doing the same way. My code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM trans_tab APPENDING CORRESPONDING FIELDS OF TABLE itab_trans.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN CURSOR WITH HOLD S_CURSOR FOR&lt;/P&gt;&lt;P&gt;SELECT * FROM pooled_tab APPENDING CORRESPONDING FIELDS OF TABLE itab_pooled FOR ALL ENTRIES IN itab_trans&lt;/P&gt;&lt;P&gt;WHERE field1 EQ itab_trans-field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error is: &lt;/P&gt;&lt;P&gt;The INTO clause must be specified with "FETCH NEXT CURSOR". It is not allowed with "OPEN CURSOR".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the cursor because i am implementing it in the Function Module. I don't understand the error. Could you tell me the reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2005 20:27:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848317#M45688</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-02T20:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN problem in Funtion Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848318#M45689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Govind,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from trans_tab into corresponding fields of table itab_trans.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from pooled_tab into table itab_pooled for all entries in itab_trans where field1 eq itab_trans-field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS:you need to append the records only if the internal table is having exising records already.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2005 04:14:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848318#M45689</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-06-03T04:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN problem in Funtion Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848319#M45690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jayanthi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the way you said.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT Field1 FROM trans_table INTO CORRESPONDING FIELDS OF TABLE itab_trans WHERE Field1 IN S_Field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN CURSOR WITH HOLD S_CURSOR FOR&lt;/P&gt;&lt;P&gt;SELECT Field2 FROM pooled_table INTO CORRESPONDING FIELDS OF TABLE itab_pool FOR ALL ENTRIES IN itab_trans&lt;/P&gt;&lt;P&gt;WHERE Field2 EQ itab_trans-Field1 AND&lt;/P&gt;&lt;P&gt;      Field2 IN S_Field2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, i still get the same error.&lt;/P&gt;&lt;P&gt;The INTO clause must be specified with "FETCH NEXT CURSOR". It is not allowed with "OPEN CURSOR".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2005 14:30:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848319#M45690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-06T14:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN problem in Funtion Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848320#M45691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Acutally the above mentioned example did not say anything from open cursor. Is it a requirement to use open cursor in this case?&lt;/P&gt;&lt;P&gt;If so.... &lt;/P&gt;&lt;P&gt;I am not sure if it can be used with FOR ALL ENTRIES &lt;/P&gt;&lt;P&gt;but in this case. &lt;/P&gt;&lt;P&gt;But the syntax (from memory) &lt;/P&gt;&lt;P&gt;open cursor l_cursor for select * from ...for all entries......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;do. &lt;/P&gt;&lt;P&gt;fetch next cursor l_cursor into corresponding fields of table. &lt;/P&gt;&lt;P&gt;if not sy-subrc is initial. &lt;/P&gt;&lt;P&gt;close cursor l_cursor. &lt;/P&gt;&lt;P&gt;exit. &lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2005 18:53:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848320#M45691</guid>
      <dc:creator>ChristianFi</dc:creator>
      <dc:date>2005-06-06T18:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN problem in Funtion Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848321#M45692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Govind,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure why you are using OPEN cursor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just try like this without that open cursor statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT Field1 FROM trans_table INTO CORRESPONDING FIELDS OF TABLE itab_trans WHERE Field1 IN S_Field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT Field2 FROM pooled_table INTO CORRESPONDING FIELDS OF TABLE itab_pool FOR ALL ENTRIES IN itab_trans&lt;/P&gt;&lt;P&gt;WHERE Field2 EQ itab_trans-Field1 AND&lt;/P&gt;&lt;P&gt;Field2 IN S_Field2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2005 04:21:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem-in-funtion-module/m-p/848321#M45692</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-06-07T04:21:30Z</dc:date>
    </item>
  </channel>
</rss>

