<?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: creating a query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-a-query/m-p/904471#M55862</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;Try the following.&lt;/P&gt;&lt;P&gt;declare i_konv ,i_jhak,i_output according to your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select knumv kwert kawrt kbetr into table i_konv from konv where kunnr = p_custid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;select knumv kunnr ..... into table i_jhak from jhak for all entries in i_konv where knumv = i_konv-knumv and kunnr = p_custid.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_konv into w_konv.&lt;/P&gt;&lt;P&gt;move-corresponding w_konv to w_output.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;loop at i_jhak into w_jhak where knumv = w_konv-knumv.&lt;/P&gt;&lt;P&gt;move-corresponding w_jhak to w_output.&lt;/P&gt;&lt;P&gt;append w_output to i_output.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hoipe this helps.If so,reward points.Otherwise get back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jun 2005 03:59:15 GMT</pubDate>
    <dc:creator>jayanthi_jayaraman</dc:creator>
    <dc:date>2005-06-22T03:59:15Z</dc:date>
    <item>
      <title>creating a query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-a-query/m-p/904470#M55861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone who can help me in this query?? Thanks a lot in advance.&lt;/P&gt;&lt;P&gt;I have two tables&lt;/P&gt;&lt;P&gt;Table 1 : jhak&lt;/P&gt;&lt;P&gt;Table 2 : Konv (cluster table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The selection is based on the field customer number -(kunnr) in jhak table The common field between the two tables is 'knumv' and I need to extract data fields kwert,kawrt, kbetr from konv for the customer (the customer number data will be entered by the end user in the parameter-options field p_custid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot create views or use join statement to create the query. How can I create a linke between the two tables and extract data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much in advance.&lt;/P&gt;&lt;P&gt;santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2005 21:55:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-a-query/m-p/904470#M55861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-21T21:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: creating a query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-a-query/m-p/904471#M55862</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;Try the following.&lt;/P&gt;&lt;P&gt;declare i_konv ,i_jhak,i_output according to your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select knumv kwert kawrt kbetr into table i_konv from konv where kunnr = p_custid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;select knumv kunnr ..... into table i_jhak from jhak for all entries in i_konv where knumv = i_konv-knumv and kunnr = p_custid.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_konv into w_konv.&lt;/P&gt;&lt;P&gt;move-corresponding w_konv to w_output.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;loop at i_jhak into w_jhak where knumv = w_konv-knumv.&lt;/P&gt;&lt;P&gt;move-corresponding w_jhak to w_output.&lt;/P&gt;&lt;P&gt;append w_output to i_output.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hoipe this helps.If so,reward points.Otherwise get back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2005 03:59:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-a-query/m-p/904471#M55862</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-06-22T03:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: creating a query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-a-query/m-p/904472#M55863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks Jayanti.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate your help. The requirements have changed but it certianly helps I will implement it. If I have any questions I will get back to you on that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will reward the points to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the field issue in the form is not solved yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2005 20:01:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-a-query/m-p/904472#M55863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-22T20:01:42Z</dc:date>
    </item>
  </channel>
</rss>

