<?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: Check Table validation General code needed in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-table-validation-general-code-needed/m-p/2803619#M654943</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello a®s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code samples already given solve the problem to verify the existence of single values in check tables. However, this may not be sufficient.&lt;/P&gt;&lt;P&gt;Assuming that one ore more foreign-key relations in your custom tables have more than one foreign-key fields then this logic is insufficient.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The classical example is table SFLIGHT. Look at the foreign-key relation for field CONNID:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SPFLI	MANDT	SFLIGHT	MANDT
SPFLI	CARRID	SFLIGHT	CARRID
SPFLI	CONNID	SFLIGHT	CONNID&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While field MANDT can be neglected you may find a foreign-key value for CARRID in table S_CARR and the corresponding value for CONNID in SPFLI but not the combination of both in table SFLIGHT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus, for any foreign-key relation having multiple check-table fields you have to use a more elaborate logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Sep 2007 03:54:18 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2007-09-03T03:54:18Z</dc:date>
    <item>
      <title>Check Table validation General code needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-table-validation-general-code-needed/m-p/2803615#M654939</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 have a requirement to update 2 custom tables. Each table have more  230 field each.&lt;/P&gt;&lt;P&gt;and have 90 check tables assigned to the fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a common code to validate before updating into this table,&lt;/P&gt;&lt;P&gt;i need to validate the fields against the check tables assigned to that field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know i how to validate field with each check table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i need a common function module. class or some code that i can use commonly passing field value, check table and i need return value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody having code please paste it here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help appreciated.&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Sep 2007 17:31:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-table-validation-general-code-needed/m-p/2803615#M654939</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-09-02T17:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Check Table validation General code needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-table-validation-general-code-needed/m-p/2803616#M654940</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;Happy to see that you ask questions too.. i had an impression that you only solve them &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why dont you create a subroutine in you program?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f_validate USING field TYPE c&lt;/P&gt;&lt;P&gt;                                    value TYPE any&lt;/P&gt;&lt;P&gt;                                    tabname TYPE c&lt;/P&gt;&lt;P&gt;                         CHANGING return TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS : w_field TYPE any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE ( field )&lt;/P&gt;&lt;P&gt;FROM ( tabname )&lt;/P&gt;&lt;P&gt;INTO w_field&lt;/P&gt;&lt;P&gt;WHERE ( field ) EQ value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;retrurn = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Best Regards,&lt;/P&gt;&lt;P&gt;Vikas Bittera.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Sep 2007 17:43:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-table-validation-general-code-needed/m-p/2803616#M654940</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-02T17:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Check Table validation General code needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-table-validation-general-code-needed/m-p/2803617#M654941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have verified AT SE37 and Found many ( Search term would be &lt;STRONG&gt;CHECK&lt;/STRONG&gt;TABL*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below FM :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CHECKTABLE_GET'&lt;/P&gt;&lt;P&gt;             EXPORTING&lt;/P&gt;&lt;P&gt;                  VALUECHECKFIELDNAME = SPACE&lt;/P&gt;&lt;P&gt;                  VALUECHECKTABLE     = SPACE&lt;/P&gt;&lt;P&gt;                  VALUECHECKVALUE     = SPACE&lt;/P&gt;&lt;P&gt;                  VALUEFIELDNAME      = FIELD_DFIES-FIELDNAME&lt;/P&gt;&lt;P&gt;                  VALUELANGUAGE       = SY-LANGU&lt;/P&gt;&lt;P&gt;                  VALUETABNAME        = FIELD_DFIES-TABNAME&lt;/P&gt;&lt;P&gt;                  MAXENTRIES          = MAXENTRIES&lt;/P&gt;&lt;P&gt;                  SHOW_LIST           = SPACE&lt;/P&gt;&lt;P&gt;             IMPORTING&lt;/P&gt;&lt;P&gt;                  RETCODE             = RC&lt;/P&gt;&lt;P&gt;             TABLES&lt;/P&gt;&lt;P&gt;                  DYNPSELECT          = DYNPSELECT&lt;/P&gt;&lt;P&gt;                  VALUES              = VALUES&lt;/P&gt;&lt;P&gt;                  VALUESSTRUCTURE     = VALUESSTRUCTURE&lt;/P&gt;&lt;P&gt;             EXCEPTIONS&lt;/P&gt;&lt;P&gt;                  OTHERS              = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at report RDD00DOC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise create one perform routine ,pass the table and fields dynamically'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Sep 2007 17:46:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-table-validation-general-code-needed/m-p/2803617#M654941</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-02T17:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Check Table validation General code needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-table-validation-general-code-needed/m-p/2803618#M654942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vikas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. My brain not upto the mark due to long hours working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your reply will solve my issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points awarded&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Sep 2007 17:53:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-table-validation-general-code-needed/m-p/2803618#M654942</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-09-02T17:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Check Table validation General code needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-table-validation-general-code-needed/m-p/2803619#M654943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello a®s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code samples already given solve the problem to verify the existence of single values in check tables. However, this may not be sufficient.&lt;/P&gt;&lt;P&gt;Assuming that one ore more foreign-key relations in your custom tables have more than one foreign-key fields then this logic is insufficient.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The classical example is table SFLIGHT. Look at the foreign-key relation for field CONNID:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SPFLI	MANDT	SFLIGHT	MANDT
SPFLI	CARRID	SFLIGHT	CARRID
SPFLI	CONNID	SFLIGHT	CONNID&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While field MANDT can be neglected you may find a foreign-key value for CARRID in table S_CARR and the corresponding value for CONNID in SPFLI but not the combination of both in table SFLIGHT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus, for any foreign-key relation having multiple check-table fields you have to use a more elaborate logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2007 03:54:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-table-validation-general-code-needed/m-p/2803619#M654943</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-09-03T03:54:18Z</dc:date>
    </item>
  </channel>
</rss>

