<?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: ALV Reports in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/1697911#M306104</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sandeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed the same procedure as suggested by you but with a little modification. I used the object based approach instead of a procedural one. What all I did, I am explaining so that it may be helpful to others also:&lt;/P&gt;&lt;P&gt;(1) I created one custom container and assigned one splitter container into that.&lt;/P&gt;&lt;P&gt;(2) In the two rows of the splitter container, I assigned two grid objects.&lt;/P&gt;&lt;P&gt;(3) Set one user defined class as an event-handler for the hot-spot click event of&lt;/P&gt;&lt;P&gt;     CL_GUI_ALV_GRID class, equipped with a method that takes the clicked &lt;/P&gt;&lt;P&gt;     row's ID and fetches data from master internal table.&lt;/P&gt;&lt;P&gt;(4) Called subroutines from within the methods  to display the child:&lt;/P&gt;&lt;P&gt;     (a)CALL METHOD GRID_2-&amp;gt;SET_TABLE_FOR_FIRST_DISPLAY for first time &lt;/P&gt;&lt;P&gt;         click on any of the rows of master .&lt;/P&gt;&lt;P&gt;     (b) For any later click on the rows of master grid :--&lt;/P&gt;&lt;P&gt;          &lt;SPAN __jive_emoticon_name="info"&gt;&lt;/SPAN&gt; CALL METHOD GRID_2-&amp;gt;GET_FRONTEND_LAYOUT&lt;/P&gt;&lt;P&gt;          (ii) CALL METHOD GRID_2-&amp;gt;SET_FRONTEND_LAYOUT&lt;/P&gt;&lt;P&gt;          (iii) CALL METHOD GRID_2-&amp;gt;REFRESH_TABLE_DISPLAY.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Please check the logic and suggest any improvements you observe in that. In the end, I would like to thank all of you for your support and consideration. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aditya P. Srivastava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Nov 2006 11:21:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-30T11:21:27Z</dc:date>
    <item>
      <title>ALV Reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/1697908#M306101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to display the Master table data in one ALV grid and a child table data, which is related to master table using primary key- foreign key relation, displayed in another ALV grid which is created dynamically based on the record selected by the user (data that correspond to the selected record is to be displayed on this second grid ) on the same screen at the same time ? If yes, please let me know the working logic, function modules or methods and if possible, the source code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 12:04:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/1697908#M306101</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-21T12:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/1697909#M306102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi aditya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this we can use BLOCK ALV Concept.&lt;/P&gt;&lt;P&gt;(to display two or more internal tables on the same screen)&lt;/P&gt;&lt;P&gt;(It will be shown as LIST and not GRID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. This simple program will give u an idea&lt;/P&gt;&lt;P&gt;of block alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. It will print two alv&lt;/P&gt;&lt;P&gt;a) itab = table from t001&lt;/P&gt;&lt;P&gt;b) ptab = table from t000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Just copy paste in new program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zam_temp54 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools : slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : alvfc type slis_t_fieldcat_alv.&lt;/P&gt;&lt;P&gt;data : alvly type slis_layout_alv.&lt;/P&gt;&lt;P&gt;data : alvev type slis_t_event .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF itab OCCURS 0.&lt;/P&gt;&lt;P&gt;include structure t001.&lt;/P&gt;&lt;P&gt;DATA: END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF ptab OCCURS 0.&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE t000.&lt;/P&gt;&lt;P&gt;DATA: END OF ptab..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------" /&gt;&lt;P&gt;PARAMETERS : a TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------" /&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------" /&gt;&lt;P&gt; SELECT DATA&lt;/P&gt;&lt;P&gt;SELECT * FROM t001 into table itab.&lt;/P&gt;&lt;P&gt;select * from t000 into table ptab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------" /&gt;&lt;P&gt; INIT BLOCK ALV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_callback_program = sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------" /&gt;&lt;P&gt; ADD INTERNAL TABLE ITAB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;I_PROGRAM_NAME = SY-REPID&lt;/P&gt;&lt;P&gt;I_INTERNAL_TABNAME = 'ITAB'&lt;/P&gt;&lt;P&gt;I_INCLNAME = SY-REPID&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;CT_FIELDCAT = ALVFC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;is_layout = alvly&lt;/P&gt;&lt;P&gt;it_fieldcat = alvfc&lt;/P&gt;&lt;P&gt;i_tabname = 'ITAB'&lt;/P&gt;&lt;P&gt;it_events = alvev&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;t_outtab = ITAB&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;program_error = 1&lt;/P&gt;&lt;P&gt;maximum_of_appends_reached = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&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;&lt;HR originaltext="--------------" /&gt;&lt;P&gt; ADD INTERNAL TABLE PTAB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH ALVFC[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;I_PROGRAM_NAME = SY-REPID&lt;/P&gt;&lt;P&gt;I_INTERNAL_TABNAME = 'PTAB'&lt;/P&gt;&lt;P&gt;I_INCLNAME = SY-REPID&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;CT_FIELDCAT = ALVFC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;is_layout = alvly&lt;/P&gt;&lt;P&gt;it_fieldcat = alvfc&lt;/P&gt;&lt;P&gt;i_tabname = 'PTAB'&lt;/P&gt;&lt;P&gt;it_events = alvev&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;t_outtab = PTAB&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;program_error = 1&lt;/P&gt;&lt;P&gt;maximum_of_appends_reached = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&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;&lt;HR originaltext="----------" /&gt;&lt;P&gt; DISPLAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;program_error = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 12:09:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/1697909#M306102</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-21T12:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/1697910#M306103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aditya,&lt;/P&gt;&lt;P&gt;Welcome to SDN &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This is quite possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.create two grids on same screen. say on first grid you display the master data.&lt;/P&gt;&lt;P&gt;2.now you can assign a click event object to this first grid.&lt;/P&gt;&lt;P&gt;3. Now whenever you click on first grid this event will be fired.&lt;/P&gt;&lt;P&gt;4. Here you can get the row number where the user clicked.&lt;/P&gt;&lt;P&gt;5. get the master data on that grid.&lt;/P&gt;&lt;P&gt;6. fetch the data from child table and populate second grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps.&lt;/P&gt;&lt;P&gt;award forum points to helpful answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2006 12:16:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/1697910#M306103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-21T12:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/1697911#M306104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sandeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed the same procedure as suggested by you but with a little modification. I used the object based approach instead of a procedural one. What all I did, I am explaining so that it may be helpful to others also:&lt;/P&gt;&lt;P&gt;(1) I created one custom container and assigned one splitter container into that.&lt;/P&gt;&lt;P&gt;(2) In the two rows of the splitter container, I assigned two grid objects.&lt;/P&gt;&lt;P&gt;(3) Set one user defined class as an event-handler for the hot-spot click event of&lt;/P&gt;&lt;P&gt;     CL_GUI_ALV_GRID class, equipped with a method that takes the clicked &lt;/P&gt;&lt;P&gt;     row's ID and fetches data from master internal table.&lt;/P&gt;&lt;P&gt;(4) Called subroutines from within the methods  to display the child:&lt;/P&gt;&lt;P&gt;     (a)CALL METHOD GRID_2-&amp;gt;SET_TABLE_FOR_FIRST_DISPLAY for first time &lt;/P&gt;&lt;P&gt;         click on any of the rows of master .&lt;/P&gt;&lt;P&gt;     (b) For any later click on the rows of master grid :--&lt;/P&gt;&lt;P&gt;          &lt;SPAN __jive_emoticon_name="info"&gt;&lt;/SPAN&gt; CALL METHOD GRID_2-&amp;gt;GET_FRONTEND_LAYOUT&lt;/P&gt;&lt;P&gt;          (ii) CALL METHOD GRID_2-&amp;gt;SET_FRONTEND_LAYOUT&lt;/P&gt;&lt;P&gt;          (iii) CALL METHOD GRID_2-&amp;gt;REFRESH_TABLE_DISPLAY.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Please check the logic and suggest any improvements you observe in that. In the end, I would like to thank all of you for your support and consideration. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aditya P. Srivastava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 11:21:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports/m-p/1697911#M306104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T11:21:27Z</dc:date>
    </item>
  </channel>
</rss>

