<?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: Problem using Checkbox Column in OOALV Report in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-checkbox-column-in-ooalv-report/m-p/4288125#M1022914</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this Sample code.&lt;/P&gt;&lt;P&gt;calling the Function in the user command will help you in getting the updated values to interanl table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'GET_GLOBALS_FROM_SLVC_FULLSCR'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ztest_lvc_fm.
 
TYPE-POOLS: slis.
 
DATA: x_fieldcat TYPE lvc_s_fcat,
it_fieldcat TYPE lvc_t_fcat.
 
 
DATA: BEGIN OF itab OCCURS 0,
vbeln LIKE vbak-vbeln,
posnr LIKE vbap-posnr,
chk(1),
color(4),
END OF itab.
 
SELECT vbeln
posnr
FROM vbap
UP TO 20 ROWS
INTO TABLE itab.
 
x_fieldcat-fieldname = 'CHK'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-col_pos = 1.
x_fieldcat-edit = 'X'.
x_fieldcat-checkbox = 'X'.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
 
x_fieldcat-fieldname = 'VBELN'.
x_fieldcat-coltext = 'VBELN'.
x_fieldcat-hotspot = 'X'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-col_pos = 2.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
 
x_fieldcat-fieldname = 'POSNR'.
x_fieldcat-coltext = 'POSNR'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-edit = 'X'.
x_fieldcat-col_pos = 3.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
 
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
  EXPORTING
    i_callback_program      = sy-repid
    i_callback_user_command = 'USER_COMMAND'
    it_fieldcat_lvc         = it_fieldcat
  TABLES
    t_outtab                = itab
  EXCEPTIONS
    program_error           = 1
    OTHERS                  = 2.
IF sy-subrc  0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  USER_COMMAND
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
 
  DATA: gd_repid LIKE sy-repid, "Exists
  ref_grid TYPE REF TO cl_gui_alv_grid.
  IF ref_grid IS INITIAL.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
      IMPORTING
        e_grid = ref_grid.
  ENDIF.
  IF NOT ref_grid IS INITIAL.
    CALL METHOD ref_grid-&amp;gt;check_changed_data .
  ENDIF.
 
  "now check the entries in ALV table
  BREAK-POINT.
 
ENDFORM. "USER_COMMAND&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vijay Babu Dudla&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Aug 2008 14:19:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-13T14:19:55Z</dc:date>
    <item>
      <title>Problem using Checkbox Column in OOALV Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-checkbox-column-in-ooalv-report/m-p/4288123#M1022912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a query in a report in which I am using OOALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Internal table contains a field with CHECKBOX and I am using the method REUSE_ALV_GRID_DISPLAY_LVC for displaying the Grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am facing is the value of the CHECK column which is bound to Checkbox doesn't get populated in the  Internal Table whether the Checkbox is Checked or Unchecked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CHECK Column remains blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me out on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;removed by moderator&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mike Pokraka on Aug 13, 2008 3:09 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 13:44:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-checkbox-column-in-ooalv-report/m-p/4288123#M1022912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T13:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using Checkbox Column in OOALV Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-checkbox-column-in-ooalv-report/m-p/4288124#M1022913</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;Hope that your ALV doesnt recieve the event click on the check box. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to update the internal table whenever a chekc box is checked. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can refer to the standard program BCALV_EDIT_05&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 14:08:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-checkbox-column-in-ooalv-report/m-p/4288124#M1022913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T14:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using Checkbox Column in OOALV Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-checkbox-column-in-ooalv-report/m-p/4288125#M1022914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this Sample code.&lt;/P&gt;&lt;P&gt;calling the Function in the user command will help you in getting the updated values to interanl table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'GET_GLOBALS_FROM_SLVC_FULLSCR'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ztest_lvc_fm.
 
TYPE-POOLS: slis.
 
DATA: x_fieldcat TYPE lvc_s_fcat,
it_fieldcat TYPE lvc_t_fcat.
 
 
DATA: BEGIN OF itab OCCURS 0,
vbeln LIKE vbak-vbeln,
posnr LIKE vbap-posnr,
chk(1),
color(4),
END OF itab.
 
SELECT vbeln
posnr
FROM vbap
UP TO 20 ROWS
INTO TABLE itab.
 
x_fieldcat-fieldname = 'CHK'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-col_pos = 1.
x_fieldcat-edit = 'X'.
x_fieldcat-checkbox = 'X'.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
 
x_fieldcat-fieldname = 'VBELN'.
x_fieldcat-coltext = 'VBELN'.
x_fieldcat-hotspot = 'X'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-col_pos = 2.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
 
x_fieldcat-fieldname = 'POSNR'.
x_fieldcat-coltext = 'POSNR'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-edit = 'X'.
x_fieldcat-col_pos = 3.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
 
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
  EXPORTING
    i_callback_program      = sy-repid
    i_callback_user_command = 'USER_COMMAND'
    it_fieldcat_lvc         = it_fieldcat
  TABLES
    t_outtab                = itab
  EXCEPTIONS
    program_error           = 1
    OTHERS                  = 2.
IF sy-subrc  0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  USER_COMMAND
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
 
  DATA: gd_repid LIKE sy-repid, "Exists
  ref_grid TYPE REF TO cl_gui_alv_grid.
  IF ref_grid IS INITIAL.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
      IMPORTING
        e_grid = ref_grid.
  ENDIF.
  IF NOT ref_grid IS INITIAL.
    CALL METHOD ref_grid-&amp;gt;check_changed_data .
  ENDIF.
 
  "now check the entries in ALV table
  BREAK-POINT.
 
ENDFORM. "USER_COMMAND&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vijay Babu Dudla&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 14:19:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-checkbox-column-in-ooalv-report/m-p/4288125#M1022914</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T14:19:55Z</dc:date>
    </item>
  </channel>
</rss>

