<?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: interactive alv with checkbox in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv-with-checkbox/m-p/3305328#M791540</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Apr 2011 08:29:55 GMT</pubDate>
    <dc:creator>former_member841898</dc:creator>
    <dc:date>2011-04-15T08:29:55Z</dc:date>
    <item>
      <title>interactive alv with checkbox</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv-with-checkbox/m-p/3305325#M791537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;    can anybody pls send me code of alv with checkbox&lt;/P&gt;&lt;P&gt;    ( the code is required for practice only)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    requirement is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   on executing the report o/p will come in &lt;STRONG&gt;alv grid&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;   displaying material no(matnr) along with checkboxes.&lt;/P&gt;&lt;P&gt;   i can select more than 1 checkbox , then on pressing a     pushbutton the material description(makt-maktx) of&lt;/P&gt;&lt;P&gt;all the matnr selectied via checkbox is displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls send me the sample code.&lt;/P&gt;&lt;P&gt;pls use fm reuse_alv_grid_display&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and not list display&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;pankaj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Feb 2008 11:08:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv-with-checkbox/m-p/3305325#M791537</guid>
      <dc:creator>former_member841898</dc:creator>
      <dc:date>2008-02-02T11:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: interactive alv with checkbox</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv-with-checkbox/m-p/3305326#M791538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please See the program attach for your ready referance.&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;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Report ZAK_ALV&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZAK_ALV line-count 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: slis. "ALV Declarations&lt;/P&gt;&lt;P&gt;*Data Declaration&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------" /&gt;&lt;P&gt;TYPES: BEGIN OF t_ekko,&lt;/P&gt;&lt;P&gt;ck type c,&lt;/P&gt;&lt;P&gt;ebeln TYPE ekpo-ebeln,&lt;/P&gt;&lt;P&gt;ebelp TYPE ekpo-ebelp,&lt;/P&gt;&lt;P&gt;statu TYPE ekpo-statu,&lt;/P&gt;&lt;P&gt;aedat TYPE ekpo-aedat,&lt;/P&gt;&lt;P&gt;matnr TYPE ekpo-matnr,&lt;/P&gt;&lt;P&gt;menge TYPE ekpo-menge,&lt;/P&gt;&lt;P&gt;meins TYPE ekpo-meins,&lt;/P&gt;&lt;P&gt;netpr TYPE ekpo-netpr,&lt;/P&gt;&lt;P&gt;peinh TYPE ekpo-peinh,&lt;/P&gt;&lt;P&gt;END OF t_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;wa_ekko TYPE t_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*ALV data declarations&lt;/P&gt;&lt;P&gt;data: fieldcatalog type slis_t_fieldcat_alv with header line,&lt;/P&gt;&lt;P&gt;gd_tab_group type slis_t_sp_group_alv,&lt;/P&gt;&lt;P&gt;gd_layout type slis_layout_alv,&lt;/P&gt;&lt;P&gt;gd_repid like sy-repid,&lt;/P&gt;&lt;P&gt;gt_events type slis_t_event,&lt;/P&gt;&lt;P&gt;gd_prntparams type slis_print_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*Start-of-selection.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform data_retrieval.&lt;/P&gt;&lt;P&gt;perform build_fieldcatalog.&lt;/P&gt;&lt;P&gt;perform build_layout.&lt;/P&gt;&lt;P&gt;perform build_events.&lt;/P&gt;&lt;P&gt;perform build_print_params.&lt;/P&gt;&lt;P&gt;perform display_alv_report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form BUILD_FIELDCATALOG&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Build Fieldcatalog for ALV Report &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;form build_fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a number of ways to create a fieldcat. &lt;/P&gt;&lt;P&gt;For the purpose of this example i will build the fieldcatalog manualy &lt;/P&gt;&lt;P&gt;by populating the internal table fields individually and then &lt;/P&gt;&lt;P&gt;appending the rows. This method can be the most time consuming but can &lt;/P&gt;&lt;P&gt;also allow you more control of the final product. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beware though, you need to ensure that all fields required are &lt;/P&gt;&lt;P&gt;populated. When using some of functionality available via ALV, such as &lt;/P&gt;&lt;P&gt;total. You may need to provide more information than if you were &lt;/P&gt;&lt;P&gt;simply displaying the result &lt;/P&gt;&lt;P&gt;I.e. Field type may be required in-order for &lt;/P&gt;&lt;P&gt;the 'TOTAL' function to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'CK'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'CHECKM BOX'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 0.&lt;/P&gt;&lt;P&gt;fieldcatalog-outputlen = 10.&lt;/P&gt;&lt;P&gt;fieldcatalog-CHECKBOX = 'X'.&lt;/P&gt;&lt;P&gt;fieldcatalog-EDIT = 'X'.&lt;/P&gt;&lt;P&gt;fieldcatalog-key = ''.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'EBELN'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'Purchase Order'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 0.&lt;/P&gt;&lt;P&gt;fieldcatalog-outputlen = 10.&lt;/P&gt;&lt;P&gt;fieldcatalog-emphasize = 'X'.&lt;/P&gt;&lt;P&gt;fieldcatalog-key = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-no_zero = 'X'. &lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'EBELP'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'PO Item'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-checkbox = 'X'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'STATU'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'Status'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 2.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'AEDAT'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'Item change date'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 3.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'Material Number'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 4.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'MENGE'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'PO quantity'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 5.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'MEINS'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'Order Unit'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 6.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'NETPR'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'Net Price'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 7.&lt;/P&gt;&lt;P&gt;fieldcatalog-outputlen = 15.&lt;/P&gt;&lt;P&gt;fieldcatalog-do_sum = 'X'.&lt;/P&gt;&lt;P&gt;fieldcatalog-datatype = 'CURR'.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldcatalog-fieldname = 'PEINH'.&lt;/P&gt;&lt;P&gt;fieldcatalog-seltext_m = 'Price Unit'.&lt;/P&gt;&lt;P&gt;fieldcatalog-col_pos = 8.&lt;/P&gt;&lt;P&gt;append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;clear fieldcatalog.&lt;/P&gt;&lt;P&gt;endform. " BUILD_FIELDCATALOG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form BUILD_LAYOUT&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Build layout for ALV grid report &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;form build_layout.&lt;/P&gt;&lt;P&gt;gd_layout-no_input = 'X'.&lt;/P&gt;&lt;P&gt;gd_layout-colwidth_optimize = 'X'.&lt;/P&gt;&lt;P&gt;gd_layout-totals_text = 'Totals'(201).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gd_layout-totals_only = 'X'. &lt;/P&gt;&lt;P&gt;gd_layout-f2code = 'DISP'. "Sets fcode for when double &lt;/P&gt;&lt;P&gt;"click(press f2) &lt;/P&gt;&lt;P&gt;gd_layout-zebra = 'X'. &lt;/P&gt;&lt;P&gt;gd_layout-group_change_edit = 'X'. &lt;/P&gt;&lt;P&gt;gd_layout-header_text = 'helllllo'. &lt;/P&gt;&lt;P&gt;endform. " BUILD_LAYOUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form DISPLAY_ALV_REPORT&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Display report using ALV grid &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;form display_alv_report.&lt;/P&gt;&lt;P&gt;gd_repid = sy-repid.&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 = gd_repid&lt;/P&gt;&lt;P&gt;i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM&lt;/P&gt;&lt;P&gt;i_callback_user_command = 'USER_COMMAND'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_grid_title = outtext &lt;/P&gt;&lt;P&gt;is_layout = gd_layout&lt;/P&gt;&lt;P&gt;it_fieldcat = fieldcatalog[]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_special_groups = gd_tabgroup &lt;/P&gt;&lt;P&gt;it_events = gt_events&lt;/P&gt;&lt;P&gt;is_print = gd_prntparams&lt;/P&gt;&lt;P&gt;i_save = 'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_variant = z_template &lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;t_outtab = it_ekko&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;program_error = 1&lt;/P&gt;&lt;P&gt;others = 2.&lt;/P&gt;&lt;P&gt;if sy-subrc 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO &lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. &lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endform. " DISPLAY_ALV_REPORT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form DATA_RETRIEVAL&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Retrieve data form EKPO table and populate itab it_ekko &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;form data_retrieval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln ebelp statu aedat matnr menge meins netpr peinh&lt;/P&gt;&lt;P&gt;up to 100 rows&lt;/P&gt;&lt;P&gt;from ekpo&lt;/P&gt;&lt;P&gt;into CORRESPONDING FIELDS OF table it_ekko.&lt;/P&gt;&lt;P&gt;endform. " DATA_RETRIEVAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Form TOP-OF-PAGE * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV Report Header * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------------" /&gt;&lt;P&gt;Form top-of-page.&lt;/P&gt;&lt;P&gt;*ALV Header declarations&lt;/P&gt;&lt;P&gt;data: t_header type slis_t_listheader,&lt;/P&gt;&lt;P&gt;wa_header type slis_listheader,&lt;/P&gt;&lt;P&gt;t_line like wa_header-info,&lt;/P&gt;&lt;P&gt;ld_lines type i,&lt;/P&gt;&lt;P&gt;ld_linesc(10) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Title &lt;/P&gt;&lt;P&gt;wa_header-typ = 'H'.&lt;/P&gt;&lt;P&gt;wa_header-info = 'EKKO Table Report'.&lt;/P&gt;&lt;P&gt;append wa_header to t_header.&lt;/P&gt;&lt;P&gt;clear wa_header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date &lt;/P&gt;&lt;P&gt;wa_header-typ = 'S'.&lt;/P&gt;&lt;P&gt;wa_header-key = 'Date: '.&lt;/P&gt;&lt;P&gt;CONCATENATE sy-datum+6(2) '.'&lt;/P&gt;&lt;P&gt;sy-datum+4(2) '.'&lt;/P&gt;&lt;P&gt;sy-datum(4) INTO wa_header-info. "todays date&lt;/P&gt;&lt;P&gt;append wa_header to t_header.&lt;/P&gt;&lt;P&gt;clear: wa_header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Total No. of Records Selected &lt;/P&gt;&lt;P&gt;describe table it_ekko lines ld_lines.&lt;/P&gt;&lt;P&gt;ld_linesc = ld_lines.&lt;/P&gt;&lt;P&gt;concatenate 'Total No. of Records Selected: ' ld_linesc&lt;/P&gt;&lt;P&gt;into t_line separated by space.&lt;/P&gt;&lt;P&gt;wa_header-typ = 'A'.&lt;/P&gt;&lt;P&gt;wa_header-info = t_line.&lt;/P&gt;&lt;P&gt;append wa_header to t_header.&lt;/P&gt;&lt;P&gt;clear: wa_header, t_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_COMMENTARY_WRITE'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;it_list_commentary = t_header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_logo = 'Z_LOGO'. &lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM USER_COMMAND * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; R_UCOMM * &lt;/P&gt;&lt;P&gt;--&amp;gt; RS_SELFIELD * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;FORM user_command USING r_ucomm LIKE sy-ucomm&lt;/P&gt;&lt;P&gt;rs_selfield TYPE slis_selfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check function code &lt;/P&gt;&lt;P&gt;CASE r_ucomm.&lt;/P&gt;&lt;P&gt;WHEN '&amp;amp;IC1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check field clicked on within ALVgrid report &lt;/P&gt;&lt;P&gt;IF rs_selfield-fieldname = 'EBELN'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read data table, using index of row user clicked on &lt;/P&gt;&lt;P&gt;READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set parameter ID for transaction screen field &lt;/P&gt;&lt;P&gt;SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sxecute transaction ME23N, and skip initial data entry screen &lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.&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;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form BUILD_EVENTS&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Build events table &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;form build_events.&lt;/P&gt;&lt;P&gt;data: ls_event type slis_alv_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_EVENTS_GET'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;i_list_type = 0&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;et_events = gt_events[].&lt;/P&gt;&lt;P&gt;read table gt_events with key name = slis_ev_end_of_page&lt;/P&gt;&lt;P&gt;into ls_event.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;move 'END_OF_PAGE' to ls_event-form.&lt;/P&gt;&lt;P&gt;append ls_event to gt_events.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table gt_events with key name = slis_ev_end_of_list&lt;/P&gt;&lt;P&gt;into ls_event.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;move 'END_OF_LIST' to ls_event-form.&lt;/P&gt;&lt;P&gt;append ls_event to gt_events.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endform. " BUILD_EVENTS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form BUILD_PRINT_PARAMS&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Setup print parameters &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;form build_print_params.&lt;/P&gt;&lt;P&gt;gd_prntparams-reserve_lines = '3'. "Lines reserved for footer&lt;/P&gt;&lt;P&gt;gd_prntparams-no_coverpage = 'X'.&lt;/P&gt;&lt;P&gt;endform. " BUILD_PRINT_PARAMS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form END_OF_PAGE&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;form END_OF_PAGE.&lt;/P&gt;&lt;P&gt;data: listwidth type i,&lt;/P&gt;&lt;P&gt;ld_pagepos(10) type c,&lt;/P&gt;&lt;P&gt;ld_page(10) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: sy-uline(50).&lt;/P&gt;&lt;P&gt;skip.&lt;/P&gt;&lt;P&gt;write:/40 'Page:', sy-pagno .&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form END_OF_LIST&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;form END_OF_LIST.&lt;/P&gt;&lt;P&gt;data: listwidth type i,&lt;/P&gt;&lt;P&gt;ld_pagepos(10) type c,&lt;/P&gt;&lt;P&gt;ld_page(10) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;skip.&lt;/P&gt;&lt;P&gt;write:/40 'Page:', sy-pagno .&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Feb 2008 11:10:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv-with-checkbox/m-p/3305326#M791538</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-02T11:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: interactive alv with checkbox</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv-with-checkbox/m-p/3305327#M791539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;To display the Check box you must declare a variable of type &amp;#147;c&amp;#148; length 1.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Ex:-&lt;/P&gt;&lt;P&gt;               Data :begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;Box type c.&lt;/P&gt;&lt;P&gt;Include structure &amp;lt;database_name&amp;gt;.&lt;/P&gt;&lt;P&gt;Data ens of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In alv_layout  write this code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data : alv_layput type slis_layout_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   alv_layout-box_fieldname = 'BOX'.&lt;/P&gt;&lt;P&gt;You will get check box at output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in PF-STATUS  write the code to display the material description..&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;Prajwal K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Feb 2008 11:21:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv-with-checkbox/m-p/3305327#M791539</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-02T11:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: interactive alv with checkbox</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv-with-checkbox/m-p/3305328#M791540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 08:29:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv-with-checkbox/m-p/3305328#M791540</guid>
      <dc:creator>former_member841898</dc:creator>
      <dc:date>2011-04-15T08:29:55Z</dc:date>
    </item>
  </channel>
</rss>

