<?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 Validation of fields Dynamically in Module Pool Screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702594#M1452603</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have developed a module pool screen on which i have 25 fields from a custom table ZDATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fields are&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

ZGROUP1
ZGROUP2
ZGROUP3
ZGROUP4

- -   --   -

ZGROUP25

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i need to vaildate these fields.. how can i do it dynamically&lt;/P&gt;&lt;P&gt;i can write a seperate select for all the 25 fields but it does not make sense.. i want to do it dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single zgroup1&lt;/P&gt;&lt;P&gt;                    from ZDATA&lt;/P&gt;&lt;P&gt;                     into l_zgroup1&lt;/P&gt;&lt;P&gt;                    where zgroup1 = zdata-zgroup1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;simlarly for all the 25 fields but i need to do it using dynamically select ie : i will pass the field and write the select in a perform and call the perform 25 times..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How i can validate dynamically..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Mar 2010 19:43:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-09T19:43:59Z</dc:date>
    <item>
      <title>Validation of fields Dynamically in Module Pool Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702594#M1452603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have developed a module pool screen on which i have 25 fields from a custom table ZDATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fields are&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

ZGROUP1
ZGROUP2
ZGROUP3
ZGROUP4

- -   --   -

ZGROUP25

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i need to vaildate these fields.. how can i do it dynamically&lt;/P&gt;&lt;P&gt;i can write a seperate select for all the 25 fields but it does not make sense.. i want to do it dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single zgroup1&lt;/P&gt;&lt;P&gt;                    from ZDATA&lt;/P&gt;&lt;P&gt;                     into l_zgroup1&lt;/P&gt;&lt;P&gt;                    where zgroup1 = zdata-zgroup1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;simlarly for all the 25 fields but i need to do it using dynamically select ie : i will pass the field and write the select in a perform and call the perform 25 times..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How i can validate dynamically..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 19:43:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702594#M1452603</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T19:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Validation of fields Dynamically in Module Pool Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702595#M1452604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I liked the ABAP statement [DO VARYING|http://help.sap.com/abapdocu_70/en/ABAPDO_VARYING.htm] for that, though that's been classified as obsolete. So instead you should look at the [ASSIGN|http://help.sap.com/abapdocu_70/en/ABAPASSIGN.htm] statement, especially at the part [ASSIGN COMPONENT comp OF STRUCTURE struc]. The latter seems very appropriate, since you seem to have all fields in a structure, so you can simply iterate in a DO loop over all components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to keep it generic you can also determine the number of components in your structure dynamically by using the statement [DESCRIBE field TYPE type COMPONENTS comp], which will give you for your structure the number of fields in comp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The approach only works well though, if you want to iterate over all fields in your structure. Otherwise you might be better off with just using a plain ASSIGN and referencing your global variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, harald&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 20:23:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702595#M1452604</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T20:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Validation of fields Dynamically in Module Pool Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702596#M1452605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Harald&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Can you elabrate your Point..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i proceed further for developing code.. Any Sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 20:30:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702596#M1452605</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T20:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Validation of fields Dynamically in Module Pool Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702597#M1452606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a quick example, might need to be fixed, because of invalid syntax (don't have a SAP system to quickly check it).&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
field-symbols &amp;lt;zgroup&amp;gt; type zdata-zgroup1.
data:
  zdata type zdata,
  n type i,
  t type c.

describe field zdata type t components n.
do n times.
  assign component sy-index of structure zdata to &amp;lt;zgroup&amp;gt;.
* Add your check on zgroup here with appropriate error message if wrong
* Use &amp;lt;zgroup&amp;gt; as you would any of the zdata-zgroup1, zgroup2, etc.
enddo.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Sorry, I noticed also that some of the links that I pasted got messed up; however, you can easily look up the keywords in the ABAP documentation...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 20:44:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702597#M1452606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T20:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Validation of fields Dynamically in Module Pool Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702598#M1452607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any further approach on this....&lt;/P&gt;&lt;P&gt;Any other way of doing it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 13:48:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702598#M1452607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-11T13:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Validation of fields Dynamically in Module Pool Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702599#M1452608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;simlarly for all the 25 fields but i need to do it using dynamically select ie : i will pass the field and write the select in a perform and call the perform 25 times..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can't really call this 'dynamically', more a matter of modularizing your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what exactly is the issue here? You have 25 fields from table ZDATA and you want to validate against this very same table, correct? What should this check do? Determine if entry is already available or what?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 14:03:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702599#M1452608</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2010-03-11T14:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Validation of fields Dynamically in Module Pool Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702600#M1452609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its simply a validation to be done for the enterted value against ZDATA table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie : i have ZGROUP1 field on the screen... now when the user enters some value it should be validated against ZDATA table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;similarly i need validation for all the 25 fields on the screen.. ie : ZGROUP1 to ZGROUP2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can write here select single 25times to validate... but i guess writing select statment 25 times does not make any sense..&lt;/P&gt;&lt;P&gt;I need to validate it dynamically..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i do that...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 14:16:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702600#M1452609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-11T14:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Validation of fields Dynamically in Module Pool Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702601#M1452610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any Lite on this Guys..&lt;/P&gt;&lt;P&gt;or should i go head with normal 25 times validation for 25 fields on the screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 15:26:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702601#M1452610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-11T15:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Validation of fields Dynamically in Module Pool Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702602#M1452611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if you understood my posting above, where I had given you the code for dynamic validation (if that's what you want to do). Maybe you should elaborate why you immediately ask for &lt;EM&gt;other ways&lt;/EM&gt;... &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And by the way: If you have 25 screen fields, then you should also consider using normal modularization. I.e. writing a form routine or method for validating the field and then calling this for each individual field. That way you still have the overhead of writing the 25 form/method calls, but you have much more screen control now, because you can actually attach the error messages to the specific field (i.e. if you make a specific PAI module for each field, from which you call the form routine). This way only the faulty field is highlighted if the entered value is incorrect and thus easy to see for the user what he needs to fix. (Of course in some cases you need to group fields, because there might be dependencies among other fields.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, harald&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 19:11:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-of-fields-dynamically-in-module-pool-screen/m-p/6702602#M1452611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-11T19:11:15Z</dc:date>
    </item>
  </channel>
</rss>

