<?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 Field name inside CDS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-inside-cds/m-p/502859#M17448</link>
    <description>&lt;P&gt;Hello, &lt;/P&gt;
  &lt;P&gt;How can i get run time information of the field name inside CDS. For example: Select a.matnr from mara as a .... I know the field name is Matnr but my requirement is to look the field ( Note : Field and not its value) in another table and if that exists the value should be replaced something like this&lt;/P&gt;
  &lt;P&gt;&lt;EM&gt;select a.matnr....from ( case when a.matnr ( select field from 'TABLE' where fieldname = a.matnr ) then ' Table value' else a.matnr &lt;/EM&gt;&lt;/P&gt;
  &lt;P&gt;I can hardcode the fieldname as 'MATNR' in the sub select but the problem is i have more than 200 fields and then i have to do the select as many times. Is there a way to identify the field name without having to hardcode .&lt;/P&gt;
  &lt;P&gt;Thanks.&lt;/P&gt;
  &lt;P&gt;Prem&lt;/P&gt;</description>
    <pubDate>Wed, 08 Nov 2017 16:27:11 GMT</pubDate>
    <dc:creator>former_member182337</dc:creator>
    <dc:date>2017-11-08T16:27:11Z</dc:date>
    <item>
      <title>Field name inside CDS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-inside-cds/m-p/502859#M17448</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;
  &lt;P&gt;How can i get run time information of the field name inside CDS. For example: Select a.matnr from mara as a .... I know the field name is Matnr but my requirement is to look the field ( Note : Field and not its value) in another table and if that exists the value should be replaced something like this&lt;/P&gt;
  &lt;P&gt;&lt;EM&gt;select a.matnr....from ( case when a.matnr ( select field from 'TABLE' where fieldname = a.matnr ) then ' Table value' else a.matnr &lt;/EM&gt;&lt;/P&gt;
  &lt;P&gt;I can hardcode the fieldname as 'MATNR' in the sub select but the problem is i have more than 200 fields and then i have to do the select as many times. Is there a way to identify the field name without having to hardcode .&lt;/P&gt;
  &lt;P&gt;Thanks.&lt;/P&gt;
  &lt;P&gt;Prem&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 16:27:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-inside-cds/m-p/502859#M17448</guid>
      <dc:creator>former_member182337</dc:creator>
      <dc:date>2017-11-08T16:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Field name inside CDS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-inside-cds/m-p/502860#M17449</link>
      <description>&lt;P&gt;No. ABAP CDS SQL is static. And there are also no subqueries in ABAP CDS.&lt;/P&gt;
  &lt;P&gt;For things like that, try to use SQLScript in CDS table functions or use the dynamic clauses of Open SQL.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 17:21:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-inside-cds/m-p/502860#M17449</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-11-08T17:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Field name inside CDS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-inside-cds/m-p/502861#M17450</link>
      <description>&lt;P&gt;Thank you .&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 16:34:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-name-inside-cds/m-p/502861#M17450</guid>
      <dc:creator>former_member182337</dc:creator>
      <dc:date>2017-11-10T16:34:41Z</dc:date>
    </item>
  </channel>
</rss>

