<?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: Runtime error in My Query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-in-my-query/m-p/6729578#M1456861</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;another solution is to debug your code, or paste it here&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Mar 2010 22:45:15 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2010-03-18T22:45:15Z</dc:date>
    <item>
      <title>Runtime error in My Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-in-my-query/m-p/6729575#M1456858</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 created a abap query and added few additional fields with codes in them and tried running the query. When I run teh query with selections on my selection screen it runs well and gives me output correctly but when I run it open without any selection I geta  runtime error with following description. &lt;/P&gt;&lt;P&gt;Short text&lt;/P&gt;&lt;P&gt;    Field symbol has not yet been assigned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__What happened?__    Error in the ABAP Application Program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    The current ABAP program "AQZZZSD=========ZSD_LISTOFFLST" had to be terminat&lt;/P&gt;&lt;P&gt;     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;U&gt;Error analysis&lt;/U&gt;    You attempted to access an unassigned field symbol&lt;/P&gt;&lt;P&gt;    (data segment 27).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    This error may occur if&lt;/P&gt;&lt;P&gt;    - You address a typed field symbol before it has been set with&lt;/P&gt;&lt;P&gt;      ASSIGN&lt;/P&gt;&lt;P&gt;    - You address a field symbol that pointed to the line of an&lt;/P&gt;&lt;P&gt;      internal table that was deleted&lt;/P&gt;&lt;P&gt;    - You address a field symbol that was previously reset using&lt;/P&gt;&lt;P&gt;      UNASSIGN or that pointed to a local field that no&lt;/P&gt;&lt;P&gt;      longer exists&lt;/P&gt;&lt;P&gt;    - You address a global function interface, although the&lt;/P&gt;&lt;P&gt;      respective function module is not active - that is, is&lt;/P&gt;&lt;P&gt;      not in the list of active calls. The list of active calls&lt;/P&gt;&lt;P&gt;      can be taken from this short dump.&lt;/P&gt;&lt;P&gt;How to correct the error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    If the error occures in a non-modified SAP program, you may be able to&lt;/P&gt;&lt;P&gt;    find an interim solution in an SAP Note.&lt;/P&gt;&lt;P&gt;    If you have access to SAP Notes, carry out a search with the following&lt;/P&gt;&lt;P&gt;    keywords:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    "GETWA_NOT_ASSIGNED" " "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure why its running ok when I provide selection and it gives error when I ran it open.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 17:29:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-in-my-query/m-p/6729575#M1456858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T17:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error in My Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-in-my-query/m-p/6729576#M1456859</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;Please refer to this [GETWA_NOT_ASSIGNED |&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1514008"&gt;&lt;/A&gt;;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandravadan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 17:40:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-in-my-query/m-p/6729576#M1456859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T17:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error in My Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-in-my-query/m-p/6729577#M1456860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried that assigning process too , yet it gives me the same error at the same place . Yet it dosent give error if I do enter something in the selection screen . Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 19:18:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-in-my-query/m-p/6729577#M1456860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T19:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error in My Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-in-my-query/m-p/6729578#M1456861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;another solution is to debug your code, or paste it here&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 22:45:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-in-my-query/m-p/6729578#M1456861</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2010-03-18T22:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error in My Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-in-my-query/m-p/6729579#M1456862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code where it shows error :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at gt_konv assigning &amp;lt;fs_konv&amp;gt;
   where kposn = vbrp-posnr
     and ( kschl = 'ZPRL' or kschl = 'ZWRO' or
           kschl = 'ZSPT' or kschl = 'ZWSU' or
           kschl = 'ZOTH' or kschl = 'ZQUA' or
           kschl = 'ZTAR' or kschl = 'ZCMD' ).
    add &amp;lt;fs_konv&amp;gt;-kwert to unitpr.
  endloop.
  unitpr = ( unitpr / vbrp-fkimg ).
  uomup = &amp;lt;fs_konv&amp;gt;-kmein.
  If lines( gt_konv ) gt 0.&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;,&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;Runtime error point is here
  clear psagediff.
  IF ( PRICEDIFF &amp;lt;&amp;gt; '0.00' AND  LPRICE &amp;lt;&amp;gt; '0.00' ).
    PSAGEDIFF = ( PRICEDIFF / LPRICE ) * 100.
    else.
     PSAGEDIFF = '0.00'.
     endif.
     endif.
* Logic in code section
  case v_pricetype.
    when '00'.
      pricetype = 'Others'.
    when '01'.
      pricetype = 'List'.
    when '02'.
      pricetype = 'Off-List'.
    when '03'.
      pricetype = 'No Price'.
  endcase.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Mar 2010 18:42:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-in-my-query/m-p/6729579#M1456862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-25T18:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error in My Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-in-my-query/m-p/6729580#M1456863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No it's here&lt;/P&gt;&lt;P&gt;&amp;gt;   uomup = &amp;lt;fs_konv&amp;gt;-kmein.&lt;/P&gt;&lt;P&gt;As I can see in your code, this happens when the loop condition didn't match any record in gt_konv. So you should test if it did&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at gt_konv assigning &amp;lt;fs_konv&amp;gt;
   where kposn = vbrp-posnr
     and ( kschl = 'ZPRL' or kschl = 'ZWRO' or
           kschl = 'ZSPT' or kschl = 'ZWSU' or
           kschl = 'ZOTH' or kschl = 'ZQUA' or
           kschl = 'ZTAR' or kschl = 'ZCMD' ).
    add &amp;lt;fs_konv&amp;gt;-kwert to unitpr.
  endloop.
IF sy-subrc = 0. "&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; ADD IT
  uomup = &amp;lt;fs_konv&amp;gt;-kmein.
ENDIF.
  unitpr = ( unitpr / vbrp-fkimg ).
  If lines( gt_konv ) gt 0.
  clear psagediff.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Mar 2010 20:22:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-in-my-query/m-p/6729580#M1456863</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2010-03-25T20:22:50Z</dc:date>
    </item>
  </channel>
</rss>

