<?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: BOPF consistency validation problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bopf-consistency-validation-problem/m-p/11426598#M1927104</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Christian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would expect that you receive the error message in both cases - if you modify the BO via report or if you modify the BO via SADL. So please open a ticket on BC-ESI-BOF for further clarification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general (and also the class documentation of the altkey validation describes it like that) I recommend to have the altkey validation configured as &lt;SPAN style="text-decoration: underline;"&gt;action&lt;/SPAN&gt; validation on CREATE/UPDATE or on SAVE (for a late check execution). If you would configure it as just a &lt;SPAN style="text-decoration: underline;"&gt;consistency&lt;/SPAN&gt; validation instead, it won't reject the modification, but only return messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Tilmann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Nov 2015 10:41:23 GMT</pubDate>
    <dc:creator>former_member190794</dc:creator>
    <dc:date>2015-11-06T10:41:23Z</dc:date>
    <item>
      <title>BOPF consistency validation problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bopf-consistency-validation-problem/m-p/11426597#M1927103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a problem with a consistency validation which is defined in my BOPF object for the root node.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my BOPF object there is defined an alternative key, the business partner number. When creating a new a entry it must be checked that the alternative key is unique.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Therefore i defined a consistency validation and use the class&amp;nbsp; /BOBF/CL_LIB_V_ALTKEY which checks for duplicate alternative keys. As trigger conditions, create an change are checked&amp;nbsp; for this validation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The validation is processed fine when i call the BOPF modify method directly from a ABAP report and i receive an error message. The validation also works when i call an action which is defined for the root node and i get an error message too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i trigger the creation of an new entry via oData/Gateway Service, then in debugger i can see that the check class is processed also, but no error message is given to the UI and the save process is not avoided, so i have duplicate records in database afterwards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It only works when i define an additional action validation on the node with same class /BOBF/CL_LIB_V_ALTKEY. But then, if the alternative key is unique, the validation is triggered twice because later on the consistency validation is also processed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe an error in the SADL create coding or i am missing something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 08:55:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bopf-consistency-validation-problem/m-p/11426597#M1927103</guid>
      <dc:creator>christian_hecht</dc:creator>
      <dc:date>2015-11-06T08:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: BOPF consistency validation problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bopf-consistency-validation-problem/m-p/11426598#M1927104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Christian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would expect that you receive the error message in both cases - if you modify the BO via report or if you modify the BO via SADL. So please open a ticket on BC-ESI-BOF for further clarification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general (and also the class documentation of the altkey validation describes it like that) I recommend to have the altkey validation configured as &lt;SPAN style="text-decoration: underline;"&gt;action&lt;/SPAN&gt; validation on CREATE/UPDATE or on SAVE (for a late check execution). If you would configure it as just a &lt;SPAN style="text-decoration: underline;"&gt;consistency&lt;/SPAN&gt; validation instead, it won't reject the modification, but only return messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Tilmann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 10:41:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bopf-consistency-validation-problem/m-p/11426598#M1927104</guid>
      <dc:creator>former_member190794</dc:creator>
      <dc:date>2015-11-06T10:41:23Z</dc:date>
    </item>
  </channel>
</rss>

