<?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: Loop controls in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-controls/m-p/1621214#M277959</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;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can please let know where to use the write statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pavan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 23 Sep 2006 13:14:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-23T13:14:29Z</dc:date>
    <item>
      <title>Loop controls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-controls/m-p/1621212#M277957</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;I have an internal table like below : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HKONT     BLART  PRCTR    DMBE2&lt;/P&gt;&lt;P&gt;123       ZC     5855     1985&lt;/P&gt;&lt;P&gt;123       ZC     5855     9855&lt;/P&gt;&lt;P&gt;124       AB     5842     10000&lt;/P&gt;&lt;P&gt;124       AB     5842     20000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the output as below : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HKONT    BLART   PRCTR    DMBE2&lt;/P&gt;&lt;P&gt;123      ZC      5855     11840&lt;/P&gt;&lt;P&gt;124      AB      5842     30000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how to achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pavan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Sep 2006 12:36:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-controls/m-p/1621212#M277957</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-23T12:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Loop controls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-controls/m-p/1621213#M277958</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;You should use the COLLECT statament but you should consider the sign of the item, if I remember u've picked up these informations by accounting items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U should check the field SHKZG (Debit/Credit Indicator) to determine the sign:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF GT_HKONT OCCURS 0,&lt;/P&gt;&lt;P&gt;       HKONT LIKE BSIS-HKONT,&lt;/P&gt;&lt;P&gt;       PRCTR LIKE BSIS-PRCTR,&lt;/P&gt;&lt;P&gt;       BEWAR LIKE BSIS-BEWAR,&lt;/P&gt;&lt;P&gt;       SHKZG LIKE BSIS-SHKZG,       &lt;/P&gt;&lt;P&gt;       DMBE2 LIKE BSIS-DMBE2,&lt;/P&gt;&lt;P&gt;     END OF GT_HKONT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF GT_HKONT2 OCCURS 0,&lt;/P&gt;&lt;P&gt;       HKONT LIKE BSIS-HKONT,&lt;/P&gt;&lt;P&gt;       PRCTR LIKE BSIS-PRCTR,&lt;/P&gt;&lt;P&gt;       BEWAR LIKE BSIS-BEWAR,&lt;/P&gt;&lt;P&gt;       DMBE2 LIKE BSIS-DMBE2,&lt;/P&gt;&lt;P&gt;     END OF GT_HKONT2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT GT_HKONT.&lt;/P&gt;&lt;P&gt;  GT_HKONT2-HKONT = GT_HKONT-HKONT.&lt;/P&gt;&lt;P&gt;  GT_HKONT2-PRCTR = GT_HKONT-PRCTR.&lt;/P&gt;&lt;P&gt;  GT_HKONT2-BEWAR = GT_HKONT-BEWAR.&lt;/P&gt;&lt;P&gt;  GT_HKONT2-DMBE2 = GT_HKONT-DMBE2.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  IF GT_HKONT-SHKZG = 'H'.&lt;/P&gt;&lt;P&gt;    GT_HKONT2-DMBE2 = - GT_HKONT2-DMBE2. &lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  COLLECT GT_HKONT2.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you've solved your previous post: &lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2443595"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;close it please! and reward the posts were helfull for u&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Sep 2006 12:53:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-controls/m-p/1621213#M277958</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-23T12:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Loop controls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-controls/m-p/1621214#M277959</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;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can please let know where to use the write statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pavan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Sep 2006 13:14:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-controls/m-p/1621214#M277959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-23T13:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Loop controls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-controls/m-p/1621215#M277960</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;After selecting the data, you have used INTO TABLE option so you need to use another internal table to collect the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know which solution to select the data (from BSEG? or BSAS/BSIS?) you have adopted, anyway in your previuos post you wrote this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT hkont prctr bewar dmbe2 FROM bseg INTO CORRESPONDING&lt;/P&gt;&lt;P&gt;FIELDS OF table gt_hkont for all entries&lt;/P&gt;&lt;P&gt;in gt_tr_t030hb&lt;/P&gt;&lt;P&gt;WHERE bukrs IN so_bukrs&lt;/P&gt;&lt;P&gt;AND prctr IN so_prctr&lt;/P&gt;&lt;P&gt;AND saknr = gt_tr_t030hb-hkont&lt;/P&gt;&lt;P&gt;AND vbund IN so_vbund&lt;/P&gt;&lt;P&gt;and gjahr in so_gjahr&lt;/P&gt;&lt;P&gt;and xauto = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you colletc the data using the code I wrote above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Sep 2006 13:17:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-controls/m-p/1621215#M277960</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-23T13:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Loop controls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-controls/m-p/1621216#M277961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Pavan Panduru&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Sep 2006 13:30:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-controls/m-p/1621216#M277961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-23T13:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Loop controls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-controls/m-p/1621217#M277962</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF gt_lkorr-gjahr EQ lv_year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change this piece:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*gt_lkorr-hkont = wa_lkorr-hkont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*gt_lkorr-prctr = wa_lkorr-prctr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*gt_lkorr-bewar = wa_lkorr-bewar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*gt_lkorr-dmbe2 = wa_lkorr-dmbe2.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF gt_lkorr-gjahr EQ lv_year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_lkorr-hkont = gt_lkorr-hkont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_lkorr-prctr = gt_lkorr-prctr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_lkorr-bewar = gt_lkorr-bewar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_lkorr-dmbe2 = gt_lkorr-dmbe2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLLECT wa_lkorr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Sep 2006 13:37:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-controls/m-p/1621217#M277962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-23T13:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Loop controls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-controls/m-p/1621218#M277963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks MAX,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Sep 2006 13:39:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-controls/m-p/1621218#M277963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-23T13:39:20Z</dc:date>
    </item>
  </channel>
</rss>

