<?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: List display for ALV using class and methods in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-display-for-alv-using-class-and-methods/m-p/2630358#M604763</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;Yes,This is the simple program but in this we r using the Function module of REUSE_ALV_LIST_DISPLAY.&lt;/P&gt;&lt;P&gt;I dont want to use this FM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jul 2007 05:42:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-27T05:42:14Z</dc:date>
    <item>
      <title>List display for ALV using class and methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-display-for-alv-using-class-and-methods/m-p/2630356#M604761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the list display for the ALV using Class and methods &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which class and methods i can use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here we can't use the REUSE_ALV_LIST_DISPLAY and also GRID &lt;/P&gt;&lt;P&gt;I was done GRID display using class and methods but i want only list display for using class.&lt;/P&gt;&lt;P&gt;plz Give me sample code of list display not for grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nani.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 05:35:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/list-display-for-alv-using-class-and-methods/m-p/2630356#M604761</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T05:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: List display for ALV using class and methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-display-for-alv-using-class-and-methods/m-p/2630357#M604762</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;Please check the std program &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_TEST_LIST &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its pretty simple and easy to understand..Pls reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 05:37:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/list-display-for-alv-using-class-and-methods/m-p/2630357#M604762</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T05:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: List display for ALV using class and methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-display-for-alv-using-class-and-methods/m-p/2630358#M604763</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;Yes,This is the simple program but in this we r using the Function module of REUSE_ALV_LIST_DISPLAY.&lt;/P&gt;&lt;P&gt;I dont want to use this FM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 05:42:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/list-display-for-alv-using-class-and-methods/m-p/2630358#M604763</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T05:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: List display for ALV using class and methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-display-for-alv-using-class-and-methods/m-p/2630359#M604764</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;please check with this code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;declare grid and container.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : o_alvgrid TYPE REF TO cl_gui_alv_grid,&lt;/P&gt;&lt;P&gt;o_dockingcontainer TYPE REF TO cl_gui_docking_container,&lt;/P&gt;&lt;P&gt;i_fieldcat TYPE lvc_t_fcat,"fieldcatalogue&lt;/P&gt;&lt;P&gt;w_layout TYPE lvc_s_layo."layout&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any events like double click,etc., are needed we have to add additional functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call the screen in program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Then , create the container as follows&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF cl_gui_alv_grid=&amp;gt;offline( ) IS INITIAL.&lt;/P&gt;&lt;P&gt;CREATE OBJECT o_dockingcontainer&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;ratio = '95'&lt;/P&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;ENDIF.&lt;/P&gt;&lt;P&gt;CREATE OBJECT o_alvgrid&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_parent = o_dockingcontainer.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Build the fieldcatalog&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;create a output structure in SEll for the ALV output&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_structure_name = &amp;lt;alv output&amp;gt;&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;ct_fieldcat = i_fieldcat[]&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;inconsistent_interface = 1&lt;/P&gt;&lt;P&gt;program_error = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE i030."Error in building the field catalogue&lt;/P&gt;&lt;P&gt;LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*If you need to modify the field catalog,modify it using field sysmbols&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*setting the layout&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_layout-grid_title = title.&lt;/P&gt;&lt;P&gt;w_layout-zebra = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;then displaying the output&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD o_alvgrid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_save = 'A'&lt;/P&gt;&lt;P&gt;is_layout = w_layout&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;it_outtab = i_output[]&lt;/P&gt;&lt;P&gt;it_fieldcatalog = i_fieldcat[]&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;invalid_parameter_combination = 1&lt;/P&gt;&lt;P&gt;program_error = 2&lt;/P&gt;&lt;P&gt;too_many_lines = 3&lt;/P&gt;&lt;P&gt;OTHERS = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE i032 ."Error in Displaying&lt;/P&gt;&lt;P&gt;LEAVE LIST-PROCESSING.&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;*After that in PAI of the screen, you need to free the *object while going back from the screen(according to *your requirement)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_9001 INPUT.&lt;/P&gt;&lt;P&gt;CASE sy-ucomm.&lt;/P&gt;&lt;P&gt;WHEN 'EXIT' OR 'CANC'.&lt;/P&gt;&lt;P&gt;PERFORM f9600_free_objects:&lt;/P&gt;&lt;P&gt;USING o_alvgrid 'ALV' text-e02,&lt;/P&gt;&lt;P&gt;USING o_dockingcontainer 'DOCKING'&lt;/P&gt;&lt;P&gt;text-e01.&lt;/P&gt;&lt;P&gt;LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE. " USER_COMMAND_9001 INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*in the program, write the follwoing code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f9600_free_objects USING pobject&lt;/P&gt;&lt;P&gt;value(ptype)&lt;/P&gt;&lt;P&gt;value(ptext).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: l_objectalv TYPE REF TO cl_gui_alv_grid.&lt;/P&gt;&lt;P&gt;CASE ptype.&lt;/P&gt;&lt;P&gt;WHEN 'ALV'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_objectalv = pobject.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT ( l_objectalv IS INITIAL ).&lt;/P&gt;&lt;P&gt;CALL METHOD l_objectalv-&amp;gt;free&lt;/P&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;OTHERS = 3.&lt;/P&gt;&lt;P&gt;CLEAR: pobject, l_objectalv.&lt;/P&gt;&lt;P&gt;PERFORM f9700_error_handle USING ptext.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;WHEN 'DOCKING'.&lt;/P&gt;&lt;P&gt;DATA: lobjectdock TYPE REF TO cl_gui_docking_container.&lt;/P&gt;&lt;P&gt;lobjectdock = pobject.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT ( lobjectdock IS INITIAL ).&lt;/P&gt;&lt;P&gt;CALL METHOD lobjectdock-&amp;gt;free&lt;/P&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;OTHERS = 3.&lt;/P&gt;&lt;P&gt;CLEAR: pobject, lobjectdock.&lt;/P&gt;&lt;P&gt;PERFORM f9700_error_handle USING ptext.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;WHEN 'CONTAINER'.&lt;/P&gt;&lt;P&gt;DATA: lobjectcontainer TYPE REF TO cl_gui_container.&lt;/P&gt;&lt;P&gt;lobjectcontainer = pobject.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT ( lobjectcontainer IS INITIAL ).&lt;/P&gt;&lt;P&gt;CALL METHOD lobjectcontainer-&amp;gt;free&lt;/P&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;OTHERS = 3.&lt;/P&gt;&lt;P&gt;CLEAR: pobject, lobjectcontainer.&lt;/P&gt;&lt;P&gt;PERFORM f9700_error_handle USING ptext.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;WHEN OTHERS.&lt;/P&gt;&lt;P&gt;sy-subrc = 1.&lt;/P&gt;&lt;P&gt;PERFORM f9700_error_handle USING&lt;/P&gt;&lt;P&gt;text-e04.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " f9600_free_objects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f9700_error_handle USING value(ptext).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'POPUP_TO_INFORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;titel = text-e03&lt;/P&gt;&lt;P&gt;txt2 = sy-subrc&lt;/P&gt;&lt;P&gt;txt1 = ptext.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also check with this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it helped, you can acknowledge the same by rewarding &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dinesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 05:43:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/list-display-for-alv-using-class-and-methods/m-p/2630359#M604764</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T05:43:29Z</dc:date>
    </item>
  </channel>
</rss>

