<?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: internal table question in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590526#M265801</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;make sure that the order of fields in your internal tables matches with the order of fields in the select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dump is due to the order of fields in your internal table did not match with order of fields in your select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if this solves your problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 10 Sep 2006 15:28:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-10T15:28:52Z</dc:date>
    <item>
      <title>internal table question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590519#M265794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an internal table itab1 only with vbelns (actually invoice numbers). Now I want to go to BKPF table, select records into a new internal table itab2 which meets criteria AWTYP = VBRK and AWKEY = itab1-vbeln. Can you please give me a sample code for this with out losing any performance? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very much appreciated. Points assured for your kind help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Sep 2006 14:42:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590519#M265794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-10T14:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: internal table question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590520#M265795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if not itab1[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select field1&lt;/P&gt;&lt;P&gt;       ....&lt;/P&gt;&lt;P&gt;       ....&lt;/P&gt;&lt;P&gt;  into table itab2&lt;/P&gt;&lt;P&gt;  from BKPF &lt;/P&gt;&lt;P&gt;  for all entries in itab1&lt;/P&gt;&lt;P&gt;  where awtyp = 'VBRK' and&lt;/P&gt;&lt;P&gt;        awkey = itab1-vbeln.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to retrieve all the entries from BKPF table you need to select all the primary keys otherwise you might miss some of the records from BKPF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Sep 2006 14:50:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590520#M265795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-10T14:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: internal table question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590521#M265796</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;1) You have store all the invoice numbers in an internal table that has the data type AWKEY. Since if we are going to use FOR ALL ENTRIES it will show a syntax error for data type miss match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: BEGIN OF ITAB_AWKEY OCCURS 0,&lt;/P&gt;&lt;P&gt;          AWKEY TYPE BKPF-AWKEY,&lt;/P&gt;&lt;P&gt;        END OF ITAB_AWKEY.  &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  LOOP AT ITAB1.&lt;/P&gt;&lt;P&gt;    ITAB_AWKEY-AWKEY = ITAB1-VBELN.&lt;/P&gt;&lt;P&gt;    APPEND ITAB_AWKEY.&lt;/P&gt;&lt;P&gt;    CLEAR: ITAB_AWKEY.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) use the FOR ALL ENTRIES and get the values from the bkpf..&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  SELECT BUKRS BELNR GJAHR ....&lt;/P&gt;&lt;P&gt;         INTO TABLE ITAB_BKPF&lt;/P&gt;&lt;P&gt;         FROM BKPF&lt;/P&gt;&lt;P&gt;         FOR ALL ENTRIES IN ITAB_AWKEY&lt;/P&gt;&lt;P&gt;         WHERE AWTYP = 'VBRK'&lt;/P&gt;&lt;P&gt;         AND   AWKEY = ITAB_AWKEY-AWKEY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Performance will not be a problem as there is an index on AWTYP and AWKEY...&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;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Sep 2006 14:54:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590521#M265796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-10T14:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: internal table question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590522#M265797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sid and Naren.&lt;/P&gt;&lt;P&gt;Reg. Sid's reply, I have a question. In order for me not to miss any records, what else I need to do ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Sep 2006 14:59:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590522#M265797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-10T14:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: internal table question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590523#M265798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you need to select all the primary keys from the BKPF table or need mention all the key fields in the where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As in your case you cannot mention all the primary keys in the where condition. you need select all the primay keys fields in the select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare itab2 internal table with key fields of BKPF table along with fields needed for your logic.&lt;/P&gt;&lt;P&gt;select the key fields along with needed fields into internal table itab2. By doing this you will all the records from BKPF table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Sep 2006 15:03:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590523#M265798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-10T15:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: internal table question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590524#M265799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As for Naren's suggestion, I created an internal table solely for copying awkey and wrote the remaining code. When I executed the program, it went to dump and I got the following description:&lt;/P&gt;&lt;P&gt;                                                                                An exception occurred. This exception will be dealt with in more detail below. The exception, assigned to the class 'CX_SY_OPEN_SQL_DB', was not caught, which led to a runtime error. The reason for this exception is:                      &lt;/P&gt;&lt;P&gt;The data read during a SELECT access could not be inserted into the target field.                                                                   &lt;/P&gt;&lt;P&gt;Either conversion is not supported for the target field's type or the target field is too short to accept the value or the data are not in a form that the target field can accept&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Can you guys please let me the reason if you know for this? Thanks)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Sep 2006 15:22:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590524#M265799</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-10T15:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: internal table question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590525#M265800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Sep 2006 15:23:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590525#M265800</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-10T15:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: internal table question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590526#M265801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;make sure that the order of fields in your internal tables matches with the order of fields in the select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dump is due to the order of fields in your internal table did not match with order of fields in your select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if this solves your problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Sep 2006 15:28:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-question/m-p/1590526#M265801</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-10T15:28:52Z</dc:date>
    </item>
  </channel>
</rss>

