<?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: Record Selection Problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/record-selection-problem/m-p/3404027#M817428</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi dude,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   First of all check your t_vbap internal table declaration.&lt;/P&gt;&lt;P&gt;   See to that whether all of the fields to be diaplayed in the report are included in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also tell me whether the appending addition to the second select meets your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lakshmanan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Feb 2008 10:14:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-11T10:14:00Z</dc:date>
    <item>
      <title>Record Selection Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/record-selection-problem/m-p/3404022#M817423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Please see the Query below:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Part 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;select&lt;/P&gt;&lt;P&gt;vbeln  posnr  meins  matnr  werks  netwr&lt;/P&gt;&lt;P&gt;kwmeng  vrkme  matwa  charg  pstyv&lt;/P&gt;&lt;P&gt;posar  prodh  grkor  antlf  kztlf  lprio&lt;/P&gt;&lt;P&gt;vstel  route  umvkz  umvkn  abgru  untto&lt;/P&gt;&lt;P&gt;awahr  erdat  erzet  fixmg  prctr  vpmat&lt;/P&gt;&lt;P&gt;vpwrk  mvgr1  mvgr2  mvgr3  mvgr4  mvgr5&lt;/P&gt;&lt;P&gt;bedae  cuobj  mtvfp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into corresponding fields of table t_vbap&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from vbap&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;( ( erdat &amp;gt; pre_dat ) and ( erdat &amp;lt;= w_date ) ) and&lt;/P&gt;&lt;P&gt;( ( ( erdat &amp;gt; pre_dat and erdat &amp;lt; p_syndt ) or&lt;/P&gt;&lt;P&gt;( erdat = p_syndt and erzet &amp;lt;= p_syntm ) ) ) and&lt;/P&gt;&lt;P&gt;matnr in s_matnr and&lt;/P&gt;&lt;P&gt;pstyv in s_itmcat and&lt;/P&gt;&lt;P&gt;lfrel in s_lfrel and&lt;/P&gt;&lt;P&gt;abgru = ' ' and&lt;/P&gt;&lt;P&gt;kwmeng &amp;gt; 0 and&lt;/P&gt;&lt;P&gt;mtvfp in w_mtvfp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Part 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select  etenr  wmeng  bmeng  ettyp  wepos  abart  edatu&lt;/P&gt;&lt;P&gt;tddat  mbdat  lddat  wadat  abruf  etart  ezeit&lt;/P&gt;&lt;P&gt;into corresponding fields of table t_vbap&lt;/P&gt;&lt;P&gt;from vbep&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for all entries in t_vbap&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;vbeln = t_vbap-vbeln and&lt;/P&gt;&lt;P&gt;posnr = t_vbap-posnr and&lt;/P&gt;&lt;P&gt;ettyp in w_ettyp and&lt;/P&gt;&lt;P&gt;bdart in s_req_tp and&lt;/P&gt;&lt;P&gt;plart in s_pln_tp and&lt;/P&gt;&lt;P&gt;etart in s_etart and&lt;/P&gt;&lt;P&gt;abart in s_abart and&lt;/P&gt;&lt;P&gt;( ( lifsp in s_lifsp ) or ( lifsp = ' ' ) ).&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;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Part 1 of the Query is executed and populates values into a few fields of the record into internal table.*&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Part 2 of the Query has the duty to populate the values into the rest of the fields (which are empty)  of the same internal table.*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;But, when Part 2 of the Query is executed immediate to the Part 1, the internbal table looses values of those fields which are populated by Query Part 1.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Query Part 1 should do:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Field1    Field2    Field3    Field4    Field5&lt;/P&gt;&lt;P&gt;100        abc       1425&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Query Part 2 should do:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Field1    Field2    Field3    Field4    Field5&lt;/P&gt;&lt;P&gt;100        abc       1425      1100      4578&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should not erase Field1, Field2 &amp;amp; Field3 values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz suggest!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 09:18:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/record-selection-problem/m-p/3404022#M817423</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T09:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Record Selection Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/record-selection-problem/m-p/3404023#M817424</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 append statement in the second select query...now u will get next records appended..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ....appending table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 09:24:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/record-selection-problem/m-p/3404023#M817424</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2008-02-11T09:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Record Selection Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/record-selection-problem/m-p/3404024#M817425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Do U mean like below.....??&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select  etenr  wmeng  bmeng  ettyp  wepos  abart  edatu&lt;/P&gt;&lt;P&gt;tddat  mbdat  lddat  wadat  abruf  etart  ezeit&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;appending table t_vbap&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;from vbep&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for all entries in t_vbap&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;vbeln = t_vbap-vbeln and&lt;/P&gt;&lt;P&gt;posnr = t_vbap-posnr and&lt;/P&gt;&lt;P&gt;ettyp in w_ettyp and&lt;/P&gt;&lt;P&gt;bdart in s_req_tp and&lt;/P&gt;&lt;P&gt;plart in s_pln_tp and&lt;/P&gt;&lt;P&gt;etart in s_etart and&lt;/P&gt;&lt;P&gt;abart in s_abart and&lt;/P&gt;&lt;P&gt;( ( lifsp in s_lifsp ) or ( lifsp = ' ' ) ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 09:35:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/record-selection-problem/m-p/3404024#M817425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T09:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Record Selection Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/record-selection-problem/m-p/3404025#M817426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Ur first query is correct, problem with second one&lt;/P&gt;&lt;P&gt;in this even if u use append , it will not solve ur problem, &lt;/P&gt;&lt;P&gt;Bcz it will add new rows for those fields which are empty earlier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now solution fo this is &lt;/P&gt;&lt;P&gt;in second part store the data in t_vbap1 in stead of t_vbap.&lt;/P&gt;&lt;P&gt;at the end od this query.&lt;/P&gt;&lt;P&gt;loop at t_vbap&lt;/P&gt;&lt;P&gt;read t_vbap1 with vblnr = t_vbap-vblnr.&lt;/P&gt;&lt;P&gt;move t_vbap content to t_vbap_final.&lt;/P&gt;&lt;P&gt;move t_vbap1 contents to t_vbap_ final.&lt;/P&gt;&lt;P&gt;append t_vbap_final.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will help u.&lt;/P&gt;&lt;P&gt;Rewards points please.good point if possible &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 09:50:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/record-selection-problem/m-p/3404025#M817426</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T09:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Record Selection Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/record-selection-problem/m-p/3404026#M817427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dude,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   In the second query,it should be like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   &lt;STRONG&gt;&lt;U&gt;appending corresponding fields of table t&lt;/U&gt;vbap_&lt;/STRONG&gt; instead of&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;      into              "                      "     "          ".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lakshmanan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 09:53:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/record-selection-problem/m-p/3404026#M817427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T09:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Record Selection Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/record-selection-problem/m-p/3404027#M817428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi dude,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   First of all check your t_vbap internal table declaration.&lt;/P&gt;&lt;P&gt;   See to that whether all of the fields to be diaplayed in the report are included in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also tell me whether the appending addition to the second select meets your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lakshmanan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 10:14:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/record-selection-problem/m-p/3404027#M817428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T10:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: Record Selection Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/record-selection-problem/m-p/3404028#M817429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;k&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 05:33:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/record-selection-problem/m-p/3404028#M817429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T05:33:34Z</dc:date>
    </item>
  </channel>
</rss>

