<?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 field validation using field symbol !! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-validation-using-field-symbol/m-p/4254320#M1015545</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;in my dialog i have 3 fields which needs the port number to be validated against a custom table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I want to write a single module for validation which can be called during validation of all these 3 fields. But inside this module i must differentiate the fields so that the field's current value is read and validated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in my PAI i say&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD ZXXXPORT1 MODULE PORT_VAL.&lt;/P&gt;&lt;P&gt;FIELD ZXXXPORT2 MODULE PORT_VAL.&lt;/P&gt;&lt;P&gt;FIELD ZXXXPORT3 MODULE PORT_VAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the module code is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;FS&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: L_CNT TYPE I.&lt;/P&gt;&lt;P&gt;      GET CURSOR FIELD FIELDNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ASSIGN FIELDNAME TO &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          SELECT COUNT(*) INTO L_CNT FROM ZXXX WHERE PORTCODE = &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          IF L_CNT IS INITIAL.&lt;/P&gt;&lt;P&gt;            MESSAGE E899(F2) WITH 'Enter a valid Port code '.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This fails even when the correct port number is entered and I know why. In the select's where class I need the field's value to be substituted, but when i use FIELDNAME or a field symbol like &amp;lt;FS&amp;gt;, the fieldname is what is substituted rather thaan the field's value. How to get the field's value here ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Aug 2008 15:58:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-08T15:58:23Z</dc:date>
    <item>
      <title>field validation using field symbol !!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-validation-using-field-symbol/m-p/4254320#M1015545</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;in my dialog i have 3 fields which needs the port number to be validated against a custom table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I want to write a single module for validation which can be called during validation of all these 3 fields. But inside this module i must differentiate the fields so that the field's current value is read and validated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in my PAI i say&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD ZXXXPORT1 MODULE PORT_VAL.&lt;/P&gt;&lt;P&gt;FIELD ZXXXPORT2 MODULE PORT_VAL.&lt;/P&gt;&lt;P&gt;FIELD ZXXXPORT3 MODULE PORT_VAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the module code is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;FS&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: L_CNT TYPE I.&lt;/P&gt;&lt;P&gt;      GET CURSOR FIELD FIELDNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ASSIGN FIELDNAME TO &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          SELECT COUNT(*) INTO L_CNT FROM ZXXX WHERE PORTCODE = &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          IF L_CNT IS INITIAL.&lt;/P&gt;&lt;P&gt;            MESSAGE E899(F2) WITH 'Enter a valid Port code '.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This fails even when the correct port number is entered and I know why. In the select's where class I need the field's value to be substituted, but when i use FIELDNAME or a field symbol like &amp;lt;FS&amp;gt;, the fieldname is what is substituted rather thaan the field's value. How to get the field's value here ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2008 15:58:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-validation-using-field-symbol/m-p/4254320#M1015545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-08T15:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: field validation using field symbol !!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-validation-using-field-symbol/m-p/4254321#M1015546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are almost there, just change the assign statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ASSIGN (FIELDNAME) TO &amp;lt;FS&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;By this way, it will assign the value of the FIELDNAME to the &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2008 16:00:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-validation-using-field-symbol/m-p/4254321#M1015546</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-08-08T16:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: field validation using field symbol !!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-validation-using-field-symbol/m-p/4254322#M1015547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellente...thank u very much...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2008 16:13:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-validation-using-field-symbol/m-p/4254322#M1015547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-08T16:13:12Z</dc:date>
    </item>
  </channel>
</rss>

