<?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: select in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547146#M248711</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do it like this -:)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data: w_tabix type sy-tabix.

loop at it_bseg2.
w_tabix = sy-tabix.
Read table it_final with key {key fields-document number}
move it_bseg2-saknr1 to it_final-saknr1.
move it_bseg2-wrbtr to it_final-wrbtr1.
modify it_final index w_tabix
transporting saknr1 wrbtr1.
clear it_final.
endloop
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using transporting, you don't mess with the exiting values -;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Sep 2006 15:13:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-07T15:13:57Z</dc:date>
    <item>
      <title>select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547141#M248706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi to all,&lt;/P&gt;&lt;P&gt;in this the values of saknr and wrbtr were coming in header line they were not inserted to the body&lt;/P&gt;&lt;P&gt;can any one help me in solving this issue&lt;/P&gt;&lt;P&gt;loop at it_bseg2.&lt;/P&gt;&lt;P&gt;move it_bseg2-saknr1 to it_final-saknr1.&lt;/P&gt;&lt;P&gt;move it_bseg2-wrbtr to it_final-wrbtr1.&lt;/P&gt;&lt;P&gt;append it_final.(it-final already containing other values)&lt;/P&gt;&lt;P&gt;clear it_final.&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kiran kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2006 15:05:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547141#M248706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-07T15:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547142#M248707</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;I think you are trying to fill the SAKNR and WRBTR from bseg in the final internal table which is already having some other fields. In that case read the final internal table in the Loop at it_bseg and then after populating the values modify the Final internal table instead of appending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2006 15:10:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547142#M248707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-07T15:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547143#M248708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kiran if the it_final is already containing some values ..you need to read the table it_final and modify it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_bseg2.&lt;/P&gt;&lt;P&gt;Read table it_final with key {key fields-document number}&lt;/P&gt;&lt;P&gt;move it_bseg2-saknr1 to it_final-saknr1.&lt;/P&gt;&lt;P&gt;move it_bseg2-wrbtr to it_final-wrbtr1.&lt;/P&gt;&lt;P&gt;modify it_final index sy-tabix.&lt;/P&gt;&lt;P&gt;clear it_final.&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2006 15:10:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547143#M248708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-07T15:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547144#M248709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Kiran,&lt;/P&gt;&lt;P&gt; Read table statement is missing..&lt;/P&gt;&lt;P&gt;i.e,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at it_bseg2.
&amp;lt;b&amp;gt;read table it_final with key ..&amp;lt;/b&amp;gt;
move it_bseg2-saknr1 to it_final-saknr1.
move it_bseg2-wrbtr to it_final-wrbtr1.
append it_final.(it-final already containing other values)
clear it_final.
endloop&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2006 15:13:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547144#M248709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-07T15:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547145#M248710</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;Instead of appending the data to the final internal table first you need to read that particular row with key field and then modify that row with the fields saknr1 and wrbtr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at it_bseg2.
 read table it_final with key {key-field}
 move it_bseg2-saknr1 to it_final-saknr1.
 move it_bseg2-wrbtr to it_final-wrbtr1.
 &amp;lt;b&amp;gt;modify it_final index sy-tabix&amp;lt;/b&amp;gt;.: You should not append, use modify
 clear it_final.
endloop&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2006 15:13:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547145#M248710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-07T15:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547146#M248711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do it like this -:)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data: w_tabix type sy-tabix.

loop at it_bseg2.
w_tabix = sy-tabix.
Read table it_final with key {key fields-document number}
move it_bseg2-saknr1 to it_final-saknr1.
move it_bseg2-wrbtr to it_final-wrbtr1.
modify it_final index w_tabix
transporting saknr1 wrbtr1.
clear it_final.
endloop
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using transporting, you don't mess with the exiting values -;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2006 15:13:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547146#M248711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-07T15:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547147#M248712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    Follwo below logic&lt;/P&gt;&lt;P&gt;    loop at it_bseg2.&lt;/P&gt;&lt;P&gt;      read table it_final with key bukrs = it_bseg-bukrs&lt;/P&gt;&lt;P&gt;                                   belnr = it_bseg2-belnr.&lt;/P&gt;&lt;P&gt;  if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;    lv_index = sy-tabix.&lt;/P&gt;&lt;P&gt;    move it_bseg2-saknr1 to it_final-saknr1.&lt;/P&gt;&lt;P&gt;    move it_bseg2-wrbtr to it_final-wrbtr1.&lt;/P&gt;&lt;P&gt;    modify it_final index lv_index.   &lt;/P&gt;&lt;P&gt;    clear lv_index.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Amole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2006 15:14:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547147#M248712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-07T15:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547148#M248713</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;Remove the code in bold italics. Insert the code which is in bold.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_bseg2.&lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt; clear it_final.&lt;/P&gt;&lt;P&gt;  read table it_final with key fld = it_bseg2-fld1.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;move it_bseg2-saknr1 to it_final-saknr1.&lt;/P&gt;&lt;P&gt;move it_bseg2-wrbtr to it_final-wrbtr1.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;  modify it_final index sy-tabix.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;append it_final.(it-final already containing other values)&lt;/P&gt;&lt;P&gt;clear it_final.&lt;/P&gt;&lt;P&gt;&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;  endif.&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;Sailaja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2006 15:14:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547148#M248713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-07T15:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547149#M248714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Kiran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use collect it_final statement instead of append.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2006 15:14:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547149#M248714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-07T15:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547150#M248715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi anurag&lt;/P&gt;&lt;P&gt;i have done this but it is transporting the wrbtr which is there in it_final before and keeping it here.&lt;/P&gt;&lt;P&gt;there is any option in modify statemnt that transporting no fields like&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2006 15:15:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547150#M248715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-07T15:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547151#M248716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes there is a variation in MODIFY statement for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example-&amp;gt;&lt;/P&gt;&lt;P&gt;MODIFY it_zwms FROM p_is_zwms TRANSPORTING menge zerfm5&lt;/P&gt;&lt;P&gt;                        WHERE zwmsc = work-wmsc&lt;/P&gt;&lt;P&gt;                        AND   matnr = p_is_zwms-matnr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2006 15:24:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1547151#M248716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-07T15:24:31Z</dc:date>
    </item>
  </channel>
</rss>

