<?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 Totals internal table without header. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/totals-internal-table-without-header/m-p/8151461#M1621363</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Guys, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to sum WRBTR in  my internal table based of transparent table regup , i need to do that using to fields the first one kunnr and the second one is xref1 this field for my customer is a like a sub-kunnr . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i declare the following structure: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : ti_regup  type standard table of regup.

field-symbol: &amp;lt;wa_regup&amp;gt; like line of ti_regup.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my problem is that i dont know how to get this total, i guess if i use a internal table i could use a collect , but it doesnt work anyway because WRBTR only have the amounts no the sign of the amount i need to read other field SHKZG to know if it is necessary substrac or add to get the total.  any ideas ? thank you guys&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Aug 2011 09:38:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-08-22T09:38:20Z</dc:date>
    <item>
      <title>Totals internal table without header.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/totals-internal-table-without-header/m-p/8151461#M1621363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Guys, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to sum WRBTR in  my internal table based of transparent table regup , i need to do that using to fields the first one kunnr and the second one is xref1 this field for my customer is a like a sub-kunnr . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i declare the following structure: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : ti_regup  type standard table of regup.

field-symbol: &amp;lt;wa_regup&amp;gt; like line of ti_regup.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my problem is that i dont know how to get this total, i guess if i use a internal table i could use a collect , but it doesnt work anyway because WRBTR only have the amounts no the sign of the amount i need to read other field SHKZG to know if it is necessary substrac or add to get the total.  any ideas ? thank you guys&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2011 09:38:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/totals-internal-table-without-header/m-p/8151461#M1621363</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-22T09:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Totals internal table without header.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/totals-internal-table-without-header/m-p/8151462#M1621364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: begin of itab occurs 0.
data: xkunnr type kna1-kunnr.
data: xxref1 type regup-xref1.
include structure regup.
data: end of itab.

loop at it_regup.
 move-corresponding it_regup to itab.
 move it_regup-kunnr to itab-xkunnr.
 move it_regup-xref1 to itab-xxref1.
 append itab.
endloop.

sort itab by xkunnr xxref1.
loop at itab.
 at end of xkunnr.
   move 'X' to v_flg.
 endat.
 at end of xxref1.
   move 'X' to v_flg.
 endat.
 if itab-SHKZG eq 'S'.
    v_total = v_total + itab-wrbtr.
 else.
     v_total = v_total - itab-wrbtr.
 endif.

 if v_flg eq 'X'.
   move-corresponding itab to itab1.
   move v_total to itab1-total.
   append itab1.
   clear:v_flg, v_total.
 endif.
endloop.

&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>Mon, 22 Aug 2011 09:47:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/totals-internal-table-without-header/m-p/8151462#M1621364</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2011-08-22T09:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Totals internal table without header.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/totals-internal-table-without-header/m-p/8151463#M1621365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The only way is using internal tables with occurs 0?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2011 10:06:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/totals-internal-table-without-header/m-p/8151463#M1621365</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-22T10:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Totals internal table without header.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/totals-internal-table-without-header/m-p/8151464#M1621366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no you can use workarea also i just given you an example with occurs 0&lt;/P&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>Mon, 22 Aug 2011 10:13:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/totals-internal-table-without-header/m-p/8151464#M1621366</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2011-08-22T10:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Totals internal table without header.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/totals-internal-table-without-header/m-p/8151465#M1621367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you very much for your answers , just one final  question , what is itab1?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2011 16:35:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/totals-internal-table-without-header/m-p/8151465#M1621367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-22T16:35:16Z</dc:date>
    </item>
  </channel>
</rss>

