<?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: doubt in read table statement. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919614#M1331264</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;See if this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

" t_tran and t_final structures are the same
  LOOP AT t_master INTO wa_master.
    LOOP AT t_tran INTO wa_tran.
      IF wa_tran-vbeln EQ master-vbeln.
        MOVE-CORRESPONDING wa_tran TO wa_final.
        APPEND wa_final TO t_final.
        CLEAR wa_final.
        CLEAR wa_tran.
      ENDIF.
    ENDLOOP.
    CLEAR wa_master.
  ENDLOOP.
" Describe statement to count the number of records in t_final 
" that is those that have satisfied your condition
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Nitwick on Jul 16, 2009 11:43 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jul 2009 06:12:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-16T06:12:15Z</dc:date>
    <item>
      <title>doubt in read table statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919604#M1331254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends&lt;/P&gt;&lt;P&gt;i have a doubt in read statement&lt;/P&gt;&lt;P&gt;please suggest me which one i can use.&lt;/P&gt;&lt;P&gt;i have one master table &lt;/P&gt;&lt;P&gt;with fields like &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;contract contract line wbs 
500060    10                XXX
500070     10               XXX
and the transaction table has
500060     10             01              01              01
500060      10            02              02              02
500070       10            01              01             01
500070       10            02              02              02&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i am doing is like &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at master table into wamastertable
read table tranintertab into tranintertab1 with key contract=wamastertable-contract                                                                                
contractline = wamastertable-contractline.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As my read query satifies multiple lines of transaction internal table i am in a posistion to do this&lt;/P&gt;&lt;P&gt;but if i do like the above it is giving error that tranintertab1 is not the line type of tranintertab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please provide me ur valuable suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 05:51:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919604#M1331254</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-16T05:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in read table statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919605#M1331255</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;Check the declaration of tranintertab1 in the Read statement. &lt;STRONG&gt;Tranintertab1&lt;/STRONG&gt; shjould be declared as workarea with the same structure of &lt;STRONG&gt;tranintertab&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 05:54:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919605#M1331255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-16T05:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in read table statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919606#M1331256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any need of using into traininternaltab1 in READ statement.&lt;/P&gt;&lt;P&gt;You can use without this also.&lt;/P&gt;&lt;P&gt;I think the proble is in declaration of this traininternaltab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 05:56:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919606#M1331256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-16T05:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in read table statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919607#M1331257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;CODE&gt;contract contract line wbs 
&amp;gt; 500060    10                XXX
&amp;gt; 500070     10               XXX
&amp;gt; and the transaction table has
&amp;gt; 500060     10          01              01              01
&amp;gt; 500060     10          02              02              02
&amp;gt; 500070     10          01              01             01
&amp;gt; 500070     10          02              02              02&lt;/CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at master table into wamastertable
&amp;gt; read table tranintertab into tranintertab1 with key contract=wamastertable-contract 
&amp;gt;                                                                                contractline = wamastertable-contractline.
&amp;gt; endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it like this.......... &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at tranintertab into tranintertab1.
 read table master table into wamastertable with key 
                                                                       contract = tranintertab1-contract 
                                                                  contractline = tranintertab1-contractline.
 endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suneel G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 05:57:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919607#M1331257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-16T05:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in read table statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919608#M1331258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the declaration tranintertab1 , this should be same structure as that of the tranintertab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 05:57:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919608#M1331258</guid>
      <dc:creator>Sandeep_Panghal</dc:creator>
      <dc:date>2009-07-16T05:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in read table statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919609#M1331259</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;Read Statement  : reads a line from the internal table into work area of the internal  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even the condiction satisfy many lines , it reads only one line line that to first satisfied line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want all records to be displayed ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run a loop at transaction Table ,  &lt;/P&gt;&lt;P&gt;Read a master table which will have one master record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try and reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 05:57:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919609#M1331259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-16T05:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in read table statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919610#M1331260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi avinash thanks for answering&lt;/P&gt;&lt;P&gt;but my doubt is&lt;/P&gt;&lt;P&gt;not exactly this&lt;/P&gt;&lt;P&gt;i need to transfer the contents of the that tranintertab into another intertab of same structure because it has mulitple lines satisfying the key of mastertab&lt;/P&gt;&lt;P&gt;so do i need to use read statement or someother &lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;s.janagar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 05:58:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919610#M1331260</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-16T05:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in read table statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919611#M1331261</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 loop into loop because you have multiple entries in transaction table .&lt;/P&gt;&lt;P&gt;and read statement can read only one record at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at master into wamastertable.&lt;/P&gt;&lt;P&gt;Loop at transaction where contract=wamastertable-contract and    contractline = wamastertable-contractline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 05:58:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919611#M1331261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-16T05:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in read table statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919612#M1331262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes anil&lt;/P&gt;&lt;P&gt;i need to count the entries statisfying that condition.&lt;/P&gt;&lt;P&gt;based upon the no. of lines satisfying that condition.&lt;/P&gt;&lt;P&gt;i need to do some manipulation&lt;/P&gt;&lt;P&gt;with regards&lt;/P&gt;&lt;P&gt;s.janagar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 06:00:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919612#M1331262</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-16T06:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in read table statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919613#M1331263</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;Loop at master into wamastertable.
Clear count.
Loop at transaction where contract=wamastertable-contract and contractline = wamastertable-contractline.
 Count = count + 1.
endloop.

" you get the count which satisfies the  given condition
Endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 06:11:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919613#M1331263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-16T06:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in read table statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919614#M1331264</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;See if this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

" t_tran and t_final structures are the same
  LOOP AT t_master INTO wa_master.
    LOOP AT t_tran INTO wa_tran.
      IF wa_tran-vbeln EQ master-vbeln.
        MOVE-CORRESPONDING wa_tran TO wa_final.
        APPEND wa_final TO t_final.
        CLEAR wa_final.
        CLEAR wa_tran.
      ENDIF.
    ENDLOOP.
    CLEAR wa_master.
  ENDLOOP.
" Describe statement to count the number of records in t_final 
" that is those that have satisfied your condition
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Nitwick on Jul 16, 2009 11:43 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 06:12:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919614#M1331264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-16T06:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in read table statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919615#M1331265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Janagar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you wish to read all lines in the transaction table satisfying the criteria, then you shoudl loop at transaction type instead of master table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at tranintertab into tranintertab1.
 read table master table into wamastertable with key 
                                                                       contract = tranintertab1-contract 
                                                                  contractline = tranintertab1-contractline.
 endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check the declaration of tranintertab1. It should be of the same structure as tranintertab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saumya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2009 06:13:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-read-table-statement/m-p/5919615#M1331265</guid>
      <dc:creator>saumya_govil</dc:creator>
      <dc:date>2009-07-16T06:13:36Z</dc:date>
    </item>
  </channel>
</rss>

