<?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: Real help needed in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/real-help-needed/m-p/3063470#M725812</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 this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Select * into itab from (  ( stko as p inner join stpo as k on p&lt;SUB&gt;stlnr = k&lt;/SUB&gt;stlnr )&lt;/P&gt;&lt;P&gt;                                                      inner join mast as t on p&lt;SUB&gt;stlnr = t&lt;/SUB&gt;stlnr ) wher &amp;lt;condition&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will helps.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bala.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Nov 2007 09:38:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-19T09:38:03Z</dc:date>
    <item>
      <title>Real help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/real-help-needed/m-p/3063466#M725808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;        There are three tables in SAP they are, stop, stko, mast. And i have to join them on the basis of STLNR, that's what i am not able to do, can you show me a way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2007 09:12:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/real-help-needed/m-p/3063466#M725808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-19T09:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Real help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/real-help-needed/m-p/3063467#M725809</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;   Use FOR ALL ENTRIES for that.&lt;/P&gt;&lt;P&gt;select data from stko based on stlnr then using for all entries select data from stpo and mast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select data&lt;/P&gt;&lt;P&gt;          from stko&lt;/P&gt;&lt;P&gt;          into table it_stko&lt;/P&gt;&lt;P&gt;          where stlnr in s_stlnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not it_stko[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select data&lt;/P&gt;&lt;P&gt;          from stpo&lt;/P&gt;&lt;P&gt;          into table it_stpo&lt;/P&gt;&lt;P&gt;          for all entries in it_stko&lt;/P&gt;&lt;P&gt;          where stlnr eq it_stko-stlnr.&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;if not it_stko[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select data&lt;/P&gt;&lt;P&gt;          from mast&lt;/P&gt;&lt;P&gt;          into table it_mast&lt;/P&gt;&lt;P&gt;          for all entries in it_stko&lt;/P&gt;&lt;P&gt;          where stlnr eq it_stko-stlnr.&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;Reward Points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2007 09:18:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/real-help-needed/m-p/3063467#M725809</guid>
      <dc:creator>former_member386202</dc:creator>
      <dc:date>2007-11-19T09:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Real help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/real-help-needed/m-p/3063468#M725810</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;BY USEING FOR ALL ENTRIES YOU CAN JOIN THESE 3 TABLES &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;FOR ALL ENTRIES WHERE&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... FOR ALL ENTRIES IN itab WHERE ... col operator itab-comp ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the addition FOR ALL ENTRIES is specified before the language element WHERE, then the components comp of the internal table itab can be used as operands when comparing with relational operators. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table itab must have a structured line type and the component comp must be compatible with the column col. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logical expression sql_cond of the WHERE condition can comprise various logical expressions by using AND and OR. However, if FOR ALL ENTRIES is specified, there must be at least one Comparison with a column of the internal table itab, which can be specified either statistically or dynamically (Release 6.40 and higher). In a statement with a SELECTstatement with FOR ALL ENTRIES, the addition ORDER BY can only be used with the addition PRIMARY KEY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The whole logical expression sql_cond is evaluated for each individual line of the internal table itab. The resulting set of the SELECT statement is the union of the resulting sets from the individual evaluations. Duplicate lines are automatically removed from the resulting set. If the internal table itab is empty, the whole WHERE statement is ignored and all lines in the database are put in the resulting set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Release 6.10 and higher, the same internal table can be specified after FOR ALL ENTRIES and after INTO. &lt;/P&gt;&lt;P&gt;The addition FOR ALL ENTRIES is only possible before WHERE conditions of the SELECT statement. &lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Exporting all flight data for a specified departure city. The relevant airlines and flight numbers are first put in an internal table entry_tab, which is evaluated in the WHERE condition of the subsquent SELECT statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS p_city TYPE spfli-cityfrom. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF entry_tab_type, &lt;/P&gt;&lt;P&gt;         carrid TYPE spfli-carrid, &lt;/P&gt;&lt;P&gt;         connid TYPE spfli-connid, &lt;/P&gt;&lt;P&gt;       END OF entry_tab_type. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: entry_tab   TYPE TABLE OF entry_tab_type, &lt;/P&gt;&lt;P&gt;      sflight_tab TYPE SORTED TABLE OF sflight &lt;/P&gt;&lt;P&gt;                       WITH UNIQUE KEY carrid connid fldate. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT carrid connid &lt;/P&gt;&lt;P&gt;       FROM spfli &lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF TABLE entry_tab &lt;/P&gt;&lt;P&gt;       WHERE cityfrom = p_city. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT carrid connid fldate &lt;/P&gt;&lt;P&gt;       FROM sflight &lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF TABLE sflight_tab &lt;/P&gt;&lt;P&gt;       FOR ALL ENTRIES IN entry_tab &lt;/P&gt;&lt;P&gt;       WHERE carrid = entry_tab-carrid AND &lt;/P&gt;&lt;P&gt;             connid = entry_tab-connid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2007 09:29:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/real-help-needed/m-p/3063468#M725810</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-19T09:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Real help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/real-help-needed/m-p/3063469#M725811</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;&lt;/P&gt;&lt;P&gt;select a&lt;SUB&gt;f1 b&lt;/SUB&gt; f2 c&lt;SUB&gt;f3 into corresponding fields of table itab from ( stop as a inner join stko as b on a&lt;/SUB&gt;STLNR = b&lt;SUB&gt;STLNR inner join mast as c on a&lt;/SUB&gt;STLNR = c~STLNR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f1 - field that you require from table stop&lt;/P&gt;&lt;P&gt;f2- field that you require from table stko&lt;/P&gt;&lt;P&gt;f3- field that you require from table  mast&lt;/P&gt;&lt;P&gt;itab -internal table.&lt;/P&gt;&lt;P&gt;STLNR- field that is common in 3 tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2007 09:36:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/real-help-needed/m-p/3063469#M725811</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-19T09:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Real help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/real-help-needed/m-p/3063470#M725812</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 this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Select * into itab from (  ( stko as p inner join stpo as k on p&lt;SUB&gt;stlnr = k&lt;/SUB&gt;stlnr )&lt;/P&gt;&lt;P&gt;                                                      inner join mast as t on p&lt;SUB&gt;stlnr = t&lt;/SUB&gt;stlnr ) wher &amp;lt;condition&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will helps.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bala.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2007 09:38:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/real-help-needed/m-p/3063470#M725812</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-19T09:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Real help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/real-help-needed/m-p/3063471#M725813</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;PRE&gt;&lt;CODE&gt;
TABLES : stpo, stko, mast.

SELECT-OPTIONS : s_stlnr FOR stpo-stlnr.

SELECT stpo~stlnr &amp;lt;field2&amp;gt;  &amp;lt;field3&amp;gt; &amp;lt;field4&amp;gt; ..... INTO TABLE itab FROM stpo
INNER JOIN stko ON stpo~stlnr = stko~stlnr
INNER JOIN mast ON stpo~stlnr = mast~stlnr WHERE

          stpo~stlnr IN s_stlnr.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2007 09:38:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/real-help-needed/m-p/3063471#M725813</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-19T09:38:11Z</dc:date>
    </item>
  </channel>
</rss>

