<?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 User command cases.. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-cases/m-p/2900164#M681969</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;I have displayed the ALV report.&lt;/P&gt;&lt;P&gt;Now I want to create a single user command case so that if I double click on the record I go to transaction IW33. After going to IW33 when I click ob 'back' button it should come back to the ALV report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me how I can do this? Please post the lines of code if possible&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Oct 2007 05:43:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-10T05:43:20Z</dc:date>
    <item>
      <title>User command cases..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-cases/m-p/2900164#M681969</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;I have displayed the ALV report.&lt;/P&gt;&lt;P&gt;Now I want to create a single user command case so that if I double click on the record I go to transaction IW33. After going to IW33 when I click ob 'back' button it should come back to the ALV report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me how I can do this? Please post the lines of code if possible&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 05:43:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-cases/m-p/2900164#M681969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T05:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: User command cases..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-cases/m-p/2900165#M681970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Call this perform berfor u dispaly the ALV ie before REUSE_ALV_GRID_DISPLAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_eventcat TYPE slis_t_event.&lt;/P&gt;&lt;P&gt;DATA: wa_eventcat TYPE slis_alv_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM p_eventcat .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR wa_eventcat.&lt;/P&gt;&lt;P&gt;  REFRESH it_eventcat.&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       = it_eventcat&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      list_type_wrong = 1&lt;/P&gt;&lt;P&gt;      OTHERS          = 2.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE it_eventcat WITH KEY name = slis_ev_user_command INTO wa_eventcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    MOVE 'ZUCOMM' TO wa_eventcat-form.&lt;/P&gt;&lt;P&gt;    MODIFY it_eventcat FROM wa_eventcat INDEX sy-tabix TRANSPORTING form.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM zucomm USING  vcomm TYPE sy-ucomm&lt;/P&gt;&lt;P&gt;                   p_selfield TYPE slis_selfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  CASE vcomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 'PICK'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF p_selfield-fieldname = '&amp;lt;Field which is clicked&amp;gt;'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        READ TABLE it_final INTO wa_final WITH KEY vbeln =  p_selfield-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        SET PARAMETER ID '&amp;lt;get it from Technical help of that field F1 &amp;amp; F9&amp;gt;' FIELD wa_final-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CALL TRANSACTION 'IW33' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works.&lt;/P&gt;&lt;P&gt;Reward if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 05:50:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-cases/m-p/2900165#M681970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T05:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: User command cases..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-cases/m-p/2900166#M681971</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;try like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:t_eve 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             = eve&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LIST_TYPE_WRONG       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE eve INTO t_eve WITH KEY name = 'USER_COMMAND'.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    t_eve-form = 'USER_COMMAND'.&lt;/P&gt;&lt;P&gt;    MODIFY eve FROM t_eve TRANSPORTING form WHERE name = t_eve-name.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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                = 'ZINT_ALV'&lt;/P&gt;&lt;P&gt;  &amp;lt;b&amp;gt;   i_callback_user_command           = 'USER_COMMAND'&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;     i_grid_title                      = 'Interactive ALV'&lt;/P&gt;&lt;P&gt;     it_fieldcat                       = fcat&lt;/P&gt;&lt;P&gt;     it_events                         = eve&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      t_outtab                          = itab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROGRAM_ERROR                     = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                            = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt;FORM user_command USING u_com LIKE sy-ucomm sel_field TYPE slis_selfield.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;  CLEAR fcat1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE u_com.&lt;/P&gt;&lt;P&gt;    WHEN '&amp;amp;IC1'.&lt;/P&gt;&lt;P&gt;      READ TABLE itab INDEX sel_field-tabindex.&lt;/P&gt;&lt;P&gt;        IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;          t_mat = itab-matnr.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;     SET PARAMETER ID 'MAT' FIELD t_mat.&lt;/P&gt;&lt;P&gt;     CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;ENDFORM.                    "user_command&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here instead of &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt;SET PARAMETER ID 'MAT' FIELD t_mat.&lt;/P&gt;&lt;P&gt; CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to write,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt;SET PARAMETER ID 'ANR' FIELD t_mat.&lt;/P&gt;&lt;P&gt; CALL TRANSACTION 'IW33' AND SKIP FIRST SCREEN.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here in t_mat, take the order number on which cursor is placed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 12:08:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-cases/m-p/2900166#M681971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T12:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: User command cases..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-cases/m-p/2900167#M681972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepayan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try using,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LINE-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Getting The Field Name and value of the field selected by the user&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  GET CURSOR FIELD &amp;lt;fieldname&amp;gt; VALUE &amp;lt;fieldvalue&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in ur case field name will be order number as u will b clicking on the order number 2 go to the ) display order transaction IW33 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If the user double clicks on the material number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF &amp;lt;fieldname&amp;gt; = &amp;lt;Output field name of the order number field&amp;gt; AND NOT &amp;lt;fieldvalue&amp;gt; IS INITIAL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call the transaction to display Material Number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    SET PARAMETER ID  'ANR' FIELD &amp;lt;fieldvalue&amp;gt;.&lt;/P&gt;&lt;P&gt;    CALL TRANSACTION IW33 AND SKIP FIRST SCREEN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 12:21:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-cases/m-p/2900167#M681972</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T12:21:04Z</dc:date>
    </item>
  </channel>
</rss>

