<?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 CDS view syntax error about namespace in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-syntax-error-about-namespace/m-p/693826#M31291</link>
    <description>&lt;P&gt;Hi Guys,&lt;/P&gt;
  &lt;P&gt;currently I meet a CDS view issue, I wrote a table function to get data from table '/CFG/ECA_DELTA‘, but I cannot active the AMDP Class due to syntax error, and the error message is just simply 'SQLError:'.&lt;/P&gt;
  &lt;P&gt;my Table Function looks like below:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;@ClientDependent: false
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Table Function for Ecatt input log'
define table function /CFG/CCP_DELTA_ECATT_TF


returns
{
  RUN_ID    : /cfg/de_ccp_run_id;
  ECA_ID    : /smb/objid;
  FILENAME  : /smb/sba1_filename;
  PRIMKEY   : /cfg/de_ccp_primkey;
  DS_FLD    : /cfg/de_tab_field;
  OLD_VALUE : /smb/de_centraldata_orig_id;
  NEW_VALUE : /smb/de_centraldata_orig_id;
  CHG_TYPE  : /cfg/de_chg_type;
}
implemented by method
  /cfg/ccp_admp_ecatt=&amp;gt;GET_DELTA_INPUT_LOG;
&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;and the implementation function is:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;CLASS /cfg/ccp_admp_ecatt DEFINITION
  PUBLIC
  FINAL
  CREATE PUBLIC .


  PUBLIC SECTION.
    INTERFACES if_amdp_marker_hdb.
    CLASS-METHODS: GET_DELTA_INPUT_LOG FOR TABLE FUNCTION /CFG/CCP_DELTA_ECATT_TF .


  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.

CLASS /cfg/ccp_admp_ecatt IMPLEMENTATION.


  METHOD get_delta_input_log BY DATABASE FUNCTION FOR HDB LANGUAGE SQLSCRIPT
  OPTIONS READ-ONLY USING /CFG/ECA_DELTA.


    RETURN SELECT eca.run_id  ,
                  eca.eca_id  ,
                  eca.filename  ,
                  eca.primkey  ,
                  eca.ds_fld   ,
                  eca.old_value ,
                  eca.new_value ,
                  eca.chg_type
            from  /CFG/ECA_DELTA  as eca   "&amp;lt;==== here I have syntax error
             where eca.pro_id = :pro_id
            ORDER BY    eca.eca_id  ,
                        eca.filename  ,
                        eca.primkey  ;




  endmethod .


ENDCLASS.&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I tried to copy the table /cfg/eca_delta to an local table ZECA_DELTA, and it can work in a local AMDP class, so, I assume this is a namespace error, does anyone has idea regarding how I can fix it? thank you so much for any help I could get &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
  &lt;P&gt;BR&lt;/P&gt;
  &lt;P&gt;Vincent Guan&lt;/P&gt;</description>
    <pubDate>Mon, 26 Nov 2018 09:51:49 GMT</pubDate>
    <dc:creator>former_member185480</dc:creator>
    <dc:date>2018-11-26T09:51:49Z</dc:date>
    <item>
      <title>CDS view syntax error about namespace</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-syntax-error-about-namespace/m-p/693826#M31291</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;
  &lt;P&gt;currently I meet a CDS view issue, I wrote a table function to get data from table '/CFG/ECA_DELTA‘, but I cannot active the AMDP Class due to syntax error, and the error message is just simply 'SQLError:'.&lt;/P&gt;
  &lt;P&gt;my Table Function looks like below:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;@ClientDependent: false
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Table Function for Ecatt input log'
define table function /CFG/CCP_DELTA_ECATT_TF


returns
{
  RUN_ID    : /cfg/de_ccp_run_id;
  ECA_ID    : /smb/objid;
  FILENAME  : /smb/sba1_filename;
  PRIMKEY   : /cfg/de_ccp_primkey;
  DS_FLD    : /cfg/de_tab_field;
  OLD_VALUE : /smb/de_centraldata_orig_id;
  NEW_VALUE : /smb/de_centraldata_orig_id;
  CHG_TYPE  : /cfg/de_chg_type;
}
implemented by method
  /cfg/ccp_admp_ecatt=&amp;gt;GET_DELTA_INPUT_LOG;
&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;and the implementation function is:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;CLASS /cfg/ccp_admp_ecatt DEFINITION
  PUBLIC
  FINAL
  CREATE PUBLIC .


  PUBLIC SECTION.
    INTERFACES if_amdp_marker_hdb.
    CLASS-METHODS: GET_DELTA_INPUT_LOG FOR TABLE FUNCTION /CFG/CCP_DELTA_ECATT_TF .


  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.

CLASS /cfg/ccp_admp_ecatt IMPLEMENTATION.


  METHOD get_delta_input_log BY DATABASE FUNCTION FOR HDB LANGUAGE SQLSCRIPT
  OPTIONS READ-ONLY USING /CFG/ECA_DELTA.


    RETURN SELECT eca.run_id  ,
                  eca.eca_id  ,
                  eca.filename  ,
                  eca.primkey  ,
                  eca.ds_fld   ,
                  eca.old_value ,
                  eca.new_value ,
                  eca.chg_type
            from  /CFG/ECA_DELTA  as eca   "&amp;lt;==== here I have syntax error
             where eca.pro_id = :pro_id
            ORDER BY    eca.eca_id  ,
                        eca.filename  ,
                        eca.primkey  ;




  endmethod .


ENDCLASS.&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I tried to copy the table /cfg/eca_delta to an local table ZECA_DELTA, and it can work in a local AMDP class, so, I assume this is a namespace error, does anyone has idea regarding how I can fix it? thank you so much for any help I could get &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
  &lt;P&gt;BR&lt;/P&gt;
  &lt;P&gt;Vincent Guan&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 09:51:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-syntax-error-about-namespace/m-p/693826#M31291</guid>
      <dc:creator>former_member185480</dc:creator>
      <dc:date>2018-11-26T09:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: CDS view syntax error about namespace</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-syntax-error-about-namespace/m-p/693827#M31292</link>
      <description>&lt;P&gt;Hi Vincent,&lt;/P&gt;&lt;P&gt; Try placing the table name within double quote like  "/CFG/ECA_DELTA" '.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 15:56:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-syntax-error-about-namespace/m-p/693827#M31292</guid>
      <dc:creator>manikumar_shanmugam6</dc:creator>
      <dc:date>2018-11-26T15:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: CDS view syntax error about namespace</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-syntax-error-about-namespace/m-p/693828#M31293</link>
      <description>&lt;P&gt;Hi Manikumar,&lt;/P&gt;&lt;P&gt;thanks a lot for your help, it resolved my issue. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 02:17:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-syntax-error-about-namespace/m-p/693828#M31293</guid>
      <dc:creator>former_member185480</dc:creator>
      <dc:date>2018-11-27T02:17:57Z</dc:date>
    </item>
  </channel>
</rss>

