<?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 Parse error in Query service in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/parse-error-in-query-service/m-p/5767671#M1305996</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some problems using the query service. here is the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  data: lo_qry_manager type ref to if_os_query_manager,
        lo_qry type ref to if_os_query,
        lt_items type osreftab,
        l_tender_no type zs2tcvbeln_d,
        lo_agent type ref to zca_s2_tender_item,
        lx_error type ref to cx_root.

  lo_agent = zca_s2_tender_item=&amp;gt;agent.
  l_tender_no = header-&amp;gt;get_zs2tcvbeln( ).

  lo_qry_manager = cl_os_system=&amp;gt;get_query_manager( ).
  lo_qry = lo_qry_manager-&amp;gt;create_query( i_filter = 'ZS2TCVBELN = PAR1' ).

  try.
      lt_items = lo_agent-&amp;gt;if_os_ca_persistency~get_persistent_by_query(
                                                             i_query = lo_qry
                                                             i_par1  = l_tender_no ).
    catch cx_root into lx_error.
  endtry.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The call to &lt;EM&gt;if_os_ca_persistency~get_persistent_by_query&lt;/EM&gt; raises the exception &lt;EM&gt;CX_OS_QUERY_PARSE_ERROR&lt;/EM&gt; with the text id &lt;EM&gt;ATTR_EXPECTED&lt;/EM&gt; and ZS2TCVBELN als attribute found, that is somehow wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to be the case for all attributes of the related persistence class starting with the letter &lt;EM&gt;Z&lt;/EM&gt;, all other attributes seem to work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hans Hohenfeld&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Jun 2009 12:44:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-15T12:44:30Z</dc:date>
    <item>
      <title>Parse error in Query service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parse-error-in-query-service/m-p/5767671#M1305996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some problems using the query service. here is the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  data: lo_qry_manager type ref to if_os_query_manager,
        lo_qry type ref to if_os_query,
        lt_items type osreftab,
        l_tender_no type zs2tcvbeln_d,
        lo_agent type ref to zca_s2_tender_item,
        lx_error type ref to cx_root.

  lo_agent = zca_s2_tender_item=&amp;gt;agent.
  l_tender_no = header-&amp;gt;get_zs2tcvbeln( ).

  lo_qry_manager = cl_os_system=&amp;gt;get_query_manager( ).
  lo_qry = lo_qry_manager-&amp;gt;create_query( i_filter = 'ZS2TCVBELN = PAR1' ).

  try.
      lt_items = lo_agent-&amp;gt;if_os_ca_persistency~get_persistent_by_query(
                                                             i_query = lo_qry
                                                             i_par1  = l_tender_no ).
    catch cx_root into lx_error.
  endtry.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The call to &lt;EM&gt;if_os_ca_persistency~get_persistent_by_query&lt;/EM&gt; raises the exception &lt;EM&gt;CX_OS_QUERY_PARSE_ERROR&lt;/EM&gt; with the text id &lt;EM&gt;ATTR_EXPECTED&lt;/EM&gt; and ZS2TCVBELN als attribute found, that is somehow wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to be the case for all attributes of the related persistence class starting with the letter &lt;EM&gt;Z&lt;/EM&gt;, all other attributes seem to work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hans Hohenfeld&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2009 12:44:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parse-error-in-query-service/m-p/5767671#M1305996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-15T12:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Parse error in Query service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parse-error-in-query-service/m-p/5767672#M1305997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unbelievable, fixed by note 1157635...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 10:44:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parse-error-in-query-service/m-p/5767672#M1305997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-16T10:44:28Z</dc:date>
    </item>
  </channel>
</rss>

