<?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 ALV user-command problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489588#M561821</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pushbutton is there on Appication Toolbar.&lt;/P&gt;&lt;P&gt;ALV has First Column as checkboxes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If user gonna click on that pushbutton it has to select all the checkboxes in eachrow of first column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where I need to connect this functionality inside the Subroutine 'USER_COMMAND'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jul 2007 13:00:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-19T13:00:57Z</dc:date>
    <item>
      <title>ALV user-command problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489588#M561821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pushbutton is there on Appication Toolbar.&lt;/P&gt;&lt;P&gt;ALV has First Column as checkboxes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If user gonna click on that pushbutton it has to select all the checkboxes in eachrow of first column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where I need to connect this functionality inside the Subroutine 'USER_COMMAND'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 13:00:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489588#M561821</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T13:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: ALV user-command problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489589#M561822</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;After pressing the push button&lt;/P&gt;&lt;P&gt;Modify the internal table value for the check box column with 'X' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you set the value as X it will automatically selects all the rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 13:04:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489589#M561822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T13:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: ALV user-command problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489590#M561823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't have to code this functionality... there is select all and deselect all button available and that will work with your field .. just fill following fields in layout streucture&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         box_fieldname type slis_fieldname, " fieldname for checkbox&lt;/P&gt;&lt;P&gt;         box_tabname type slis_tabname," tabname for checkbox&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 13:05:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489590#M561823</guid>
      <dc:creator>Pawan_Kesari</dc:creator>
      <dc:date>2007-07-19T13:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: ALV user-command problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489591#M561824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I layout give Checkbox&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt; CLEAR wa_fieldcat.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-col_pos    = '1'.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-fieldname  = 'FLAG'.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-tabname = 'T_OUTPUT'.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-seltext_l  = 'Flag'.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-Checkbox = 'X'.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-edit = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; wa_fieldcat-no_out = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  wa_fieldcat-outputlen  = '10'.&lt;/P&gt;&lt;P&gt;  APPEND wa_fieldcat TO t_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form user_command using r_ucomm type syucomm&lt;/P&gt;&lt;P&gt;                          ls_selfield type SLIS_SELFIELD.&lt;/P&gt;&lt;P&gt;                          Break-point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case r_ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when 'EXEC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Data: ref1 type ref to cl_gui_alv_grid.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          E_GRID = ref1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      call method ref1-&amp;gt;check_changed_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      loop at t_output where Flag = 'X'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 13:08:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489591#M561824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T13:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: ALV user-command problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489592#M561825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
    I_CALLBACK_PROGRAM                = W_REPID
    I_CALLBACK_PF_STATUS_SET          = 'PF_STATUS'
    I_CALLBACK_USER_COMMAND           = &amp;lt;b&amp;gt;'USER_COMMAND'&amp;lt;/b&amp;gt;


FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
                        P_SELFLD TYPE SLIS_SELFIELD.
  Data ref1 type ref to cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = ref1.
call method ref1-&amp;gt;check_changed_data

  CASE P_UCOMM.

     WHEN 'SELECTALL'.
           loop at itab.
               itab-check = 'X'.
               modify itab index sy-tabix.
            endif.
     ENDCASE.

    P_SELFLD-REFRESH = 'X'.

ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 13:12:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489592#M561825</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T13:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: ALV user-command problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489593#M561826</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 1. add one more field checkbox of length 1 to ur final internal tabel&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;2. in ur fieldcatalg add this line&lt;/P&gt;&lt;P&gt;    wa_fcat-fieldname = 'CHECKBOx'.&lt;/P&gt;&lt;P&gt;    wa_fcat-checkbox = 'X'.&lt;/P&gt;&lt;P&gt;    wa_fcat-outputlen = '1'.&lt;/P&gt;&lt;P&gt;    wa_fcat-col_pos = '1'.&lt;/P&gt;&lt;P&gt;    append wa_fcat to it_fcat.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;3.in ur layout , add this line&lt;/P&gt;&lt;P&gt;   wa_layout-box_fieldname = 'CHECKBOX'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;4.In th USER_COMMAND subroutine of ur REUSE_ALV_GRID_DISpLAy FM&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM&lt;/P&gt;&lt;P&gt;P_SELFLD TYPE SLIS_SELFIELD.&lt;/P&gt;&lt;P&gt;case p_ucomm.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Data ref1 type ref to cl_gui_alv_grid.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;E_GRID = ref1.&lt;/P&gt;&lt;P&gt;call method ref1-&amp;gt;check_changed_data&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;when 'SAVE'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;write ur code her&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;or fm ALV then follow this :&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPE-POOLS : slis.
 
 
*-------------- Data
 
DATA : BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE t001.
DATA : flag tyPE c,
END OF itab.
DATA : alvfc TYPE slis_t_fieldcat_alv.
DATA : alvly TYPE slis_layout_alv.
 
*--------- Select Data
 
SELECT * FROM t001 INTO TABLE itab.
 
 
*------- Field Catalogue
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
 
 
*---------------Display
alvly-box_fieldname = 'FLAG'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = alvfc
i_callback_program = sy-repid "&amp;lt;-------Important
i_callback_user_command = 'ITAB_USER_COMMAND' "&amp;lt;------ Important
is_layout = alvly
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
 
 
 
*-------------------------------------------------
* CALL BACK FORM
*-------------------------------------------------
 
FORM itab_user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
slis_selfield.
 
data : msg(100) type c.
 
LOOP AT itab.
if itab-flag = 'X'.
msg = sy-tabix.
condense msg.
concatenate itab-bukrs ' ' into msg
separated by space.
message msg type 'I'.
endif.
 
ENDLOOP.
 
ENDFORM. "ITAB_user_command

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or check this blog :&lt;/P&gt;&lt;P&gt;/people/community.user/blog/2007/01/10/displaychange-mode-of-editable-fields-in-alv-using-function-modules-but-not-custom-containers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward pts for usefull answer :)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sathish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 13:13:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489593#M561826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T13:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: ALV user-command problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489594#M561827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;P&gt;    I_CALLBACK_PROGRAM                =  repid&lt;/P&gt;&lt;P&gt;    I_CALLBACK_PF_STATUS_SET          = 'pf-status'&lt;/P&gt;&lt;P&gt;    I_CALLBACK_USER_COMMAND           = 'user_command'&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM&lt;/P&gt;&lt;P&gt;                        P_SELFLD TYPE SLIS_SELFIELD.&lt;/P&gt;&lt;P&gt; Data sel1 type ref to cl_gui_alv_grid.&lt;/P&gt;&lt;P&gt; call method sel1-&amp;gt;check_changed_data&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  CASE sy-ucomm.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;     WHEN '&amp;amp;SEL'.&lt;/P&gt;&lt;P&gt;           loop at itab.&lt;/P&gt;&lt;P&gt;               itab-check = 'X'.&lt;/P&gt;&lt;P&gt;               modify itab index sy-tabix.&lt;/P&gt;&lt;P&gt;            endif.&lt;/P&gt;&lt;P&gt;     ENDCASE.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 13:17:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489594#M561827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T13:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: ALV user-command problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489595#M561828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lucky,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is a functionality already available for that, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can give the &amp;lt;b&amp;gt;function code&amp;lt;/b&amp;gt; for the button as &amp;lt;b&amp;gt;&amp;amp;ALL&amp;lt;/b&amp;gt; to select all the checkboxes and&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;amp;SAL&amp;lt;/b&amp;gt; to deselect all the checkboxes in-order to gain ur functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if this helps,&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 13:23:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-user-command-problem/m-p/2489595#M561828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T13:23:13Z</dc:date>
    </item>
  </channel>
</rss>

