<?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: Input check with foreign key not work in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177010#M1518055</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should explicitly validate under the &lt;STRONG&gt;AT SELECTION_SCREEN ON&lt;/STRONG&gt; event &amp;amp; check from its check table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just refer the below code snippet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;'

  IF parm_cur IS NOT INITIAL.

    SELECT COUNT(*) FROM tcurc UP TO 1 ROWS WHERE waers = parm_cur.

    IF sy-subrc NE 0.

      MESSAGE e012(e2) WITH parm_cur.

    ENDIF.

  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here &lt;STRONG&gt;TCURC&lt;/STRONG&gt; is the check table.&lt;/P&gt;&lt;P&gt;         &lt;STRONG&gt;PARM_CUR&lt;/STRONG&gt; is the Parameter on Selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Abhii&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Sep 2010 14:56:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-09-01T14:56:49Z</dc:date>
    <item>
      <title>Input check with foreign key not work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177009#M1518054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have created foreign keys to the fields "fesc" and "aplic" of the table "zfk_table". The foreign key for the  field "aplic" consists of the fields "mandt" and "aplic." On the other hand the foreign key for the field "fesc" is formed by the fields "mandt", "aplic" and "fesc".&lt;/P&gt;&lt;P&gt;The check table for the field "aplic" is "ZCHTABLE_APLIC" whose primary key is "mandt" and "aplic". For the field "fesc" the check table is "ZCHTABLE_FESC" whose primary key is "mandt", "aplic" and "fesc".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, when I use the fields "fesc" and "aplic" of the table "zfk_table" as input fields in a screen (dynpro), input checks work correctly, but when these fields are used in a selection screen in a executable program (Type 1),  input check  for the "fesc" send a error message, but the data exist in the check table "ZCHTABLE_FESC".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the source code in the selection screen.: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECTION-SCREEN BEGIN OF BLOCK bl01 WITH FRAME TITLE text-t01.
PARAMETERS: pa_apli LIKE zfk_table-aplic OBLIGATORY VALUE CHECK.
PARAMETERS: pa_fesc LIKE zfk_table-fesc OBLIGATORY VALUE CHECK.
SELECTION-SCREEN END OF BLOCK bl01.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What could be happening?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 14:27:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177009#M1518054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-01T14:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Input check with foreign key not work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177010#M1518055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should explicitly validate under the &lt;STRONG&gt;AT SELECTION_SCREEN ON&lt;/STRONG&gt; event &amp;amp; check from its check table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just refer the below code snippet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;'

  IF parm_cur IS NOT INITIAL.

    SELECT COUNT(*) FROM tcurc UP TO 1 ROWS WHERE waers = parm_cur.

    IF sy-subrc NE 0.

      MESSAGE e012(e2) WITH parm_cur.

    ENDIF.

  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here &lt;STRONG&gt;TCURC&lt;/STRONG&gt; is the check table.&lt;/P&gt;&lt;P&gt;         &lt;STRONG&gt;PARM_CUR&lt;/STRONG&gt; is the Parameter on Selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Abhii&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 14:56:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177010#M1518055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-01T14:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Input check with foreign key not work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177011#M1518056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhii, thanks for your answer.&lt;/P&gt;&lt;P&gt;I know that i can use AT SELECTION-SCREEN ON pa_xxx, but i would like know why don't work correctly the input check with foreign key for the  field "fesc" in this case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 15:08:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177011#M1518056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-01T15:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Input check with foreign key not work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177012#M1518057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In dynpro, it doesnot work by default.&lt;/P&gt;&lt;P&gt;You have to mark the check box "screen check required" both while creating the foreign key and in the screen field attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont think so you can do it in selection screen, because its dynamically generated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 21:23:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177012#M1518057</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-09-01T21:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Input check with foreign key not work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177013#M1518058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have noticed a scenario which could be useful. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For table /BEV1/BO_LEDGER field HKONT, the check table is SKA1. In the foreign key relation ship, I see that for field KTOPL Instead of defining the foreign key table and field, generic is being defined. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope if you define your foreign key for the table field FESC in the similar manner, the value check should work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sujay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 09:34:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177013#M1518058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-02T09:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Input check with foreign key not work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177014#M1518059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sujay.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;I need to check all foreing key fileds in this case, because both fields "fesc" and "aplic" are dependent each other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found a solution (besides AT SELETION-SCREEN ON) but i don't know how convenient it. I modified the flow logic of the report screen "1000". I modified the FIELD statement for this fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 15:35:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177014#M1518059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-02T15:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Input check with foreign key not work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177015#M1518060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, definitely not suggested. You shouldn't be modifying the selection-screen logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should rather look at the foreign key tables &amp;amp; how the entries are maintained. I tried this code &amp;amp; works for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: pa_buk TYPE bkpf-bukrs OBLIGATORY VALUE CHECK.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 16:59:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177015#M1518060</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-09-02T16:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Input check with foreign key not work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177016#M1518061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas, thanks for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Me too tried with same code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECTION-SCREEN BEGIN OF BLOCK bl01 WITH FRAME TITLE text-t01.
  PARAMETERS: pa_apli LIKE zfk_table-aplic OBLIGATORY VALUE CHECK.
  PARAMETERS: pa_fesc LIKE zfk_table-fesc OBLIGATORY VALUE CHECK.
SELECTION-SCREEN END OF BLOCK bl01.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the "pa_apli" work correctly, but the "pa_fesc" not work, i.e,  input check for the "pa_fesc" send a error message, but the data exist in the check table "ZCHTABLE_FESC". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at above the primary key fields of  "ZCHTABLE_FESC" and "ZCHTABLE_APLIC" tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 20:30:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177016#M1518061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-02T20:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Input check with foreign key not work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177017#M1518062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you find any solution? I have the same problem in a Dialog program :S.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Regards&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Obed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2015 17:01:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/input-check-with-foreign-key-not-work/m-p/7177017#M1518062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-08-14T17:01:05Z</dc:date>
    </item>
  </channel>
</rss>

