<?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 Doubt in internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-internal-table/m-p/3762764#M905271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;I need to pass one field to local variable from internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT * FROM vbkd into CORRESPONDING FIELDS OF table it_vbkd WHERE vbkd~mandt = sy-mandt   AND&lt;/P&gt;&lt;P&gt;                                         vbeln = komp-aubel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls help me with this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be reward all helpfull answers,&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 27 Apr 2008 13:41:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-27T13:41:46Z</dc:date>
    <item>
      <title>Doubt in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-internal-table/m-p/3762764#M905271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;I need to pass one field to local variable from internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT * FROM vbkd into CORRESPONDING FIELDS OF table it_vbkd WHERE vbkd~mandt = sy-mandt   AND&lt;/P&gt;&lt;P&gt;                                         vbeln = komp-aubel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls help me with this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be reward all helpfull answers,&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Apr 2008 13:41:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-internal-table/m-p/3762764#M905271</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-27T13:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-internal-table/m-p/3762765#M905272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jay,&lt;/P&gt;&lt;P&gt;U cant pass the content of internal table directly to variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either u have to use &lt;STRONG&gt;Read table&lt;/STRONG&gt; or &lt;STRONG&gt;Loop&lt;/STRONG&gt; INTO work area.&lt;/P&gt;&lt;P&gt;Also if u r not using Joins then &lt;STRONG&gt;vbkd~&lt;/STRONG&gt; Is not required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Let me know how u r getting data into internal table komp&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(If it is). If u declared it in TABLES: komp then U can directly&lt;/STRONG&gt; &lt;STRONG&gt;refer to it as u are doing now.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code1:&lt;/P&gt;&lt;P&gt;CHECK NOT komp[] IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT * FROM vbkd &lt;/P&gt;&lt;P&gt;into CORRESPONDING FIELDS OF table it_vbkd &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN komp&lt;/P&gt;&lt;P&gt;WHERE mandt = sy-mandt&lt;/P&gt;&lt;P&gt;AND vbeln = komp-aubel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This select will fetch all the records in vbkd &lt;/P&gt;&lt;P&gt;where vbeln = all aubel values in komp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code2:&lt;/P&gt;&lt;P&gt;CLEAR wa.&lt;/P&gt;&lt;P&gt;READ TABLE komp INTO wa WITH KEY (ur keys).&lt;/P&gt;&lt;P&gt;CHECK sy-subrc IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT * FROM vbkd into CORRESPONDING FIELDS OF table it_vbkd WHERE mandt = sy-mandt AND&lt;/P&gt;&lt;P&gt;vbeln = wa-aubel.&lt;/P&gt;&lt;P&gt;This select will fetch all the records in vbkd &lt;/P&gt;&lt;P&gt;where vbeln = wa-aubel.(One value here)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Also let me know how u r getting into internal table komp(If it is)&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Vinod Kumar Vemuru on Apr 27, 2008 7:33 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Apr 2008 14:01:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-internal-table/m-p/3762765#M905272</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2008-04-27T14:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-internal-table/m-p/3762766#M905273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You just read the internal table which you have filled into a work area and assign the required field to a variable..OR loop at it_vbkd if it has multiple entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and better avoid using  into corresponding fields..you can modify the code as,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls revert if you need further help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Apr 2008 16:32:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-internal-table/m-p/3762766#M905273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-27T16:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-internal-table/m-p/3762767#M905274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hye Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT * FROM vbkd into CORRESPONDING FIELDS OF table it_vbkd WHERE vbkd~mandt = sy-mandt AND
vbeln = komp-aubel.            
* This select will return all the rows into an internal table it_vbkd.
* now you want to read a value frm it_vbkd into local variable lv.
data: wa_vbkd like line of it_vbkd " work area with same structure as internal table.
read table it_vbkd into wa_vbkd 
       with key vbeln = '100'.   
* i have table for example vbeln. you can use any number of keys as selection cretira by just seperating with space.

* now send the particular field of work area into local variable.

lv = wa_vbkd-jay.

* local variable will have the content.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Imran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Apr 2008 17:49:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-internal-table/m-p/3762767#M905274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-27T17:49:53Z</dc:date>
    </item>
  </channel>
</rss>

