<?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: Hash Table -Runtime error. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758509#M1115875</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check data in table is there any mutiple entries&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Sep 2009 05:51:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-02T05:51:04Z</dc:date>
    <item>
      <title>Hash Table -Runtime error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758501#M1115867</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 am defining internal table as hash table but it is giving runtime error like bolow. some times it is executing properly or giving dump.please give me some suggestions to come out of this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;What happened?&lt;/P&gt;&lt;P&gt;    Error in the ABAP Application Program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    The current ABAP program "SAPLZGIT_MED" had to be terminated because it has&lt;/P&gt;&lt;P&gt;    come across a statement that unfortunately cannot be executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error analysis&lt;/P&gt;&lt;P&gt;    An entry was to be entered into the table&lt;/P&gt;&lt;P&gt;     "\FUNCTION=ZBAPI_GIT_MED_HD_BOTELLAS_RPT\DATA=T_THERAPY_INFO" (which should&lt;/P&gt;&lt;P&gt;     have&lt;/P&gt;&lt;P&gt;    had a unique table key (UNIQUE KEY)).&lt;/P&gt;&lt;P&gt;    However, there already existed a line with an identical key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    The insert-operation could have ocurred as a result of an INSERT- or&lt;/P&gt;&lt;P&gt;    MOVE command, or in conjunction with a SELECT ... INTO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    The statement "INSERT INITIAL LINE ..." cannot be used to insert several&lt;/P&gt;&lt;P&gt;     initial lines into a table with a unique key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Code: .....................................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF X_THERAPY_INFO,&lt;/P&gt;&lt;P&gt;                GIT_THERAPY_ID     TYPE ZGIT_VBELN_GIT,&lt;/P&gt;&lt;P&gt;                CHO_THERAPY_ID     TYPE VBELN,&lt;/P&gt;&lt;P&gt;                SERVICE_ID         TYPE MATNR,&lt;/P&gt;&lt;P&gt;                SERVICE_DESC       TYPE ARKTX,&lt;/P&gt;&lt;P&gt;                FLOW               TYPE ZGIT_ZFLOW,&lt;/P&gt;&lt;P&gt;                DURATION           TYPE ZGIT_ZDURATION,&lt;/P&gt;&lt;P&gt;                GIT_PAT_ID         TYPE ZGIT_KUNNR_GIT,&lt;/P&gt;&lt;P&gt;                CHORUS_PAT_ID      TYPE KUNNR,&lt;/P&gt;&lt;P&gt;           END OF X_THERAPY_INFO,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;DATA: &lt;/P&gt;&lt;P&gt;T_THERAPY_INFO           TYPE HASHED TABLE OF X_THERAPY_INFO WITH UNIQUE KEY        GIT_THERAPY_ID,                " Internal table for extracting the therapy Informamtion&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Extract the Therapy Details&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*******************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT   VBELN_GIT&lt;/P&gt;&lt;P&gt;           VBELN&lt;/P&gt;&lt;P&gt;           MATNR&lt;/P&gt;&lt;P&gt;           ARKTX&lt;/P&gt;&lt;P&gt;           ZFLOW&lt;/P&gt;&lt;P&gt;           ZDURATION&lt;/P&gt;&lt;P&gt;           KUNNR_GIT&lt;/P&gt;&lt;P&gt;           KUNNR&lt;/P&gt;&lt;P&gt;  INTO     TABLE     T_THERAPY_INFO&lt;/P&gt;&lt;P&gt;  FROM     ZGIT_T_VBAK&lt;/P&gt;&lt;P&gt;  WHERE    KUNNR_GIT   NE SPACE&lt;/P&gt;&lt;P&gt;  AND      KVGR2       IN TR_KVGR2&lt;/P&gt;&lt;P&gt;  AND      ZDOCTOR     IN TR_DOC_SEL_ID&lt;/P&gt;&lt;P&gt;  AND      ZHOSPITAL   IN TR_HOSPITAL_ID&lt;/P&gt;&lt;P&gt;  AND    ( ZSTATUS_ID  NE C_HIDDEN&lt;/P&gt;&lt;P&gt;  AND      ZSTATUS_ID  NE C_DISABLED&lt;/P&gt;&lt;P&gt;  AND      ZSTATUS_ID  NE C_OTHERS )&lt;/P&gt;&lt;P&gt;  AND      VBELN       IN TR_VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC NE C_0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Srinivas P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2008 14:21:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758501#M1115867</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-31T14:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table -Runtime error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758502#M1115868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;The answer is present right in the dump error analysis :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error analysis&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;An entry was to be entered into the table&lt;/P&gt;&lt;P&gt;"\FUNCTION=ZBAPI_GIT_MED_HD_BOTELLAS_RPT\DATA=T_THERAPY_INFO" (which should&lt;/P&gt;&lt;P&gt;have&lt;/P&gt;&lt;P&gt;had a unique table key (UNIQUE KEY)).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;However, there already existed a line with an identical key.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to delete the duplicate records. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DELETE ADJACENT DUPLICATES  ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Advait Gode on Oct 31, 2008 3:26 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2008 14:25:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758502#M1115868</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-31T14:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table -Runtime error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758503#M1115869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You defined GIT_THERAPY_ID as the unique key of the table, but you are not selecting this field while filling the table with entries from the database. See if you can include this field in the select statement.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correction: you are filling it, but it seems that this column does not have unique entries in the database. Maybe several blank values? You could also try defining the table as SORTED with NON-UNIQUE key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2008 14:51:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758503#M1115869</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-10-31T14:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table -Runtime error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758504#M1115870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i did not get u. Please tell me.  where should i write this statement?  &lt;/P&gt;&lt;P&gt;because t_therapy_info is empty before select statement . &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;Srinivas P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2008 14:58:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758504#M1115870</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-31T14:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table -Runtime error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758505#M1115871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;VBELN_GIT is same as the above declared one but i changed the name .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2008 15:02:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758505#M1115871</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-31T15:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table -Runtime error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758506#M1115872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you are using hashed tables, you cannot have duplicate records (considering it's key). So DELETE ADJACENT DUPLICATES won't solve it. It will dump before that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find if you are inserting records with the same fields you inserted in the key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your key is VBELN, you &lt;STRONG&gt;cannot&lt;/STRONG&gt; make it like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT a~vbeln b~matnr 
   INTO TABLE hashed_itab
  FROM vbak AS a INNER JOIN vbap as b
   ON a~vbeln = b~vbeln
WHERE ...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It will dump if your vbeln has 2 lines in vbap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Two solutions:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1 - expand the itab key to VBELN and POSNR (for example) or&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT DISTINCT a~vbeln b~matnr 
   INTO TABLE hashed_itab
  FROM vbak AS a INNER JOIN vbap as b
   ON a~vbeln = b~vbeln
WHERE ...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2008 15:05:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758506#M1115872</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-10-31T15:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table -Runtime error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758507#M1115873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try to define standard table.&lt;/P&gt;&lt;P&gt;DATA: &lt;/P&gt;&lt;P&gt;T_THERAPY_INFO TYPE STANDARD TABLE OF X_THERAPY_INFO .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and Delete the Adjacent duplicates. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of hashedtable. it behaves like a Database table. if you have duplicates then it will give dump.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2008 15:06:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758507#M1115873</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-31T15:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table -Runtime error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758508#M1115874</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;In your &lt;STRONG&gt;SELECT&lt;/STRONG&gt; query use &lt;STRONG&gt;DISTINCT&lt;/STRONG&gt;.... so that duplicate values will be delete while you fetch from database itself....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT DISTINCT &amp;lt;fields&amp;gt; from &amp;lt;database&amp;gt; INTO TABLE &amp;lt;ITAB&amp;gt; WHERE &amp;lt;CONDITIONS&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Nov 2008 11:25:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758508#M1115874</guid>
      <dc:creator>raja_narayanan2</dc:creator>
      <dc:date>2008-11-01T11:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table -Runtime error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758509#M1115875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check data in table is there any mutiple entries&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 05:51:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-runtime-error/m-p/4758509#M1115875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-02T05:51:04Z</dc:date>
    </item>
  </channel>
</rss>

