<?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: while doing alvs how to connect module pool program to se38 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/while-doing-alvs-how-to-connect-module-pool-program-to-se38/m-p/2809322#M656701</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kalyan..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no need to Create a Module pool for Creating a SCREEN in case of ALV reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just Create the SCREEN for the REPORT program itself and call the screen using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN &amp;lt;NO&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;reward if Helpful.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Oct 2007 06:02:23 GMT</pubDate>
    <dc:creator>varma_narayana</dc:creator>
    <dc:date>2007-10-04T06:02:23Z</dc:date>
    <item>
      <title>while doing alvs how to connect module pool program to se38</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/while-doing-alvs-how-to-connect-module-pool-program-to-se38/m-p/2809319#M656698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi gurus&lt;/P&gt;&lt;P&gt;while we are creating alv with oops &lt;/P&gt;&lt;P&gt;we cretae a container in modulepool&lt;/P&gt;&lt;P&gt;how to connect it to  se38 &lt;/P&gt;&lt;P&gt;i could not get it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could naybody suggest me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;kals.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 05:52:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/while-doing-alvs-how-to-connect-module-pool-program-to-se38/m-p/2809319#M656698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-04T05:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: while doing alvs how to connect module pool program to se38</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/while-doing-alvs-how-to-connect-module-pool-program-to-se38/m-p/2809320#M656699</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;Create a report program in SE38.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Double click on 100 &amp;amp; then create the container for alv.. in the PBO, PAI build the necessary logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 05:55:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/while-doing-alvs-how-to-connect-module-pool-program-to-se38/m-p/2809320#M656699</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-04T05:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: while doing alvs how to connect module pool program to se38</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/while-doing-alvs-how-to-connect-module-pool-program-to-se38/m-p/2809321#M656700</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;for doing this  you need to use these FMs &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create object g_custom_container&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   PARENT                      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    container_name              = g_container&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   STYLE                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   LIFETIME                    = lifetime_default&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   REPID                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   DYNNR                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   NO_AUTODEF_PROGID_DYNNR     =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  exceptions&lt;/P&gt;&lt;P&gt;    cntl_error                  = 1&lt;/P&gt;&lt;P&gt;    cntl_system_error           = 2&lt;/P&gt;&lt;P&gt;    create_error                = 3&lt;/P&gt;&lt;P&gt;    lifetime_error              = 4&lt;/P&gt;&lt;P&gt;    lifetime_dynpro_dynpro_link = 5&lt;/P&gt;&lt;P&gt;    others                      = 6&lt;/P&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;create object g_alv_grid&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_SHELLSTYLE      = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_LIFETIME        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    i_parent          = g_custom_container&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_APPL_EVENTS     = space&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_PARENTDBG       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_APPLOGPARENT    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_GRAPHICSPARENT  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   I_NAME            =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  exceptions&lt;/P&gt;&lt;P&gt;    error_cntl_create = 1&lt;/P&gt;&lt;P&gt;    error_cntl_init   = 2&lt;/P&gt;&lt;P&gt;    error_cntl_link   = 3&lt;/P&gt;&lt;P&gt;    error_dp_create   = 4&lt;/P&gt;&lt;P&gt;    others            = 5&lt;/P&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;&lt;/P&gt;&lt;P&gt;OR ELSE USE MY CODE ITS EXACTLY THE SAME THING WHAT YOU WANT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  Z8HG_OOPS_ALV                                               *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                                                                     *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*

report  z8hg_oops_alv                           .


data : g_container type scrfname value 'CONTAINER1',
       g_custom_container type ref to cl_gui_custom_container,
       g_alv_grid type ref to cl_gui_alv_grid.


types : begin of struct,
        matnr type matnr,
        mtart type mtart,
        meins type meins,

        end of struct.

data : itab type standard table of struct with header line.

data : ok_code_0101(20).
data : i_fieldcat type lvc_t_fcat.

data : l_fieldcat type lvc_s_fcat.


start-of-selection.
select matnr
       mtart
       meins into table itab
       from mara
       where mtart = 'FERT'.

 call screen 0101.


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  STATUS_0101  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module status_0101 output.
*  SET PF-STATUS 'xxxxxxxx'.
*  SET TITLEBAR 'xxx'.


perform initialise_alv.
perform build_fieldcat using i_fieldcat.
perform alv_display.

endmodule.                 " STATUS_0101  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  BUILD_FIELDCAT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;P_I_FIELDCAT  text
*----------------------------------------------------------------------*
form build_fieldcat  using    p_i_fieldcat type lvc_t_fcat.

refresh p_i_fieldcat.

perform fill_fcat using '1' 'MATNR'  'ITAB'  'MATERIAL'  '20' '1'.

perform fill_fcat using '2' 'MTART'  'ITAB'  'TYPE'  '20' '1'.

perform fill_fcat using '3' 'MEINS'  'ITAB'  'UNIT'  '20' '1'.



endform.                    " BUILD_FIELDCAT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  FILL_FCAT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;P_0079   text
*      --&amp;gt;P_0080   text
*      --&amp;gt;P_0081   text
*      --&amp;gt;P_0082   text
*      --&amp;gt;P_0083   text
*      --&amp;gt;P_0084   text
*----------------------------------------------------------------------*
form fill_fcat  using    p_col_pos      type lvc_s_fcat-col_pos
                         p_fieldname    type lvc_s_fcat-fieldname
                         p_tabname      type lvc_s_fcat-tabname
                         p_seltext      type lvc_s_fcat-scrtext_l
                         p_outputlen    type lvc_s_fcat-outputlen
                         p_row_pos      type lvc_s_fcat-row_pos.

 clear l_fieldcat.

 l_fieldcat-col_pos      = p_col_pos.
 l_fieldcat-fieldname    = p_fieldname.
 l_fieldcat-tabname      = p_tabname.
 l_fieldcat-scrtext_l    = p_seltext.
 l_fieldcat-outputlen    = p_outputlen.
 l_fieldcat-row_pos      = p_row_pos.



 append l_fieldcat to i_fieldcat.

endform.                    " FILL_FCAT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  INITIALISE_ALV
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
form initialise_alv .

if g_custom_container is initial.

create object g_custom_container
  exporting
*    PARENT                      =
    container_name              = g_container
*    STYLE                       =
*    LIFETIME                    = lifetime_default
*    REPID                       =
*    DYNNR                       =
*    NO_AUTODEF_PROGID_DYNNR     =
  exceptions
    cntl_error                  = 1
    cntl_system_error           = 2
    create_error                = 3
    lifetime_error              = 4
    lifetime_dynpro_dynpro_link = 5
    others                      = 6
    .
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.


create object g_alv_grid
  exporting
*    I_SHELLSTYLE      = 0
*    I_LIFETIME        =
    i_parent          = g_custom_container
*    I_APPL_EVENTS     = space
*    I_PARENTDBG       =
*    I_APPLOGPARENT    =
*    I_GRAPHICSPARENT  =
*    I_NAME            =
  exceptions
    error_cntl_create = 1
    error_cntl_init   = 2
    error_cntl_link   = 3
    error_dp_create   = 4
    others            = 5
    .
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.




endif.

endform.                    " INITIALISE_ALV
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  ALV_DISPLAY
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
form alv_display .

call method g_alv_grid-&amp;gt;set_table_for_first_display
*  EXPORTING
*    I_BUFFER_ACTIVE               =
*    I_BYPASSING_BUFFER            =
*    I_CONSISTENCY_CHECK           =
*    I_STRUCTURE_NAME              =
*    IS_VARIANT                    =
*    I_SAVE                        =
*    I_DEFAULT                     = 'X'
*    IS_LAYOUT                     =
*    IS_PRINT                      =
*    IT_SPECIAL_GROUPS             =
*    IT_TOOLBAR_EXCLUDING          =
*    IT_HYPERLINK                  =
*    IT_ALV_GRAPHICS               =
*    IT_EXCEPT_QINFO               =
  changing
    it_outtab                     = itab[]
    it_fieldcatalog               = i_fieldcat
*    IT_SORT                       =
*    IT_FILTER                     =
  exceptions
    invalid_parameter_combination = 1
    program_error                 = 2
    too_many_lines                = 3
    others                        = 4
        .
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.


endform.                    " ALV_DISPLAY
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  EXIT_MODULE  INPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module exit_module input.

set screen 0.
leave program.

endmodule.                 " EXIT_MODULE  INPUT&lt;/CODE&gt;&lt;/PRE&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;&lt;P&gt;REWARD IF HELPFUL&lt;/P&gt;&lt;P&gt;VIVEKANAND&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 05:58:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/while-doing-alvs-how-to-connect-module-pool-program-to-se38/m-p/2809321#M656700</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-04T05:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: while doing alvs how to connect module pool program to se38</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/while-doing-alvs-how-to-connect-module-pool-program-to-se38/m-p/2809322#M656701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kalyan..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no need to Create a Module pool for Creating a SCREEN in case of ALV reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just Create the SCREEN for the REPORT program itself and call the screen using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN &amp;lt;NO&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;reward if Helpful.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 06:02:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/while-doing-alvs-how-to-connect-module-pool-program-to-se38/m-p/2809322#M656701</guid>
      <dc:creator>varma_narayana</dc:creator>
      <dc:date>2007-10-04T06:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: while doing alvs how to connect module pool program to se38</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/while-doing-alvs-how-to-connect-module-pool-program-to-se38/m-p/2809323#M656702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.just create a blank custom control in the layout. name it. ex: CUST_CONTROL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. come to the report,&lt;/P&gt;&lt;P&gt;***data declaration&lt;/P&gt;&lt;P&gt; DATA:&lt;/P&gt;&lt;P&gt;GO_GRID type ref to cl_gui_alv_grid,&lt;/P&gt;&lt;P&gt;go_custom_container type ref to cl_gui_custom_container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;creation of objects and linking the custom container&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CREATE OBJECT GO_CUSTOM_CONTAINER&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       CONTAINER_NAME              = &amp;lt;b&amp;gt;'CUST_CONTROL'.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;  CREATE OBJECT GO_GRID&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      I_PARENT          = GO_CUSTOM_CONTAINER.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 06:08:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/while-doing-alvs-how-to-connect-module-pool-program-to-se38/m-p/2809323#M656702</guid>
      <dc:creator>hymavathi_oruganti</dc:creator>
      <dc:date>2007-10-04T06:08:04Z</dc:date>
    </item>
  </channel>
</rss>

