<?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 selecting data from multiple tables. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721197#M1672777</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes. I used the Hide statement to display the incompleted sale order details from the Internal Table IT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at IT where GBSTK ne 'c'.&lt;/P&gt;&lt;P&gt;Format Hotspot on.&lt;/P&gt;&lt;P&gt;Write:/ IT-Vbeln, IT-Erdat, IT-Lfstk, IT-Gbstk.&lt;/P&gt;&lt;P&gt;Hide:&amp;nbsp; IT-Vbeln, IT-Erdat, IT-Lfstk, IT-Gbstk.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Apr 2012 16:45:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-04-17T16:45:19Z</dc:date>
    <item>
      <title>Question on selecting data from multiple tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721195#M1672775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to create a interactive report with fields from the table VBAP, LIPS, VBUK and VBBE. I fetched SO number, date, delivery and overall status from the table VBAP and VBUK and placed them in the internal table IT. By selection SO date in the selection screen, incomplete order details are displayed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in the output list, by selecting SO number, I want to display the no. of items, net price, delivered quantity and open quantity. I created another internal table to store these values. The first part is working fine. But the problem occurs in the below select query statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case Sy-Lsind.&lt;/P&gt;&lt;P&gt;When 1.&lt;/P&gt;&lt;P&gt;Format Hotspot on.&lt;/P&gt;&lt;P&gt;SELECT VBAP~VBELN VBAP~MATNR VBAP~KWMENG VBAP~NETPR LIPS~LFIMG VBBE~OMENG&lt;/P&gt;&lt;P&gt;FROM VBAP INNER JOIN LIPS ON VBAP~VBELN = LIPS~VBELN&lt;/P&gt;&lt;P&gt;INNER JOIN VBBE ON VBAP~VBELN = VBBE~VBELN&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELD OF TABLE IT1 WHERE VBAP~VBELN = IT-VBELN.&lt;/P&gt;&lt;P&gt;Loop at IT1.&lt;/P&gt;&lt;P&gt;Write: / IT11-VBELN, IT1-MATNR, IT1-KWMENG, IT1-NETPR, IT1-LFIMG, IT1-OMENG.&lt;/P&gt;&lt;P&gt;End Loop.&lt;/P&gt;&lt;P&gt;End Case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I click on SO number, it does not go into the secondary list. Please help me to fix this problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 16:13:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721195#M1672775</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-04-17T16:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Question on selecting data from multiple tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721196#M1672776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you read the documentation on the HIDE command?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 16:26:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721196#M1672776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-04-17T16:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Question on selecting data from multiple tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721197#M1672777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes. I used the Hide statement to display the incompleted sale order details from the Internal Table IT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at IT where GBSTK ne 'c'.&lt;/P&gt;&lt;P&gt;Format Hotspot on.&lt;/P&gt;&lt;P&gt;Write:/ IT-Vbeln, IT-Erdat, IT-Lfstk, IT-Gbstk.&lt;/P&gt;&lt;P&gt;Hide:&amp;nbsp; IT-Vbeln, IT-Erdat, IT-Lfstk, IT-Gbstk.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 16:45:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721197#M1672777</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-04-17T16:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Question on selecting data from multiple tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721198#M1672778</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;Did you put the "Write" statement on IT1 table in the AT LINE-SELECTION Event?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Andrei&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 17:11:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721198#M1672778</guid>
      <dc:creator>former_member184675</dc:creator>
      <dc:date>2012-04-17T17:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Question on selecting data from multiple tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721199#M1672779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How is IT-VBELN declared?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 17:14:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721199#M1672779</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-04-17T17:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Question on selecting data from multiple tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721200#M1672780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrei,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes. I used the write statement in the loop of IT1 in the AT LINE- SELECTION EVENT. Below is my coding after displaying the values of IT (Please see the reply to Rob). Then I tried to display the values of IT1 in secondary list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LINE-SELECTION.&lt;/P&gt;&lt;P&gt;WINDOW STARTING AT 5 5 ENDING AT 170 45.&lt;/P&gt;&lt;P&gt;CASE SY-LSIND.&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;* Please see the coding in my first post message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 11:08:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721200#M1672780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-04-18T11:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Question on selecting data from multiple tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721201#M1672781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA: BEGIN OF IT OCCURS 8,&lt;/P&gt;&lt;P&gt;VBELN TYPE VBAK-VBELN,&lt;/P&gt;&lt;P&gt;END OF IT.&lt;/P&gt;&lt;P&gt;This is how 'vbeln' declared in IT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 11:09:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721201#M1672781</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-04-18T11:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Question on selecting data from multiple tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721202#M1672782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u make sure that data exists in LIPS and VBBE table for your Sales Order? I think data is not present in one of the table and hence join query is failing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 11:15:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721202#M1672782</guid>
      <dc:creator>former_member209818</dc:creator>
      <dc:date>2012-04-18T11:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Question on selecting data from multiple tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721203#M1672783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, the problem is in your Select:&lt;/P&gt;&lt;P&gt;SELECT VBAP~VBELN VBAP~MATNR VBAP~KWMENG VBAP~NETPR LIPS~LFIMG VBBE~OMENG&lt;/P&gt;&lt;P&gt;FROM VBAP INNER JOIN LIPS ON VBAP~VBELN = LIPS~VBELN&lt;/P&gt;&lt;P&gt;INNER JOIN VBBE ON VBAP~VBELN = VBBE~VBELN&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELD OF TABLE IT1 WHERE VBAP~VBELN = IT-VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join by: VBAP~VBELN = LIPS~VGBEL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And put a check on sy-subrc&amp;nbsp; after the select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrei Sosea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 11:30:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721203#M1672783</guid>
      <dc:creator>former_member184675</dc:creator>
      <dc:date>2012-04-18T11:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Question on selecting data from multiple tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721204#M1672784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajee,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I know why you are using the CASE SY-LSIND. I guess this is causing the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sindhu Pulluru.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 11:32:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721204#M1672784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-04-18T11:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Question on selecting data from multiple tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721205#M1672785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Harshad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are right. The table LIPS does not have the record for the selected SO number in the output list. I tried the query statement without the LIPS table &amp;amp; its field. Now it is showing the values of IT in the secondary list. Thank you so much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, If data is not existing in the table used in query, Join condition fails. Is there any possibility to get the field blank in secondary list for not existing data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 11:32:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721205#M1672785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-04-18T11:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Question on selecting data from multiple tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721206#M1672786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. Using sy-subrc is always best to check whether value is in the table. Thank you for letting me know that VGBEL can also be used instead of VBELN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 11:54:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721206#M1672786</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-04-18T11:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Question on selecting data from multiple tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721207#M1672787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all. I got the answer why i am not getting the secondary list for the selected sale order. We can let user know about this via passing message. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But is there any possibility to get found values only in secondary list? i.e) In this case, LIPS does not have record, but other tables like VBBE, VBAP have the records for selected SO. Can we get only those in secondary window? If JOIN cannot perform this, how it can be done?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 12:01:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721207#M1672787</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-04-18T12:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Question on selecting data from multiple tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721208#M1672788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should expand your code logic. &lt;/P&gt;&lt;P&gt;Make the join on VBAP and VBBE and then get the LIPS data into a separate Internal Table (eg. GT_LIPS). Loop on IT1, do a read table on GT_LIPS with VGBEL and VGPOS as foreign keys, and move LFIMG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, depending on the business logic, you should consider displaying the Picked Quantity instead Delivered Quantity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrei Sosea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 12:34:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-selecting-data-from-multiple-tables/m-p/8721208#M1672788</guid>
      <dc:creator>former_member184675</dc:creator>
      <dc:date>2012-04-18T12:34:44Z</dc:date>
    </item>
  </channel>
</rss>

