<?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: Grouping fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/grouping-fields/m-p/2540540#M577257</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below is part of another answer I gave in another thread, plus some extra ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Groups just give you a way of handling several fields at once, instead of having to specify one field at a time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, rather than having to code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at screen.
  if screen-name = 'KNA1-KUNNR'
  or screen-name = 'KNA1-NAME1'
  or screen-name = 'KNA1-NAME2'
  or screen-name = 'KNA1-NAME3'
  or screen-name = 'KNA1-NAME4'
  or screen-name = 'KNA1-ORT01'
  or  (etc etc etc) ....
*    do something to field atttibutes
  endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could set, say, group1 on all these fields to say "CUS" and code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at screen.
  if screen-group1 = 'CUS'.  "customer field
*    do something to field atttibutes
  endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which is much more elegant. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the number of "modifications per field", there are four group fields but the ways you use then are only limited by your imagination e.g. you could use a separate bytes in each group to flag different things e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at screen.
  l_flag = screen-group1+0(1).
  case l_flag. 
    when 'A'.   
*    do something to field atttibutes
* etc etc
  endcase.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 08 Jul 2007 23:00:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-08T23:00:20Z</dc:date>
    <item>
      <title>Grouping fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/grouping-fields/m-p/2540539#M577256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Why you group fields in modulepool program and how many modification is allowed per field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jul 2007 22:46:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/grouping-fields/m-p/2540539#M577256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-08T22:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/grouping-fields/m-p/2540540#M577257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below is part of another answer I gave in another thread, plus some extra ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Groups just give you a way of handling several fields at once, instead of having to specify one field at a time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, rather than having to code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at screen.
  if screen-name = 'KNA1-KUNNR'
  or screen-name = 'KNA1-NAME1'
  or screen-name = 'KNA1-NAME2'
  or screen-name = 'KNA1-NAME3'
  or screen-name = 'KNA1-NAME4'
  or screen-name = 'KNA1-ORT01'
  or  (etc etc etc) ....
*    do something to field atttibutes
  endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could set, say, group1 on all these fields to say "CUS" and code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at screen.
  if screen-group1 = 'CUS'.  "customer field
*    do something to field atttibutes
  endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which is much more elegant. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the number of "modifications per field", there are four group fields but the ways you use then are only limited by your imagination e.g. you could use a separate bytes in each group to flag different things e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at screen.
  l_flag = screen-group1+0(1).
  case l_flag. 
    when 'A'.   
*    do something to field atttibutes
* etc etc
  endcase.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jul 2007 23:00:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/grouping-fields/m-p/2540540#M577257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-08T23:00:20Z</dc:date>
    </item>
  </channel>
</rss>

