<?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 output screen basic list buttons in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/output-screen-basic-list-buttons/m-p/2951281#M695965</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi frnds,&lt;/P&gt;&lt;P&gt;               what are the steps to create buttons in the application toolbar in our output screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like i m getting sales header data in my basic list so in the output i m having a button which i press then i will get sales item details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so can anyone help me how to create that button there in the ouput screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sanjay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Oct 2007 05:28:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-12T05:28:22Z</dc:date>
    <item>
      <title>output screen basic list buttons</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/output-screen-basic-list-buttons/m-p/2951281#M695965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi frnds,&lt;/P&gt;&lt;P&gt;               what are the steps to create buttons in the application toolbar in our output screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like i m getting sales header data in my basic list so in the output i m having a button which i press then i will get sales item details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so can anyone help me how to create that button there in the ouput screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sanjay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2007 05:28:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/output-screen-basic-list-buttons/m-p/2951281#M695965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-12T05:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: output screen basic list buttons</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/output-screen-basic-list-buttons/m-p/2951282#M695966</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;You can copy the GUI STATUS  STANDARD of the program SAPLKKBL in SE41 and create a new one..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in that add a button in the application toolbar section..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use call back pf status parameter to pass the subroutine to display the gui status..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use call back subroutine parameter in the alv function module to give the subroutine name..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this example for using double click to get the item details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPE-POOLS: slis.
DATA: BEGIN OF itab1 OCCURS 0,
        vbeln TYPE vbeln,
        bstnk TYPE vbak-bstnk,
        erdat TYPE vbak-erdat,
        kunnr TYPE vbak-kunnr,
      END OF itab1.

DATA: BEGIN OF itab2 OCCURS 0,
        vbeln  TYPE vbeln,
        matnr  TYPE vbap-matnr,
        netpr  TYPE vbap-netpr,
        kwmeng TYPE vbap-kwmeng,
      END OF itab2.


DATA: t_fieldcatalog1 TYPE slis_t_fieldcat_alv.
DATA: t_fieldcatalog2 TYPE slis_t_fieldcat_alv.
DATA: v_repid         TYPE syrepid.


v_repid = sy-repid.

* Get the fieldcatalog1
PERFORM get_fieldcat1.

* Get the fieldcatalog2
PERFORM get_fieldcat2.


SELECT vbeln bstnk erdat kunnr UP TO 10 ROWS
       INTO TABLE itab1
       FROM vbak.

IF NOT itab1[] IS INITIAL.
  SELECT vbeln matnr netpr kwmeng UP TO 10 ROWS
         INTO TABLE itab2
         FROM vbap
         FOR ALL ENTRIES IN itab1
         WHERE vbeln = itab1-vbeln.

ENDIF.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
     EXPORTING
          i_callback_program      = v_repid
          i_callback_user_command = 'DISPLAY_DETAIL'
          it_fieldcat             = t_fieldcatalog1
     TABLES
          t_outtab                = itab1.

*---------------------------------------------------------------------*
*       FORM display_detail                                           *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
*  --&amp;gt;  UCOMM                                                         *
*  --&amp;gt;  SELFIELD                                                      *
*---------------------------------------------------------------------*
FORM display_detail USING ucomm LIKE sy-ucomm
                        selfield TYPE slis_selfield.

  DATA: itab2_temp LIKE itab2 OCCURS 0 WITH HEADER LINE.

  IF ucomm = '&amp;amp;IC1'.

    READ TABLE itab1 INDEX selfield-tabindex.

    IF sy-subrc = 0.

      LOOP AT itab2 WHERE vbeln = itab1-vbeln.
        MOVE itab2 TO itab2_temp.
        APPEND itab2_temp.
      ENDLOOP.

      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                i_callback_program = v_repid
                it_fieldcat        = t_fieldcatalog2
           TABLES
                t_outtab           = itab2_temp.

    ENDIF.

  ENDIF.

ENDFORM.

*---------------------------------------------------------------------*
*       FORM GET_FIELDCAT1                                            *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
FORM get_fieldcat1.

  DATA: s_fieldcatalog TYPE slis_fieldcat_alv.

  s_fieldcatalog-col_pos = '1'.
  s_fieldcatalog-fieldname = 'VBELN'.
  s_fieldcatalog-tabname   = 'ITAB1'.
  s_fieldcatalog-rollname  = 'VBELN'.
  s_fieldcatalog-hotspot   = 'X'.
  APPEND s_fieldcatalog TO t_fieldcatalog1.
  CLEAR s_fieldcatalog.

  s_fieldcatalog-col_pos = '2'.
  s_fieldcatalog-fieldname = 'BSTNK'.
  s_fieldcatalog-tabname   = 'ITAB1'.
  s_fieldcatalog-rollname  = 'BSTNK'.
  APPEND s_fieldcatalog TO t_fieldcatalog1.
  CLEAR s_fieldcatalog.

  s_fieldcatalog-col_pos = '3'.
  s_fieldcatalog-fieldname = 'ERDAT'.
  s_fieldcatalog-tabname   = 'ITAB1'.
  s_fieldcatalog-rollname  = 'ERDAT'.
  APPEND s_fieldcatalog TO t_fieldcatalog1.
  CLEAR s_fieldcatalog.

  s_fieldcatalog-col_pos = '4'.
  s_fieldcatalog-fieldname = 'KUNNR'.
  s_fieldcatalog-tabname   = 'ITAB1'.
  s_fieldcatalog-rollname  = 'KUNNR'.
  APPEND s_fieldcatalog TO t_fieldcatalog1.
  CLEAR s_fieldcatalog.

ENDFORM.
*
*---------------------------------------------------------------------*
*       FORM GET_FIELDCAT2                                            *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
FORM get_fieldcat2.

  DATA: s_fieldcatalog TYPE slis_fieldcat_alv.

  s_fieldcatalog-col_pos = '1'.
  s_fieldcatalog-fieldname = 'VBELN'.
  s_fieldcatalog-tabname   = 'ITAB2'.
  s_fieldcatalog-rollname  = 'VBELN'.
  APPEND s_fieldcatalog TO t_fieldcatalog2.
  CLEAR s_fieldcatalog.

  s_fieldcatalog-col_pos = '2'.
  s_fieldcatalog-fieldname = 'MATNR'.
  s_fieldcatalog-tabname   = 'ITAB2'.
  s_fieldcatalog-rollname  = 'MATNR'.
  APPEND s_fieldcatalog TO t_fieldcatalog2.
  CLEAR s_fieldcatalog.

  s_fieldcatalog-col_pos = '3'.
  s_fieldcatalog-fieldname = 'NETPR'.
  s_fieldcatalog-tabname   = 'ITAB2'.
  s_fieldcatalog-rollname  = 'NETPR'.
  APPEND s_fieldcatalog TO t_fieldcatalog2.
  CLEAR s_fieldcatalog.

  s_fieldcatalog-col_pos = '4'.
  s_fieldcatalog-fieldname = 'KWMENG'.
  s_fieldcatalog-tabname   = 'ITAB2'.
  s_fieldcatalog-rollname  = 'KWMENG'.
  APPEND s_fieldcatalog TO t_fieldcatalog2.
  CLEAR s_fieldcatalog.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2007 05:32:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/output-screen-basic-list-buttons/m-p/2951282#M695966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-12T05:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: output screen basic list buttons</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/output-screen-basic-list-buttons/m-p/2951283#M695967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Create GUI STATUS &lt;/P&gt;&lt;P&gt;using SET PF-STATUS 'AAA' from SE41 and use it in the Program&lt;/P&gt;&lt;P&gt;create button in the application tool bar withsome icon and text and give some Function code&lt;/P&gt;&lt;P&gt;and use the field SY-UCOMM to handle that Fcode&lt;/P&gt;&lt;P&gt;And write the code accordingly.&lt;/P&gt;&lt;P&gt;Case SY-Ucomm.&lt;/P&gt;&lt;P&gt;when 'DISP'&lt;/P&gt;&lt;P&gt;...fetch and display the data&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;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2007 05:34:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/output-screen-basic-list-buttons/m-p/2951283#M695967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-12T05:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: output screen basic list buttons</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/output-screen-basic-list-buttons/m-p/2951284#M695968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zsiva_test &lt;/P&gt;&lt;P&gt;MESSAGE-ID zprecot. &lt;/P&gt;&lt;P&gt;TABLES : afru. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF ty_test, &lt;/P&gt;&lt;P&gt;        ism01 LIKE afru-ism01, &lt;/P&gt;&lt;P&gt;        END OF ty_test. &lt;/P&gt;&lt;P&gt;TABLES sscrfields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.  &lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : so_werks FOR afru-werks.  &lt;/P&gt;&lt;P&gt;SELECTION-SCREEN PUSHBUTTON /79(10) charly USER-COMMAND abcd.  &lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION. &lt;/P&gt;&lt;P&gt;  MOVE 'Press' TO charly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION. &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN. &lt;/P&gt;&lt;P&gt;  IF sscrfields-ucomm = 'ABCD'. &lt;/P&gt;&lt;P&gt;    MESSAGE i000 WITH so_werks-low 'Success' . &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward point if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2007 05:36:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/output-screen-basic-list-buttons/m-p/2951284#M695968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-12T05:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: output screen basic list buttons</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/output-screen-basic-list-buttons/m-p/2951285#M695969</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;1. In your program find the SET PF-STATUS [Under PBO].  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Then give any name to it and doble click.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Fro that screen you can design your own menu and assign the function code for each Buttons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Then write the code under PAI like,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case sy-ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when 'new'.    -&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;&amp;gt; Here new is the Fun.code assinged in menu painter.&lt;/P&gt;&lt;P&gt;call screen 100.&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;Thanks,&lt;/P&gt;&lt;P&gt;Reward If Helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2007 05:39:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/output-screen-basic-list-buttons/m-p/2951285#M695969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-12T05:39:51Z</dc:date>
    </item>
  </channel>
</rss>

