<?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 OOPS interactive report issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops-interactive-report-issue/m-p/535182#M19640</link>
    <description>&lt;P&gt;Something like&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;IF l_cont3 IS INITIAL.
  CREATE OBJECT l_cont3...
ENDIF.
IF l_grid3 IS INITIAL.
  CREATE OBJECT l_grid3...
ELSE.
  l_grid3-&amp;gt;refresh_table_display...
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 30 Nov 2017 07:05:19 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2017-11-30T07:05:19Z</dc:date>
    <item>
      <title>ALV OOPS interactive report issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops-interactive-report-issue/m-p/535179#M19637</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
  &lt;P&gt;I am new to oops alv. I was practising an interactive alv report which has the following basic list:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/94286-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;On double clicking the Material number &lt;STRONG&gt;(first time)&lt;/STRONG&gt;, I am calling a subscreen below the basic list and some data from MARA table is being shown:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/94287-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;But, when I am clicking another line of the material number, the screen is displaying the result &lt;STRONG&gt;&lt;U&gt;behind&lt;/U&gt;&lt;/STRONG&gt; the initial secondary list (which I am obtaining after I scroll down with the scroll bar)!&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/94288-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I am pasting the code for the secondary list . Screen 9000 is the basic list screen and screen 9003 is the subscreen that I am calling&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;
PROCESS BEFORE OUTPUT.

  MODULE status_9000.

  CALL SUBSCREEN  REF1 INCLUDING sy-repid l_dynpro.

PROCESS AFTER INPUT.

  MODULE user_command_9000.

  CALL SUBSCREEN ref1.

&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;In the flow logic of screen 9003:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;
PROCESS BEFORE OUTPUT.
 MODULE STATUS_9003.


PROCESS AFTER INPUT.
 MODULE USER_COMMAND_9003.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Inside MODULE status_9003 OUTPUT:&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;MODULE&lt;/STRONG&gt; status_9003 &lt;STRONG&gt;OUTPUT.&lt;/STRONG&gt;&lt;BR /&gt;REFRESH lt_fcat3.&lt;BR /&gt; l_obj-&amp;gt;fill_mara_fcat( ).&lt;BR /&gt; l_obj-&amp;gt;disp_mara_list( ).&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;ENDMODULE.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;The logic inside methods "fill_mara_fcat" and "displ_mara_list" is given below:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;
METHOD fill_mara_fcat.

    lw_fcat3-fieldname = 'MATNR'.
    lw_fcat3-tabname = 'LT_MARA'.
    lw_fcat3-coltext = 'Material Number'.
    lw_fcat3-tooltip = 'Material Number'.
    lw_fcat3-hotspot = 'X'.
    lw_fcat3-col_opt = ''.
    APPEND lw_fcat3 TO lt_fcat3.
    CLEAR lw_fcat3.

    lw_fcat3-fieldname = 'ERSDA'.
    lw_fcat3-tabname = 'LT_MARA'.
    lw_fcat3-coltext = 'Created On'.
    lw_fcat3-tooltip = 'Created On'.
    lw_fcat3-col_opt = ''.
    APPEND lw_fcat3 TO lt_fcat3.
    CLEAR lw_fcat3.

    lw_fcat3-fieldname = 'MTART'.
    lw_fcat3-tabname = 'LT_MARA'.
    lw_fcat3-coltext = 'Material Type'.
    lw_fcat3-tooltip = 'Material Type'.
    lw_fcat3-col_opt = ''.
    APPEND lw_fcat3 TO lt_fcat3.
    CLEAR lw_fcat3.
  ENDMETHOD.                    "fill_mara_fcat&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;PRE&gt;&lt;CODE&gt;METHOD disp_mara_list.

 CREATE OBJECT l_cont3
      EXPORTING
        container_name              = 'L_CONTAINER3'
  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 l_grid3
      EXPORTING
        i_parent          = l_cont3
      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.

    CALL METHOD l_grid3-&amp;gt;set_table_for_first_display
      EXPORTING
      is_layout                     = lw_layout
     CHANGING
        it_outtab                     = lt_mara[]
        it_fieldcatalog               = lt_fcat3[]
      EXCEPTIONS
        invalid_parameter_combination = 1
        program_error                 = 2
        too_many_lines                = 3
        OTHERS                        = 4.
    IF sy-subrc &amp;lt;&amp;gt; 0.
* Implement suitable error handling here
    ENDIF.

  ENDMETHOD.                    "display_mara_data&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Please let me know how to solve the issue. I have debugged my code and the data is populating fine. The only problem I have is the way its getting displayed.&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 05:54:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops-interactive-report-issue/m-p/535179#M19637</guid>
      <dc:creator>manish_malakar0316</dc:creator>
      <dc:date>2017-11-30T05:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: ALV OOPS interactive report issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops-interactive-report-issue/m-p/535180#M19638</link>
      <description>&lt;P&gt;Don't create new instances of class that already exists at frontend like container and ALV grid. Better reuse the current ones, e.g. continue (do nothing) with current customer container and use method REFRESH_TABLE_DISPLAY with grid ALV. &lt;/P&gt;
  &lt;P&gt;If (when) you have time to improve&lt;/P&gt;
  &lt;UL&gt;
   &lt;LI&gt;Use some TRY/CATCH/ENDTRY to handle exceptions.&lt;/LI&gt;
   &lt;LI&gt;Use method IS_VALID to insure those not cleared/freed objects are currently valid frontend objects.&lt;/LI&gt;
   &lt;LI&gt;Use lifetime parameters.&lt;/LI&gt;
  &lt;/UL&gt;</description>
      <pubDate>Thu, 30 Nov 2017 06:35:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops-interactive-report-issue/m-p/535180#M19638</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2017-11-30T06:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: ALV OOPS interactive report issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops-interactive-report-issue/m-p/535181#M19639</link>
      <description>&lt;P&gt;Hi Raymond,&lt;/P&gt;
  &lt;P&gt;Can u send me a code snippet as to what exactly I need to do in this case ? Where in my code do I need to make the changes ? &lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 06:57:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops-interactive-report-issue/m-p/535181#M19639</guid>
      <dc:creator>manish_malakar0316</dc:creator>
      <dc:date>2017-11-30T06:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: ALV OOPS interactive report issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops-interactive-report-issue/m-p/535182#M19640</link>
      <description>&lt;P&gt;Something like&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;IF l_cont3 IS INITIAL.
  CREATE OBJECT l_cont3...
ENDIF.
IF l_grid3 IS INITIAL.
  CREATE OBJECT l_grid3...
ELSE.
  l_grid3-&amp;gt;refresh_table_display...
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Nov 2017 07:05:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-oops-interactive-report-issue/m-p/535182#M19640</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2017-11-30T07:05:19Z</dc:date>
    </item>
  </channel>
</rss>

