<?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 problem in query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-query/m-p/6441718#M1412415</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guriji,&lt;/P&gt;&lt;P&gt;i have written one query.but this not working properly.&lt;/P&gt;&lt;P&gt;loop at itab .&lt;/P&gt;&lt;P&gt;read table itab2  WITH key kostl = itab-fictr.&lt;/P&gt;&lt;P&gt;if  itab-fictr = itab2-kostl .&lt;/P&gt;&lt;P&gt;read table itab2 with key hkont = temp_acc_code .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0 .&lt;/P&gt;&lt;P&gt;          itab-dmbtr = itab2-dmbtr .&lt;/P&gt;&lt;P&gt;    endif .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    modify itab transporting dmbtr .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;whhen internal table iab2 reads with kostl it reds only last kostl  and based on that it will not show output. the read condition i am stuck because in itab2 suppose there are 5 kostl (cost center ex. 1910,1000,1100,1090,1600)  .in this case it reads only 1600 and check . it will not consider remaining 4 kostl.&lt;/P&gt;&lt;P&gt;plz tell me what is problem in my query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2009 07:29:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-11-25T07:29:38Z</dc:date>
    <item>
      <title>problem in query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-query/m-p/6441718#M1412415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guriji,&lt;/P&gt;&lt;P&gt;i have written one query.but this not working properly.&lt;/P&gt;&lt;P&gt;loop at itab .&lt;/P&gt;&lt;P&gt;read table itab2  WITH key kostl = itab-fictr.&lt;/P&gt;&lt;P&gt;if  itab-fictr = itab2-kostl .&lt;/P&gt;&lt;P&gt;read table itab2 with key hkont = temp_acc_code .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0 .&lt;/P&gt;&lt;P&gt;          itab-dmbtr = itab2-dmbtr .&lt;/P&gt;&lt;P&gt;    endif .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    modify itab transporting dmbtr .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;whhen internal table iab2 reads with kostl it reds only last kostl  and based on that it will not show output. the read condition i am stuck because in itab2 suppose there are 5 kostl (cost center ex. 1910,1000,1100,1090,1600)  .in this case it reads only 1600 and check . it will not consider remaining 4 kostl.&lt;/P&gt;&lt;P&gt;plz tell me what is problem in my query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2009 07:29:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-query/m-p/6441718#M1412415</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-25T07:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: problem in query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-query/m-p/6441719#M1412416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab .
v_tabix = sy-tabix.
read table itab2 WITH key kostl = itab-fictr
                          hkont = temp_acc_code .
if sy-subrc = 0 .
  itab-dmbtr = itab2-dmbtr .
  modify itab transporting dmbtr index v_tabix.
endif.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2009 07:36:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-query/m-p/6441719#M1412416</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-11-25T07:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: problem in query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-query/m-p/6441720#M1412417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;
hi friend
&lt;PRE&gt;&lt;CODE&gt;

 sort itab2 by kostl hkont .
loop at itab.
read table itab2 into wt_tab2 with key kostl = itab-fictr 
                                                             hkont = itab-temp_acc_code binary search.
if sy-subrc eq 0.
itab-dmbtr = wt_tab2-dmbtr.
modify itab.
endif.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;
thanks &amp;amp; regards
surender
 &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2009 07:41:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-query/m-p/6441720#M1412417</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-25T07:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: problem in query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-query/m-p/6441721#M1412418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your code is correct and will work properly but is not optimised.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check you value of itab-fictr as the values KOSTL fetched from itab2 depends on this . If itab-fictr  = 1600 , then only last record of itab2 will be read and other four records will not be considered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you get it .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2009 08:03:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-query/m-p/6441721#M1412418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-25T08:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: problem in query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-query/m-p/6441722#M1412419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab .
l_tabix = sy-yabix.
read table itab2 WITH key kostl = itab-fictr
		          fictr =  itab-kostl
		     	  hkont = temp_acc_code transporting dmbtr.
check sy-subrc = 0.
itab-dmbtr = itab2-dmbtr .
modify itab index l_tabix transporting dmbtr .
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2009 08:13:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-query/m-p/6441722#M1412419</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-11-25T08:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: problem in query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-query/m-p/6441723#M1412420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;in this read table statement it checks only one condition but i want to check both condition.ie&lt;/P&gt;&lt;P&gt;read table itab2  with key kostl = itab-fictr&lt;/P&gt;&lt;P&gt;                        hkont = itab-acc_code binary search. &lt;/P&gt;&lt;P&gt;it checks one condition and based on this it modify the table..&lt;/P&gt;&lt;P&gt;thanks..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2009 10:25:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-query/m-p/6441723#M1412420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-25T10:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: problem in query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-query/m-p/6441724#M1412421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello can you tell how the internal tables holds the data before entering the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ksd on Nov 25, 2009 4:03 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2009 10:30:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-query/m-p/6441724#M1412421</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-11-25T10:30:36Z</dc:date>
    </item>
  </channel>
</rss>

