<?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: foreign key field accepts invalid values when sstring field in table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035573#M1610260</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Can you explain how you are entering the values in the field ? Is this a screen field or a direct table field used in se11. &lt;/P&gt;&lt;P&gt;For foreign key field checks, the foreign key field (in the other table) and the field in the current table must be of same type.&lt;/P&gt;&lt;P&gt;If you have declared the key field in the FK table as of type Char and then you use a SSTRING field in your secondary table, the key might not check. The data type of both the fields must match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Titus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jul 2011 08:55:57 GMT</pubDate>
    <dc:creator>titus_thomas2</dc:creator>
    <dc:date>2011-07-12T08:55:57Z</dc:date>
    <item>
      <title>foreign key field accepts invalid values when sstring field in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035568#M1610255</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;this bug (?) kept me busy quite a while: I have a table with a a foreign key field, a country ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the same table I have another field for entering a name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the name field is of type CHAR(30) and I try to insert an invalid country ID via the menu I get an error message as expected. (name field empty, btw)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the name field is of type SSTRING(30) and I try to insert an invald country ID via the menu I &lt;STRONG&gt;DO NOT&lt;/STRONG&gt; get any error message and the entry is saved. (name field also left empty)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything else I left unchanged, switching the name field from CHAR to SSTRING back and forth switches the odd behavior off and on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody reproduce this or tell me what I'm missing? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2011 13:14:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035568#M1610255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-11T13:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: foreign key field accepts invalid values when sstring field in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035569#M1610256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i doubt if  SSTRING is allowed to have 30 length .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has a default length of 20 charaters and system does not allow to define a custom length for the same .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards ,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 06:18:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035569#M1610256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-12T06:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: foreign key field accepts invalid values when sstring field in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035570#M1610257</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;good point, changed the length of the SSTRING field to 5 - still get the same odd behavior:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As long as I have any SSTRING field in my table (whether I fill it in or not), I can enter whatever value I want into my foreign key fields and the dataset will be saved without any error. As soon as I delete the sstring field, however, the foreign keys get checked correctly and I can't save datasets with invalid data in foreign key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody replicate this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. By the way: The system DOES require a length to be set for a field with SSTRING data type (1-255)  - so the error shouldn't lie here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 07:39:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035570#M1610257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-12T07:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: foreign key field accepts invalid values when sstring field in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035571#M1610258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;did you define a client field in table key, too? Foreign key for check table T005 uses both CLIENT and COUNTRY field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you used &lt;STRONG&gt;foreign key field type&lt;/STRONG&gt; option &lt;EM&gt;Key field/candidates&lt;/EM&gt; ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 08:49:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035571#M1610258</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-12T08:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: foreign key field accepts invalid values when sstring field in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035572#M1610259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; did you define a client field in table key, too. Foreign key for check table T005 uses both CLIENT and COUNTRY field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Have you used foreign key field type option Key field/candidates ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, but enabling it doesn't change anything. As long as I have a SSTRING field in the table, the foreign key is "ignored".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 08:53:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035572#M1610259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-12T08:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: foreign key field accepts invalid values when sstring field in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035573#M1610260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Can you explain how you are entering the values in the field ? Is this a screen field or a direct table field used in se11. &lt;/P&gt;&lt;P&gt;For foreign key field checks, the foreign key field (in the other table) and the field in the current table must be of same type.&lt;/P&gt;&lt;P&gt;If you have declared the key field in the FK table as of type Char and then you use a SSTRING field in your secondary table, the key might not check. The data type of both the fields must match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Titus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 08:55:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035573#M1610260</guid>
      <dc:creator>titus_thomas2</dc:creator>
      <dc:date>2011-07-12T08:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: foreign key field accepts invalid values when sstring field in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035574#M1610261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Can you explain how you are entering the values in the field ? Is this a screen field or a direct table field used in se11. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SE11 -&amp;gt; Utilities -&amp;gt; Table Contents -&amp;gt; Create entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; For foreign key field checks, the foreign key field (in the other table) and the field in the current table must be of same type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe it wasn't clear from my first posts: The SSTRING field has nothing to do with the foreign keys. I have one FK field of type CHAR(3) which I don't change. &lt;STRONG&gt;However&lt;/STRONG&gt;, once I add one more (simple) SSTRING field to the table and try to create an entry (even leaving the SSTRING field empty) I get a success notice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; If you have declared the key field in the FK table as of type Char and then you use a SSTRING field in your secondary table, the key might not check. The data type of both the fields must match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They do match and their types are not changed. See above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do the following to replicate:&lt;/P&gt;&lt;P&gt;- Create new table with fields:&lt;/P&gt;&lt;P&gt;mandt mandt&lt;/P&gt;&lt;P&gt;primary key field&lt;/P&gt;&lt;P&gt;- try to enter invalid data in primary key -&amp;gt; error&lt;/P&gt;&lt;P&gt;- add field "test" to previous table, data element ***test with data type sstring, length 5&lt;/P&gt;&lt;P&gt;- try to enter invalid data in primary key -&amp;gt; success&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 09:08:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035574#M1610261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-12T09:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: foreign key field accepts invalid values when sstring field in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035575#M1610262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can see your issue. I created a table &lt;STRONG&gt;ZTESTCOUNTRY&lt;/STRONG&gt; without SSTRING field and foreign key check was working. When I added the SSTRING field it was working no more, because the country field on screen 0101 of program /1BCDWB/DBZTESTCOUNTRY had no more flags &lt;EM&gt;from dict&lt;/EM&gt; and &lt;EM&gt;foreign key check&lt;/EM&gt; as it had before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, no solution without screen modification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 10:09:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035575#M1610262</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-12T10:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: foreign key field accepts invalid values when sstring field in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035576#M1610263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got feedback from SAP support:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note [512075|https://service.sap.com/sap/support/notes/512075] describes the behavior. It seems to only affect transaction SE16. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a workaround, SAP suggests to create the view that includes all fields but the STRING/SSTRING field. That should put foreign key checking back to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 12:52:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreign-key-field-accepts-invalid-values-when-sstring-field-in-table/m-p/8035576#M1610263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-10T12:52:53Z</dc:date>
    </item>
  </channel>
</rss>

