<?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: Read internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454772#M215047</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you use TABLE kEY statment all fields of KEY must be used with the same order as declaration of the key!!&lt;/P&gt;&lt;P&gt;Read table i_vbrp WITH TABLE KEY&lt;/P&gt;&lt;P&gt;Vkbur = something&lt;/P&gt;&lt;P&gt;vbeln = i_sub_table-vbeln&lt;/P&gt;&lt;P&gt;posnr = i_sub_table-posnr.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&amp;lt; JAcek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Jul 2006 07:29:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-20T07:29:58Z</dc:date>
    <item>
      <title>Read internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454770#M215045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    I declared intrnal table with 4 fields and I filled the internal table with the data. I wnat to read the internal table using with 2 key fields. How can I do it thies. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I am writing like below, its giving error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    'Read table i_vbrp WITH TABLE KEY&lt;/P&gt;&lt;P&gt;                               vbeln = i_sub_table-vbeln&lt;/P&gt;&lt;P&gt;                               posnr = i_sub_table-posnr.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is giving error like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The declaration for the key field "VKBUR" is incomplete. However,"VKBUR" is is contained in the key of table "I_VBRP". and must be filled.		&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here VKBUR is also a internal table field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give Idea, How can I resolve this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 07:26:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454770#M215045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T07:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454771#M215046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you post the declaration of the internal table I_VBRP ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 07:29:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454771#M215046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T07:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454772#M215047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you use TABLE kEY statment all fields of KEY must be used with the same order as declaration of the key!!&lt;/P&gt;&lt;P&gt;Read table i_vbrp WITH TABLE KEY&lt;/P&gt;&lt;P&gt;Vkbur = something&lt;/P&gt;&lt;P&gt;vbeln = i_sub_table-vbeln&lt;/P&gt;&lt;P&gt;posnr = i_sub_table-posnr.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&amp;lt; JAcek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 07:29:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454772#M215047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T07:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454773#M215048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be you can try this - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;READ TABLE I_VBRP WITH KEY
VBELN = I_SUB_TABLE-VBELN
POSNR = I_SUB_TABLE-POSN.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 07:31:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454773#M215048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T07:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454774#M215049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi venkat,&lt;/P&gt;&lt;P&gt;if u are using table key in reading that internal table,&lt;/P&gt;&lt;P&gt;then u need to pass all the keys of table.&lt;/P&gt;&lt;P&gt;if u want to read with only 2 keys then try this &lt;/P&gt;&lt;P&gt;'Read table i_vbrp WITH  KEY&lt;/P&gt;&lt;P&gt;vbeln = i_sub_table-vbeln&lt;/P&gt;&lt;P&gt;posnr = i_sub_table-posnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can use binary search also to improve performance but by sorting the table .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 07:36:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454774#M215049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T07:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454775#M215050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;I am assuming you declared your table as sorted table, then it should be like this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES:Begin of type_vbrp,
      vbeln type vbeln_vf,
      posnr type posnr,
      vkbur type vkbur,
      meins type meins_d,
      End of type_vbrp.


TYPES : TYPE_VBRP_TBL  TYPE SORTED TABLE OF TYPE_VBRP
                             WITH UNIQUE KEY VBELN POSNR.

....
Read table i_vbrp WITH TABLE KEY
vbeln = i_sub_table-vbeln
posnr = i_sub_table-posnr 
    binary search.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raghav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 07:42:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454775#M215050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T07:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454776#M215051</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;Change your READ statement as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE I_VBRP WITH KEY VBELN = I_SUB_TABLE-VBELN&lt;/P&gt;&lt;P&gt;                           POSNR = I_SUB_TABLE-POSNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use WITH TABLE KEY if you declared your itab as HASHED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S&amp;gt; Please award points for useful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 07:47:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454776#M215051</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-07-20T07:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454777#M215052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of this 'Read table i_vbrp WITH TABLE KEY&lt;/P&gt;&lt;P&gt;you have to use 'Read table i_vbrp WITH KEY .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 08:00:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454777#M215052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T08:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454778#M215053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Anand Mandalika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its working fine.  &lt;/P&gt;&lt;P&gt; If I want to chek non blank value like below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ TABLE I_VBRP WITH KEY VBELN = I_SUB_TABLE-VBELN&lt;/P&gt;&lt;P&gt;                        POSNR = I_SUB_TABLE-posnr&lt;/P&gt;&lt;P&gt;                            VKGRP &amp;lt;&amp;gt; '' &lt;/P&gt;&lt;P&gt;                            VKBUR &amp;lt;&amp;gt; ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do it this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 08:06:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454778#M215053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T08:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454779#M215054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkata, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot do that in READ statement. But you can use that in your select statement so when you read your internal table, you are sure that you will not get any VKGRP and VKBUR that are blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. Please award points if found useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 08:11:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/1454779#M215054</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-07-20T08:11:14Z</dc:date>
    </item>
  </channel>
</rss>

