<?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 Total column not changed between Header &amp; Detl screen on diff header record in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/total-column-not-changed-between-header-detl-screen-on-diff-header-record/m-p/6074282#M1355990</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a report with header data contains contracts information and detailed data contains orders, debit credit memo related to the contracts. I write the report using CL_SALV_TABLE to display contract value, usage in full ALV_GRID. When I double click on a contract line, it will go to the second screen to show all orders related to that contract. The second screen with orders information will be in a screen on a container with all standard function ( Export list to Excel, Word format etc..), sort, total and sub total) and a push button to go back to first screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The report works fine but when I am on the second screen, I total and sub total the amount on that screen in order to check with total value in header record and it total up correctly by currency. &lt;/P&gt;&lt;P&gt;But when I go back to the first screen, select a different contract record, double click on the line to get to the order info screen, all order data display correctly except that the total column still show amount from the previous detailed screen. If I select the column again and click the total, it will total correctly. &lt;/P&gt;&lt;P&gt;I did refresh the data in the screen before go back to first screen but it does not solve the problem. &lt;/P&gt;&lt;P&gt;DOES ANYONE HAVE A SIMILAR SYMPTON LIKE THIS? &lt;/P&gt;&lt;P&gt;Thanks for your advice.   I also post this in ABAP Object forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI, On the order detailed screen, I create a container with screen 100 and write PAI, PBO like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen 100: &lt;/P&gt;&lt;P&gt;process before output. &lt;/P&gt;&lt;P&gt;module status_0100. &lt;/P&gt;&lt;P&gt;module load_data_to_control. "Load usage data to screen &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; process after input. &lt;/P&gt;&lt;P&gt;module user_command_0100.&lt;/P&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="-----------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module status_0100 output. &lt;/P&gt;&lt;P&gt;set pf-status 'PF100'. set titlebar 'T100'. &lt;/P&gt;&lt;P&gt;endmodule. &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; module load_data_to_control output. &lt;/P&gt;&lt;P&gt;if gr_cont is not bound. &lt;/P&gt;&lt;P&gt;create object gr_cont&lt;/P&gt;&lt;P&gt; exporting container_name = 'CONTAINER_100' &lt;/P&gt;&lt;P&gt;exceptions others = 1. &lt;/P&gt;&lt;P&gt;if sy-subrc 0. &lt;/P&gt;&lt;P&gt;message a052(zvn) with ' No container object found'. &lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;Try. &lt;/P&gt;&lt;P&gt;  cl_salv_table=&amp;gt;factory( exporting &lt;/P&gt;&lt;P&gt;     r_container = gr_cont &lt;/P&gt;&lt;P&gt;importing r_salv_table = gr_alv_2 &lt;/P&gt;&lt;P&gt;changing t_table = gt_orders ). &lt;/P&gt;&lt;P&gt;catch cx_salv_msg into gr_error. &lt;/P&gt;&lt;P&gt;endtry.&lt;/P&gt;&lt;P&gt; perform set_functions. " Set all standard function in screen 100 &lt;/P&gt;&lt;P&gt;perform set_column_order using gr_alv_2. "Set column format, display &lt;/P&gt;&lt;P&gt;perform handle_events. "Register events for selection mode &amp;amp; user commands &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display order screen 0100 &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gr_alv_2-&amp;gt;display( ). &lt;/P&gt;&lt;P&gt;else. &lt;/P&gt;&lt;P&gt;gr_alv_2-&amp;gt;refresh( ). &lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------" /&gt;&lt;P&gt; module user_command_0100 input.&lt;/P&gt;&lt;P&gt; data: wa_d type gt_dtab, &lt;/P&gt;&lt;P&gt;ls_contract type vbeln,&lt;/P&gt;&lt;P&gt; ls_order type vbeln, &lt;/P&gt;&lt;P&gt;ls_invoice type vbeln, &lt;/P&gt;&lt;P&gt;ls_belnr type belnr_d, &lt;/P&gt;&lt;P&gt;ls_row type char10. &lt;/P&gt;&lt;P&gt;data: l_text type char128. &lt;/P&gt;&lt;P&gt;case sy-ucomm. &lt;/P&gt;&lt;P&gt;when 'RETURN' or 'BACK' or 'EXIT' or 'CANCEL'. &lt;/P&gt;&lt;P&gt;*... refresh the table in order to see the new data&lt;/P&gt;&lt;P&gt; gr_alv_2-&amp;gt;refresh( ). &lt;/P&gt;&lt;P&gt;leave to screen 0. &lt;/P&gt;&lt;P&gt;when others. &lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt; endmodule. " USER_COMMAND_0100 INPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Sep 2009 02:28:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-11T02:28:15Z</dc:date>
    <item>
      <title>Total column not changed between Header &amp; Detl screen on diff header record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/total-column-not-changed-between-header-detl-screen-on-diff-header-record/m-p/6074282#M1355990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a report with header data contains contracts information and detailed data contains orders, debit credit memo related to the contracts. I write the report using CL_SALV_TABLE to display contract value, usage in full ALV_GRID. When I double click on a contract line, it will go to the second screen to show all orders related to that contract. The second screen with orders information will be in a screen on a container with all standard function ( Export list to Excel, Word format etc..), sort, total and sub total) and a push button to go back to first screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The report works fine but when I am on the second screen, I total and sub total the amount on that screen in order to check with total value in header record and it total up correctly by currency. &lt;/P&gt;&lt;P&gt;But when I go back to the first screen, select a different contract record, double click on the line to get to the order info screen, all order data display correctly except that the total column still show amount from the previous detailed screen. If I select the column again and click the total, it will total correctly. &lt;/P&gt;&lt;P&gt;I did refresh the data in the screen before go back to first screen but it does not solve the problem. &lt;/P&gt;&lt;P&gt;DOES ANYONE HAVE A SIMILAR SYMPTON LIKE THIS? &lt;/P&gt;&lt;P&gt;Thanks for your advice.   I also post this in ABAP Object forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI, On the order detailed screen, I create a container with screen 100 and write PAI, PBO like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen 100: &lt;/P&gt;&lt;P&gt;process before output. &lt;/P&gt;&lt;P&gt;module status_0100. &lt;/P&gt;&lt;P&gt;module load_data_to_control. "Load usage data to screen &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; process after input. &lt;/P&gt;&lt;P&gt;module user_command_0100.&lt;/P&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="-----------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module status_0100 output. &lt;/P&gt;&lt;P&gt;set pf-status 'PF100'. set titlebar 'T100'. &lt;/P&gt;&lt;P&gt;endmodule. &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; module load_data_to_control output. &lt;/P&gt;&lt;P&gt;if gr_cont is not bound. &lt;/P&gt;&lt;P&gt;create object gr_cont&lt;/P&gt;&lt;P&gt; exporting container_name = 'CONTAINER_100' &lt;/P&gt;&lt;P&gt;exceptions others = 1. &lt;/P&gt;&lt;P&gt;if sy-subrc 0. &lt;/P&gt;&lt;P&gt;message a052(zvn) with ' No container object found'. &lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;Try. &lt;/P&gt;&lt;P&gt;  cl_salv_table=&amp;gt;factory( exporting &lt;/P&gt;&lt;P&gt;     r_container = gr_cont &lt;/P&gt;&lt;P&gt;importing r_salv_table = gr_alv_2 &lt;/P&gt;&lt;P&gt;changing t_table = gt_orders ). &lt;/P&gt;&lt;P&gt;catch cx_salv_msg into gr_error. &lt;/P&gt;&lt;P&gt;endtry.&lt;/P&gt;&lt;P&gt; perform set_functions. " Set all standard function in screen 100 &lt;/P&gt;&lt;P&gt;perform set_column_order using gr_alv_2. "Set column format, display &lt;/P&gt;&lt;P&gt;perform handle_events. "Register events for selection mode &amp;amp; user commands &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display order screen 0100 &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gr_alv_2-&amp;gt;display( ). &lt;/P&gt;&lt;P&gt;else. &lt;/P&gt;&lt;P&gt;gr_alv_2-&amp;gt;refresh( ). &lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------" /&gt;&lt;P&gt; module user_command_0100 input.&lt;/P&gt;&lt;P&gt; data: wa_d type gt_dtab, &lt;/P&gt;&lt;P&gt;ls_contract type vbeln,&lt;/P&gt;&lt;P&gt; ls_order type vbeln, &lt;/P&gt;&lt;P&gt;ls_invoice type vbeln, &lt;/P&gt;&lt;P&gt;ls_belnr type belnr_d, &lt;/P&gt;&lt;P&gt;ls_row type char10. &lt;/P&gt;&lt;P&gt;data: l_text type char128. &lt;/P&gt;&lt;P&gt;case sy-ucomm. &lt;/P&gt;&lt;P&gt;when 'RETURN' or 'BACK' or 'EXIT' or 'CANCEL'. &lt;/P&gt;&lt;P&gt;*... refresh the table in order to see the new data&lt;/P&gt;&lt;P&gt; gr_alv_2-&amp;gt;refresh( ). &lt;/P&gt;&lt;P&gt;leave to screen 0. &lt;/P&gt;&lt;P&gt;when others. &lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt; endmodule. " USER_COMMAND_0100 INPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 02:28:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/total-column-not-changed-between-header-detl-screen-on-diff-header-record/m-p/6074282#M1355990</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-11T02:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Total column not changed between Header &amp; Detl screen on diff header record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/total-column-not-changed-between-header-detl-screen-on-diff-header-record/m-p/6074283#M1355991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While calling second screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  data: lr_aggregations type ref to cl_salv_aggregations.

  lr_aggregations = gr_table-&amp;gt;get_aggregations( ).
  lr_aggregations-&amp;gt;add_aggregation( 'PRICE' ).    " Mention all column which you want SUM or TOTAL 

  lr_aggregations-&amp;gt;add_aggregation( 'QUANTITY' ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 02:46:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/total-column-not-changed-between-header-detl-screen-on-diff-header-record/m-p/6074283#M1355991</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-09-11T02:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Total column not changed between Header &amp; Detl screen on diff header record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/total-column-not-changed-between-header-detl-screen-on-diff-header-record/m-p/6074284#M1355992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick response but I still get same problem.&lt;/P&gt;&lt;P&gt; The records are total correctly but when I go to another header record and double click to go to second screen, the total column still showed data from previous detailed screen unless I click on the summary button two times (first time, the summary line disappear, second time it show the correct summary).&lt;/P&gt;&lt;P&gt; I did put the code you mentioned, but it did not solve the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 03:01:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/total-column-not-changed-between-header-detl-screen-on-diff-header-record/m-p/6074284#M1355992</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-11T03:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Total column not changed between Header &amp; Detl screen on diff header record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/total-column-not-changed-between-header-detl-screen-on-diff-header-record/m-p/6074285#M1355993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you need to clear aggregations for before calling second header record this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  data:
   lr_aggregations type ref to cl_salv_aggregations.
   lr_aggregations = gr_table-&amp;gt;get_aggregations( ).
   lr_aggregations-&amp;gt;clear( ). "&amp;lt;&amp;lt;=====
  try.
      lr_aggregations-&amp;gt;add_aggregation( columnname = 'PRICE' ).
      catch cx_salv_not_found cx_salv_data_error cx_salv_existing.
  endtry.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 03:13:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/total-column-not-changed-between-header-detl-screen-on-diff-header-record/m-p/6074285#M1355993</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-09-11T03:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Total column not changed between Header &amp; Detl screen on diff header record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/total-column-not-changed-between-header-detl-screen-on-diff-header-record/m-p/6074286#M1355994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And also clear all SORT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  data:
    lr_sorts type ref to cl_salv_sorts.  
   lr_sorts = gr_table-&amp;gt;get_sorts( ).
  lr_sorts-&amp;gt;clear( ).                   

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 03:20:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/total-column-not-changed-between-header-detl-screen-on-diff-header-record/m-p/6074286#M1355994</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-09-11T03:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Total column not changed between Header &amp; Detl screen on diff header record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/total-column-not-changed-between-header-detl-screen-on-diff-header-record/m-p/6074287#M1355995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.  It works now.  Points are awarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 03:35:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/total-column-not-changed-between-header-detl-screen-on-diff-header-record/m-p/6074287#M1355995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-11T03:35:55Z</dc:date>
    </item>
  </channel>
</rss>

