<?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>Question Re: CDS Generated BOPF - Alternative key not generated in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/cds-generated-bopf-alternative-key-not-generated/qaa-p/784984#M236609</link>
    <description>&lt;P&gt;Hi &lt;A href="https://answers.sap.com/users/29187/tuli0.html"&gt;Marco Hernandez&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I too tried that and it didn't work.. Moreover I couldn't find any documentation related to it in the ABAP programming model for fiori documentation, so I guess it is not supported yet. &lt;/P&gt;&lt;P&gt;I only found it in the keyword documentation, where it didn't give any information about it.&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abencds_annotations_frmwrk_tables.htm" target="test_blank"&gt;https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abencds_annotations_frmwrk_tables.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I also tried to debug and found that it will work if the key type is GUID and that also it will not work straightaway, you need to make the alternativekey id as 'ACTIVEUUID'. (It is hardcoded in the std. code).&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    alternativeKey: [{
        element: ['salesorder'],
        id: 'ACTIVEUUID',
        uniqueness: #UNIQUE 
     }]
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Also, the Element should be of GUID as well :D.(so many restrictions)&lt;/P&gt;&lt;P&gt;/BOBF/CL_CONF_CDS_LINK_DR_2=&amp;gt;CREATE_NODE_ALTERNATIVE_KEYS,UPDATE_NODE_ALTERNATIVE_KEYS class details if you want to check by yourself. I am not sure if my analysis is completely correct. If i were you I would raise a bug to SAP.&lt;/P&gt;&lt;P&gt;I am just wondering if there is any reason why you want to create the additional alternative keys? and why you are not creating them manually in the BO layer? &lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Mahesh&lt;/P&gt;</description>
    <pubDate>Sun, 13 Jan 2019 12:32:54 GMT</pubDate>
    <dc:creator>maheshpalavalli</dc:creator>
    <dc:date>2019-01-13T12:32:54Z</dc:date>
    <item>
      <title>CDS Generated BOPF - Alternative key not generated</title>
      <link>https://community.sap.com/t5/technology-q-a/cds-generated-bopf-alternative-key-not-generated/qaq-p/784983</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;
  &lt;P&gt;I have defined the following annotations in my CDS view:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;@ObjectModel.alternativeKey: [
{
    element: ['concept'],
    uniqueness: #UNIQUE_IF_NOT_INITIAL,
    id: 'ConceptID'
}
]&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;However, upon activation the Alternative Key is not generated in the BO&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/257965-screenshot-2019-01-11-at-121747.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Has anyone been through the same issue?&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 12:20:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cds-generated-bopf-alternative-key-not-generated/qaq-p/784983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-01-11T12:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: CDS Generated BOPF - Alternative key not generated</title>
      <link>https://community.sap.com/t5/technology-q-a/cds-generated-bopf-alternative-key-not-generated/qaa-p/784984#M236609</link>
      <description>&lt;P&gt;Hi &lt;A href="https://answers.sap.com/users/29187/tuli0.html"&gt;Marco Hernandez&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I too tried that and it didn't work.. Moreover I couldn't find any documentation related to it in the ABAP programming model for fiori documentation, so I guess it is not supported yet. &lt;/P&gt;&lt;P&gt;I only found it in the keyword documentation, where it didn't give any information about it.&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abencds_annotations_frmwrk_tables.htm" target="test_blank"&gt;https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abencds_annotations_frmwrk_tables.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I also tried to debug and found that it will work if the key type is GUID and that also it will not work straightaway, you need to make the alternativekey id as 'ACTIVEUUID'. (It is hardcoded in the std. code).&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    alternativeKey: [{
        element: ['salesorder'],
        id: 'ACTIVEUUID',
        uniqueness: #UNIQUE 
     }]
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Also, the Element should be of GUID as well :D.(so many restrictions)&lt;/P&gt;&lt;P&gt;/BOBF/CL_CONF_CDS_LINK_DR_2=&amp;gt;CREATE_NODE_ALTERNATIVE_KEYS,UPDATE_NODE_ALTERNATIVE_KEYS class details if you want to check by yourself. I am not sure if my analysis is completely correct. If i were you I would raise a bug to SAP.&lt;/P&gt;&lt;P&gt;I am just wondering if there is any reason why you want to create the additional alternative keys? and why you are not creating them manually in the BO layer? &lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Mahesh&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jan 2019 12:32:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cds-generated-bopf-alternative-key-not-generated/qaa-p/784984#M236609</guid>
      <dc:creator>maheshpalavalli</dc:creator>
      <dc:date>2019-01-13T12:32:54Z</dc:date>
    </item>
  </channel>
</rss>

