<?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: Create a custom program.. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-custom-program/m-p/2715524#M629744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just so happen to have a little example program showing that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

* Global ALV Data Declarations
type-pools: slis.

* Internal Tables
data: begin of itab occurs 0,
      matnr type mara-matnr,
      maktx type makt-maktx,
      end of itab.

start-of-selection.

  perform get_data.
  perform call_alv.

*********************************************************************
*      Form  GET_DATA
*********************************************************************
form get_data.

  select mara~matnr makt~maktx
          into corresponding fields of table itab
               from mara
                 inner join makt
                  on mara~matnr = makt~matnr
                             up to 20 rows.

endform.

************************************************************************
*  CALL_ALV
************************************************************************
form call_alv.

  data: ifc type slis_t_fieldcat_alv.
  data: xfc type slis_fieldcat_alv.
  data: repid type sy-repid.

  repid = sy-repid.

  clear xfc. refresh ifc.

  clear xfc.
  xfc-reptext_ddic = 'Material Number'.
  xfc-fieldname    = 'MATNR'.
  xfc-tabname      = 'ITAB'.
  xfc-outputlen    = '18'.
  append xfc to ifc.

  clear xfc.
  xfc-reptext_ddic = 'Material Description'.
  xfc-fieldname    = 'MAKTX'.
  xfc-tabname      = 'ITAB'.
  xfc-outputlen    = '40'.
  append xfc to ifc.

* Call ABAP List Viewer (ALV)
  call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program      = repid
            i_callback_user_command = 'HANDLE_USER_COMMAND'
            it_fieldcat             = ifc
       tables
            t_outtab                = itab.

endform.

***********************************************************************
*       FORM handle_User_Command                                      *
***********************************************************************
form handle_user_command using r_ucomm     like sy-ucomm
                               rs_selfield type slis_selfield.

  case r_ucomm.
    when '&amp;amp;IC1'.
      case rs_selfield-fieldname.
        when 'MATNR'.
          set parameter id 'MAT' field rs_selfield-value.
          call transaction 'MM03' and skip first screen.
      endcase.
  endcase.

endform.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Aug 2007 19:45:34 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2007-08-14T19:45:34Z</dc:date>
    <item>
      <title>Create a custom program..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-custom-program/m-p/2715523#M629743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I have to create a ALV report which has a material number as a first field in the ALV and when click the material number i should call MM03 with the selected material number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  and cursor should be hotpot..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please give me soluction .. I new to R/3.. if possible coding will help me very useful..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; advance thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2007 19:41:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-custom-program/m-p/2715523#M629743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-14T19:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create a custom program..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-custom-program/m-p/2715524#M629744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just so happen to have a little example program showing that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

* Global ALV Data Declarations
type-pools: slis.

* Internal Tables
data: begin of itab occurs 0,
      matnr type mara-matnr,
      maktx type makt-maktx,
      end of itab.

start-of-selection.

  perform get_data.
  perform call_alv.

*********************************************************************
*      Form  GET_DATA
*********************************************************************
form get_data.

  select mara~matnr makt~maktx
          into corresponding fields of table itab
               from mara
                 inner join makt
                  on mara~matnr = makt~matnr
                             up to 20 rows.

endform.

************************************************************************
*  CALL_ALV
************************************************************************
form call_alv.

  data: ifc type slis_t_fieldcat_alv.
  data: xfc type slis_fieldcat_alv.
  data: repid type sy-repid.

  repid = sy-repid.

  clear xfc. refresh ifc.

  clear xfc.
  xfc-reptext_ddic = 'Material Number'.
  xfc-fieldname    = 'MATNR'.
  xfc-tabname      = 'ITAB'.
  xfc-outputlen    = '18'.
  append xfc to ifc.

  clear xfc.
  xfc-reptext_ddic = 'Material Description'.
  xfc-fieldname    = 'MAKTX'.
  xfc-tabname      = 'ITAB'.
  xfc-outputlen    = '40'.
  append xfc to ifc.

* Call ABAP List Viewer (ALV)
  call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program      = repid
            i_callback_user_command = 'HANDLE_USER_COMMAND'
            it_fieldcat             = ifc
       tables
            t_outtab                = itab.

endform.

***********************************************************************
*       FORM handle_User_Command                                      *
***********************************************************************
form handle_user_command using r_ucomm     like sy-ucomm
                               rs_selfield type slis_selfield.

  case r_ucomm.
    when '&amp;amp;IC1'.
      case rs_selfield-fieldname.
        when 'MATNR'.
          set parameter id 'MAT' field rs_selfield-value.
          call transaction 'MM03' and skip first screen.
      endcase.
  endcase.

endform.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2007 19:45:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-custom-program/m-p/2715524#M629744</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-08-14T19:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create a custom program..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-custom-program/m-p/2715525#M629745</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;  anyone knows how to skip the first screen in the vendor master display 'MK03' from the ALV report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I have vendor number the ALV report and when I click vendor # it should take mw to MK03 and skip the first screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2007 14:05:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-custom-program/m-p/2715525#M629745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-15T14:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create a custom program..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-custom-program/m-p/2715526#M629746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I have found a soluction by myself. Thanks for your greek help. Please help me furhter come..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2007 14:32:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-custom-program/m-p/2715526#M629746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-15T14:32:54Z</dc:date>
    </item>
  </channel>
</rss>

