<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv/m-p/3613622#M870583</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Refer the following code: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT zdemoab.

TYPE-POOLS: slis.
TABLES: mara.

TYPES: BEGIN OF t_itab,
       matnr TYPE mara-matnr,
       mtart TYPE mara-mtart,
       END OF t_itab.

DATA: itab TYPE TABLE OF t_itab,
      wa_itab like line of itab.

DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
      wa_fieldcat LIKE LINE OF i_fieldcat,
      i_layout TYPE slis_layout_alv,
      g_repid TYPE sy-repid.


SELECT matnr mtart INTO TABLE itab FROM mara UP TO 10 ROWS.


CLEAR: wa_fieldcat.
wa_fieldcat-col_pos = 0.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-tabname = 'MARA'.
wa_fieldcat-hotspot = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR: wa_fieldcat.

wa_fieldcat-col_pos = 1.
wa_fieldcat-fieldname = 'MTART'.
wa_fieldcat-tabname = 'MARA'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR: wa_fieldcat.


i_layout-colwidth_optimize = 'X'.
i_layout-hotspot_fieldname = 'MATNR'.

g_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
 EXPORTING
   i_callback_program                = g_repid
   I_CALLBACK_USER_COMMAND           = 'USER_COMMAND '
   is_layout                         = i_layout
   it_fieldcat                       = i_fieldcat[]
  TABLES
    t_outtab                          = itab
 EXCEPTIONS
   program_error                     = 1
   OTHERS                            = 2
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

FORM user_command USING r_ucomm LIKE sy-ucomm
                        rs_selfield TYPE slis_selfield.

*   Check field clicked on within ALVgrid report
    IF rs_selfield-fieldname = 'MATNR'.
*     To pass the material no in ME22 transaction
      READ TABLE itab INTO wa_itab INDEX rs_selfield-tabindex.
*     Set parameter ID for transaction screen field
      SET PARAMETER ID 'BES' FIELD wa_itab-matnr.
*     Sxecute transaction ME23N, and skip initial data entry screen
      CALL TRANSACTION 'MM03'.
*
    ENDIF.
ENDFORM.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Apr 2008 13:54:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-02T13:54:28Z</dc:date>
    <item>
      <title>interactive alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv/m-p/3613620#M870581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hiii,&lt;/P&gt;&lt;P&gt;     i made a alv report which consist a coloum equipment no(EQUNR) , now what i want is when i double on a particular &lt;/P&gt;&lt;P&gt; equipment no it should be shifted to a IE02 of that particular &lt;/P&gt;&lt;P&gt;equipment no ,now it shifting to a one fixed equipment no,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;feedback, appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2008 13:43:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv/m-p/3613620#M870581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-02T13:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: interactive alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv/m-p/3613621#M870582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Upon double click, determine the equipment number. Pass this to the CALL TRANSACTION 'IE02' by setting the parameter SET PARAMETER ID 'XXX'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2008 13:52:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv/m-p/3613621#M870582</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-04-02T13:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: interactive alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv/m-p/3613622#M870583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Refer the following code: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT zdemoab.

TYPE-POOLS: slis.
TABLES: mara.

TYPES: BEGIN OF t_itab,
       matnr TYPE mara-matnr,
       mtart TYPE mara-mtart,
       END OF t_itab.

DATA: itab TYPE TABLE OF t_itab,
      wa_itab like line of itab.

DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
      wa_fieldcat LIKE LINE OF i_fieldcat,
      i_layout TYPE slis_layout_alv,
      g_repid TYPE sy-repid.


SELECT matnr mtart INTO TABLE itab FROM mara UP TO 10 ROWS.


CLEAR: wa_fieldcat.
wa_fieldcat-col_pos = 0.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-tabname = 'MARA'.
wa_fieldcat-hotspot = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR: wa_fieldcat.

wa_fieldcat-col_pos = 1.
wa_fieldcat-fieldname = 'MTART'.
wa_fieldcat-tabname = 'MARA'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR: wa_fieldcat.


i_layout-colwidth_optimize = 'X'.
i_layout-hotspot_fieldname = 'MATNR'.

g_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
 EXPORTING
   i_callback_program                = g_repid
   I_CALLBACK_USER_COMMAND           = 'USER_COMMAND '
   is_layout                         = i_layout
   it_fieldcat                       = i_fieldcat[]
  TABLES
    t_outtab                          = itab
 EXCEPTIONS
   program_error                     = 1
   OTHERS                            = 2
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

FORM user_command USING r_ucomm LIKE sy-ucomm
                        rs_selfield TYPE slis_selfield.

*   Check field clicked on within ALVgrid report
    IF rs_selfield-fieldname = 'MATNR'.
*     To pass the material no in ME22 transaction
      READ TABLE itab INTO wa_itab INDEX rs_selfield-tabindex.
*     Set parameter ID for transaction screen field
      SET PARAMETER ID 'BES' FIELD wa_itab-matnr.
*     Sxecute transaction ME23N, and skip initial data entry screen
      CALL TRANSACTION 'MM03'.
*
    ENDIF.
ENDFORM.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2008 13:54:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv/m-p/3613622#M870583</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-02T13:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: interactive alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv/m-p/3613623#M870584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;
Shamsher singh,
Follow these steps to get ur object done.
1.
USER_COMMAND call back subroutine should be like this in your case. This is nowhere called using PERFORM statement in ur program.
&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  user_command
*&amp;amp;---------------------------------------------------------------------*
form user_command using ucomm like sy-ucomm
                  selfield type slis_selfield.
  case ucomm .
    when '&amp;amp;IC1'. "This is for double click on ALV output.
     case selfield-sel_tab_field."It gives on which field double click was done.
       when 'ITAB-EQUNR'.
        SET PARAMETER ID 'EQN' FIELD selfield-value.
         "selfield-value contains the value of the field on which double click was done
        CALL TRANSACTION 'IE02' AND SKIP FIRST SCREEN.
        " It skips IE02 transaction initial screen and displays next screen.If you want to see IE02 first screen just remove AND SKIP FIRST SCREEN addition.
     endcase.
  endcase.
endform.                    "user_command&lt;/CODE&gt;&lt;/PRE&gt;
2.
Now pass USER_COMMAND callback subroutine through FM.
&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
  EXPORTING
    I_CALLBACK_PROGRAM      = l_program "Program name
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    IT_FIELDCAT             = i_field
    IT_SORT                 = i_sort
  TABLES
    T_OUTTAB                = i_tab
  EXCEPTIONS
    PROGRAM_ERROR           = 1
    OTHERS                  = 2.
IF SY-SUBRC &amp;lt;&amp;gt; 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;

I hope that you will get it.

&lt;STRONG&gt;Regards,&lt;/STRONG&gt;
&lt;STRONG&gt;Venkat.O&lt;/STRONG&gt;
&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2008 14:33:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interactive-alv/m-p/3613623#M870584</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2008-04-02T14:33:04Z</dc:date>
    </item>
  </channel>
</rss>

