<?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: Selction in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selction/m-p/3184326#M758189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the below code snippet within ur code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final[] = it_vbak[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final[] = it_vbap[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Kindly Reward points if you found the reply helpful.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;CHAITANYA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Dec 2007 08:00:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-07T08:00:04Z</dc:date>
    <item>
      <title>Selction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selction/m-p/3184325#M758188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need selet data from 2 tables VBAP and VBAK.which am doing succesfully into internal table it_vbak and it_vbap.But i need to give both the tables data into it_final which am doing like below.But the problem is all the data is selected twice.Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM populate_it_final .&lt;/P&gt;&lt;P&gt;LOOP at it_vbak.&lt;/P&gt;&lt;P&gt;LOOP at it_vbap.&lt;/P&gt;&lt;P&gt;clear it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final-vbeln = it_vbak-vbeln.&lt;/P&gt;&lt;P&gt;it_final-netwr = it_vbak-netwr.&lt;/P&gt;&lt;P&gt;it_final-ernam  = it_vbak-ernam.&lt;/P&gt;&lt;P&gt;it_final-audat =  it_vbak-audat.&lt;/P&gt;&lt;P&gt;it_final-bstnk = it_vbak-bstnk.&lt;/P&gt;&lt;P&gt;it_final-auart = it_vbak-auart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final-matnr = it_vbap-matnr.&lt;/P&gt;&lt;P&gt;it_final-posnr = it_vbap-posnr.&lt;/P&gt;&lt;P&gt;it_final-werks = it_vbap-werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND it_final.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regadrs&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2007 07:48:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selction/m-p/3184325#M758188</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-07T07:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Selction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selction/m-p/3184326#M758189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the below code snippet within ur code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final[] = it_vbak[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final[] = it_vbap[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Kindly Reward points if you found the reply helpful.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;CHAITANYA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2007 08:00:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selction/m-p/3184326#M758189</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-07T08:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Selction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selction/m-p/3184327#M758190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remove OCCURS 0 for IT_VBAK &amp;amp; IT_VBAP &amp;amp;IT_FINAL and do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Data: wa_vbak like line of it_vbak,
         wa_vbap like line of it_vbap,
         wa_final like line of it_final.

FORM populate_it_final .
sort it_vbap by vbeln.
LOOP at it_vbak into wa_vbak.

wa_final-vbeln = wa_vbak-vbeln.
wa_final-netwr = wa_vbak-netwr.
wa_final-ernam = wa_vbak-ernam.
wa_final-audat = wa_vbak-audat.
wa_final-bstnk = wa_vbak-bstnk.
wa_final-auart = wa_vbak-auart.
read table it_vbap into wa_vbap with key vbeln = wa_vbak-vbeln binary search. " Consider Item No also and compare here.
wa_final-matnr = wa_vbap-matnr.
wa_final-posnr = wa_vbap-posnr.
wa_final-werks = wa_vbap-werks.

APPEND wa_final to it_final.
clear wa_final.

endloop.

endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Satish Panakala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2007 08:15:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selction/m-p/3184327#M758190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-07T08:15:16Z</dc:date>
    </item>
  </channel>
</rss>

