<?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: Re: user-command in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-user-command/m-p/4011233#M958350</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;use the case statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case sy-uomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when 'select all'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....checkbox = 'x'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when ' deselect'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....checkbox = ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jun 2008 02:17:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-18T02:17:44Z</dc:date>
    <item>
      <title>Re: user-command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-user-command/m-p/4011232#M958349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Re: user-command&lt;/P&gt;&lt;P&gt;Hi Experts&lt;/P&gt;&lt;P&gt;I have ITAB which has 5 fields and a variable chbox.and i am printing the  5 fields  value thro write stmt and displaying chcekbox in the front of output and in user-command i have selectall ,deselect,refresh buttons when i click 'selectall' all the checkbox in output has to select as TICK,and when click  'deselect'  all the checkbox in output has to deselect and if i click refresh it has to refresh the output for the selected checkbox.&lt;/P&gt;&lt;P&gt;Rewarded if helpful.......&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;selectall ,deselect,refresh&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;[] 10000000 age india north west&lt;/P&gt;&lt;P&gt;[] 10000000 age india north south&lt;/P&gt;&lt;P&gt;[] 10000000 age india east west&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 16:34:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-user-command/m-p/4011232#M958349</guid>
      <dc:creator>moniabap_moni</dc:creator>
      <dc:date>2008-06-17T16:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Re: user-command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-user-command/m-p/4011233#M958350</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;use the case statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case sy-uomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when 'select all'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....checkbox = 'x'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when ' deselect'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....checkbox = ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 02:17:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-user-command/m-p/4011233#M958350</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T02:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Re: user-command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-user-command/m-p/4011234#M958351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Moni,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CASE sy-ucomm.
    WHEN 'SELECTALL'.
      DO w_lines TIMES.
        READ LINE sy-index FIELD VALUE w_check.

        IF w_check EQ space.
          checkbox = 'X'.
          MODIFY LINE sy-index FIELD VALUE w_check FROM w_check.
        ENDIF.  
                       
      ENDDO.                           

    WHEN 'DESELECT'.
      DO w_lines TIMES.
        READ LINE sy-index FIELD VALUE w_check.
          checkbox = ' '.
          MODIFY LINE sy-index FIELD VALUE w_check FROM w_check.           
      ENDDO.       

    WHEN 'REFRESH'.
      DO w_lines TIMES.
        READ LINE sy-index FIELD VALUE w_check.

        IF w_check EQ 'X'.
          CLEAR checkbox.
          MODIFY LINE sy-index FIELD VALUE w_check FROM w_check.
        ENDIF.        
                
      ENDDO.                    
  ENDCASE.                             
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besrt regards,&lt;/P&gt;&lt;P&gt;raam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 02:59:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-user-command/m-p/4011234#M958351</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T02:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Re: user-command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-user-command/m-p/4011235#M958352</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;try the below code in AT USER-COMMAND Event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT USER-COMMAND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case Sy-ucomm.&lt;/P&gt;&lt;P&gt;when 'SELECTALL'.&lt;/P&gt;&lt;P&gt;loop at itab into wa.&lt;/P&gt;&lt;P&gt;wa-chkbox = 'X'.&lt;/P&gt;&lt;P&gt;modify itab from wa.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When 'DESELECTALL'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa.&lt;/P&gt;&lt;P&gt;wa-chkbox = space.&lt;/P&gt;&lt;P&gt;modify itab from wa.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When 'REFRESH'.&lt;/P&gt;&lt;P&gt;Rebuild the internal table.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;chkbox is the char field of length 1 for checkbox&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Reward if found helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Boobalan Suburaj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 03:03:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-user-command/m-p/4011235#M958352</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T03:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Re: user-command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-user-command/m-p/4011236#M958353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Moni, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this simple LOOP (at the event AT USER-COMMAND): &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS: &amp;lt;fs&amp;gt; type itab. 

LOOP AT itab ASSIGNING &amp;lt;fs&amp;gt;. 
  IF sy-ucomm = 'SELECTALL'. 
    &amp;lt;fs&amp;gt;-checkbox = 'X'. 
  ELSEIF sy-ucomm = 'DESELECT'. 
    CLEAR: &amp;lt;fs&amp;gt;-checkbox.          checkbox = ' '. 
  ELSEIF sy-ucomm = 'REFRESH'. 
    &amp;lt;fs&amp;gt;-checkbox = &amp;lt;default&amp;gt;.   " set your default value (either X or space) 
  ENDIF. 
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the ASSIGN clause you have NOT to MODIFY your itab table! Because &amp;lt;fs&amp;gt; points directly to the current line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it and have success, &lt;/P&gt;&lt;P&gt;Heinz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 15:36:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-user-command/m-p/4011236#M958353</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T15:36:09Z</dc:date>
    </item>
  </channel>
</rss>

