<?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: ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4115876#M984024</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mahesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   The below code doesn't have check boxes in it but it is a dynamic ALV display with a popup..In this code there is a facility for multiple selection as well and you can try it by setting it to 'X' ..try various methods involving below code so that to suffice ur requirements.. hoping this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF t_heading,&lt;/P&gt;&lt;P&gt;        infotype(8),&lt;/P&gt;&lt;P&gt;        subtype(7),&lt;/P&gt;&lt;P&gt;        old_start_date(14),&lt;/P&gt;&lt;P&gt;        old_end_date(14),&lt;/P&gt;&lt;P&gt;        start_date(14),&lt;/P&gt;&lt;P&gt;        end_date(14).&lt;/P&gt;&lt;P&gt;DATA: END OF t_heading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table with the details of the employee&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: BEGIN OF t_details OCCURS 0,&lt;/P&gt;&lt;P&gt;        infotype       LIKE p0001-infty,&lt;/P&gt;&lt;P&gt;        subtype        LIKE p0001-subty,&lt;/P&gt;&lt;P&gt;        old_start_date(10),&lt;/P&gt;&lt;P&gt;        old_end_date(10),&lt;/P&gt;&lt;P&gt;        start_date(10),&lt;/P&gt;&lt;P&gt;        end_date(10).&lt;/P&gt;&lt;P&gt;DATA: END OF t_details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: title(70),&lt;/P&gt;&lt;P&gt;      w_funccode TYPE sy-xcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;title = 'Info: The following IT0014 records are delimited:'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  t_heading-infotype = 'INFOTYPE'.&lt;/P&gt;&lt;P&gt;  t_heading-subtype =  'SUBTYPE'.&lt;/P&gt;&lt;P&gt;  t_heading-old_start_date = 'OLD START DATE'.&lt;/P&gt;&lt;P&gt;  t_heading-old_end_date =  'OLD END DATE'.&lt;/P&gt;&lt;P&gt;  t_heading-start_date = 'NEW START DATE'.&lt;/P&gt;&lt;P&gt;  t_heading-end_date = 'NEW END DATE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  t_DETAILS-infotype = '0014'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-subtype =  '2200'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-old_start_date = '20.08.2006'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-old_end_date =  '31.12.9999'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-start_date = '20.08.2006'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-end_date = '20.08.2008'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append T_DETAILS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  t_DETAILS-infotype = '0014'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-subtype =  '2202'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-old_start_date = '15.07.2006'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-old_end_date =  '31.12.9999'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-start_date = '15.07.2006'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-end_date = '30.08.2008'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append T_DETAILS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call function for displaying a pop-up&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'G_DISPLAY_SELECTION_DYNPRO'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            allow_print       = ' '&lt;/P&gt;&lt;P&gt;            dynp_title        = title&lt;/P&gt;&lt;P&gt;            extended_display  = ' '&lt;/P&gt;&lt;P&gt;            first_index       = 1&lt;/P&gt;&lt;P&gt;            number_of_rows    = 30&lt;/P&gt;&lt;P&gt;            sel_title1        = t_heading&lt;/P&gt;&lt;P&gt;            show_also_1       = 'X'&lt;/P&gt;&lt;P&gt;            start_column      = 25&lt;/P&gt;&lt;P&gt;            start_row         = 14&lt;/P&gt;&lt;P&gt;            width_of_titles   = '1'&lt;/P&gt;&lt;P&gt;            WITHOUT_SELECTION = ' '&lt;/P&gt;&lt;P&gt;            allow_sort        = ' '&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            sel_table         = t_details&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            no_lines          = 1&lt;/P&gt;&lt;P&gt;            no_line_picked    = 2&lt;/P&gt;&lt;P&gt;            OTHERS            = 3.&lt;/P&gt;&lt;P&gt;   if SY-SUBRC EQ 0 .&lt;/P&gt;&lt;P&gt;      Move sy-xcode TO w_funccode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if w_funccode EQ 'GOON'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      delimit&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENdif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers, &lt;/P&gt;&lt;P&gt; Jacks M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jul 2008 11:20:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-08T11:20:29Z</dc:date>
    <item>
      <title>ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4115875#M984023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   I need to display some of the line numbers(item number) of purchase orders in a popup..Then i want to select using clicking the check box which want to come in frnt of the line numbers in tht window..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to do this..Can anyone give me a sample code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 10:44:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4115875#M984023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T10:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4115876#M984024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mahesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   The below code doesn't have check boxes in it but it is a dynamic ALV display with a popup..In this code there is a facility for multiple selection as well and you can try it by setting it to 'X' ..try various methods involving below code so that to suffice ur requirements.. hoping this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF t_heading,&lt;/P&gt;&lt;P&gt;        infotype(8),&lt;/P&gt;&lt;P&gt;        subtype(7),&lt;/P&gt;&lt;P&gt;        old_start_date(14),&lt;/P&gt;&lt;P&gt;        old_end_date(14),&lt;/P&gt;&lt;P&gt;        start_date(14),&lt;/P&gt;&lt;P&gt;        end_date(14).&lt;/P&gt;&lt;P&gt;DATA: END OF t_heading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table with the details of the employee&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: BEGIN OF t_details OCCURS 0,&lt;/P&gt;&lt;P&gt;        infotype       LIKE p0001-infty,&lt;/P&gt;&lt;P&gt;        subtype        LIKE p0001-subty,&lt;/P&gt;&lt;P&gt;        old_start_date(10),&lt;/P&gt;&lt;P&gt;        old_end_date(10),&lt;/P&gt;&lt;P&gt;        start_date(10),&lt;/P&gt;&lt;P&gt;        end_date(10).&lt;/P&gt;&lt;P&gt;DATA: END OF t_details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: title(70),&lt;/P&gt;&lt;P&gt;      w_funccode TYPE sy-xcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;title = 'Info: The following IT0014 records are delimited:'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  t_heading-infotype = 'INFOTYPE'.&lt;/P&gt;&lt;P&gt;  t_heading-subtype =  'SUBTYPE'.&lt;/P&gt;&lt;P&gt;  t_heading-old_start_date = 'OLD START DATE'.&lt;/P&gt;&lt;P&gt;  t_heading-old_end_date =  'OLD END DATE'.&lt;/P&gt;&lt;P&gt;  t_heading-start_date = 'NEW START DATE'.&lt;/P&gt;&lt;P&gt;  t_heading-end_date = 'NEW END DATE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  t_DETAILS-infotype = '0014'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-subtype =  '2200'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-old_start_date = '20.08.2006'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-old_end_date =  '31.12.9999'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-start_date = '20.08.2006'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-end_date = '20.08.2008'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append T_DETAILS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  t_DETAILS-infotype = '0014'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-subtype =  '2202'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-old_start_date = '15.07.2006'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-old_end_date =  '31.12.9999'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-start_date = '15.07.2006'.&lt;/P&gt;&lt;P&gt;  t_DETAILS-end_date = '30.08.2008'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append T_DETAILS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call function for displaying a pop-up&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'G_DISPLAY_SELECTION_DYNPRO'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            allow_print       = ' '&lt;/P&gt;&lt;P&gt;            dynp_title        = title&lt;/P&gt;&lt;P&gt;            extended_display  = ' '&lt;/P&gt;&lt;P&gt;            first_index       = 1&lt;/P&gt;&lt;P&gt;            number_of_rows    = 30&lt;/P&gt;&lt;P&gt;            sel_title1        = t_heading&lt;/P&gt;&lt;P&gt;            show_also_1       = 'X'&lt;/P&gt;&lt;P&gt;            start_column      = 25&lt;/P&gt;&lt;P&gt;            start_row         = 14&lt;/P&gt;&lt;P&gt;            width_of_titles   = '1'&lt;/P&gt;&lt;P&gt;            WITHOUT_SELECTION = ' '&lt;/P&gt;&lt;P&gt;            allow_sort        = ' '&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            sel_table         = t_details&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            no_lines          = 1&lt;/P&gt;&lt;P&gt;            no_line_picked    = 2&lt;/P&gt;&lt;P&gt;            OTHERS            = 3.&lt;/P&gt;&lt;P&gt;   if SY-SUBRC EQ 0 .&lt;/P&gt;&lt;P&gt;      Move sy-xcode TO w_funccode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if w_funccode EQ 'GOON'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      delimit&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENdif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers, &lt;/P&gt;&lt;P&gt; Jacks M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 11:20:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4115876#M984024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T11:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4115877#M984025</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;      Handle the CLICK EVENT on the Initial ALV Display, and hold the value and hit the data with that value and get the approprate data and display those values(data) to the POP UP ALV using the Function module - &lt;STRONG&gt;REUSE_ALV_POPUP_TO_SELECT&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      For code you can refer the standard program &lt;STRONG&gt;BCALV_GRID_AND_POPUP&lt;/STRONG&gt; (se38) for your requirement (for double click and navigation).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 11:23:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4115877#M984025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T11:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4115878#M984026</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;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ztest_alv_check MESSAGE-ID zz .

TYPE-POOLS: slis.
DATA: x_fieldcat TYPE slis_fieldcat_alv,
it_fieldcat TYPE slis_t_fieldcat_alv,
l_layout TYPE slis_layout_alv,
x_events TYPE slis_alv_event,
it_events TYPE slis_t_event.

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-input = 'X'.
x_fieldcat-edit = 'X'.
x_fieldcat-checkbox = 'X'.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.

x_fieldcat-fieldname = 'VBELN'.
x_fieldcat-seltext_l = '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-seltext_l = 'POSNR'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-col_pos = 3.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.


DATA selfield TYPE  slis_selfield.
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
  EXPORTING
    i_title                 = 'Select Data'
    i_selection             = 'X'
    i_zebra                 = 'X'
    i_screen_start_column   = 5
    i_screen_start_line     = 5
    i_screen_end_column     = 50
    i_screen_end_line       = 10
    i_checkbox_fieldname    = 'CHK'
    i_tabname               = 'ITAB'
    i_scroll_to_sel_line    = 'X'
    it_fieldcat             = it_fieldcat
    i_callback_program      = sy-repid
    i_callback_user_command = 'USER_COMMAND'
  IMPORTING
    es_selfield             = selfield
  TABLES
    t_outtab                = itab
  EXCEPTIONS
    program_error           = 1.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  STATUS
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;P_EXTAB    text
*----------------------------------------------------------------------*
FORM status USING p_extab TYPE slis_t_extab.

  SET PF-STATUS 'STATUS'.
ENDFORM. " STATUS

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  USER_COMMAND
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;R_UCOMM      text
*      --&amp;gt;RS_SELFIELD  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.

  LOOP AT itab WHERE chk = 'X'.
    itab-color = 'C300'.
    MODIFY itab INDEX sy-tabix TRANSPORTING color.
  ENDLOOP.
  rs_selfield-refresh = 'X'.
  BREAK-POINT.

ENDFORM. "USER_COMMAND&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 11:30:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4115878#M984026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T11:30:22Z</dc:date>
    </item>
  </channel>
</rss>

