<?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: Bseg Table Issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620223#M277495</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 didnot get where should I use the your given code?&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 09:16:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-23T09:16:35Z</dc:date>
    <item>
      <title>Bseg Table Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620221#M277493</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;Below is my code, it taking much time to get the data from BSEG table and even after executing for long time it not populating the data into internal table. If i pass single account in selection screen, it is displaying the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT hkont lkorr FROM t030hb INTO CORRESPONDING FIELDS OF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                      TABLE gt_tr_t030hb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                      WHERE ktopl = 'ZCOA'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                      AND   bwber = 'TR'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                      and hkont in so_hkont.&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 gp_pprct IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at gt_tr_t030hb.&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;&lt;/P&gt;&lt;P&gt;                       FIELDS OF table gt_hkont for all entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                       in gt_tr_t030hb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                       WHERE bukrs IN so_bukrs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                       AND prctr IN so_prctr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                       AND saknr = gt_tr_t030hb-hkont&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                       AND vbund IN so_vbund&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                       and gjahr in so_gjahr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                       and xauto = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pavan.&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 08:57:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620221#M277493</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-23T08:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Bseg Table Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620222#M277494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT hkont lkorr FROM t030hb &amp;lt;b&amp;gt;INTO CORRESPONDING FIELDS&amp;lt;/b&amp;gt; OF TABLE gt_tr_t030hb reduces the performance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE ktopl = 'KCOA'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND bwber = 'TR'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and hkont in so_hkont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;IF gp_pprct IS NOT INITIAL.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;loop at gt_tr_t030hb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT hkont prctr bewar dmbe2 FROM bseg &amp;lt;b&amp;gt;INTO CORRESPONDING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELDS&amp;lt;/b&amp;gt; OF table gt_hkont for all entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in gt_tr_t030hb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE bukrs IN so_bukrs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND prctr IN so_prctr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND saknr = gt_tr_t030hb-hkont&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND vbund IN so_vbund&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and gjahr in so_gjahr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and xauto = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of the above code u check the below code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM F_MOVE_RECORDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LOOP AT &amp;lt;SELECTED INTERNAL TABLE NAME&amp;gt; INTO &amp;lt;SELECTED WORK AREA&amp;gt;.&lt;/P&gt;&lt;P&gt; READ &amp;lt;SELECTED INTERNAL TABLE NAME&amp;gt; INTO &amp;lt;SELECTED WORK AREA&amp;gt; WITH KEY ...&lt;/P&gt;&lt;P&gt; IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt; MOVE &amp;lt;SELECTED WORK AREA FIELDS&amp;gt; TO &amp;lt;OUTPUT WORK AREA FIELDS&amp;gt;.&lt;/P&gt;&lt;P&gt; APPEND &amp;lt;OUTPUT WORK AREA&amp;gt; TO &amp;lt;OUTPUT INTERNAL TABLE NAME&amp;gt;.&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt; CLEAR: &amp;lt;SELECTED WORK AREA&amp;gt;, &amp;lt;OUTPUT WORK AREA&amp;gt;.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                               " F_MOVE_RECORDS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Sep 2006 09:11:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620222#M277494</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-23T09:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Bseg Table Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620223#M277495</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 didnot get where should I use the your given code?&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 09:16:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620223#M277495</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-23T09:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Bseg Table Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620224#M277496</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;SELECT hkont lkorr FROM t030hb INTO CORRESPONDING FIELDS OF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLE gt_tr_t030hb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE ktopl = 'ZCOA'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND bwber = 'TR'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and hkont in so_hkont.&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 gp_pprct IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You don't need to do a LOOP in you use FOR ALL ENTRIES option:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*loop at gt_tr_t030hb.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUKRS and GJAHR are field key of BSEG do you should place at the top of WHERE condition&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;&amp;lt;b&amp;gt;WHERE bukrs IN so_bukrs&lt;/P&gt;&lt;P&gt;and gjahr in so_gjahr&amp;lt;/b&amp;gt;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you define gt_hkont  in this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF GT_HKONT,&lt;/P&gt;&lt;P&gt;hkont &lt;/P&gt;&lt;P&gt;prctr &lt;/P&gt;&lt;P&gt;bewar &lt;/P&gt;&lt;P&gt;dmbe2 &lt;/P&gt;&lt;P&gt;.............&lt;/P&gt;&lt;P&gt;END OF GT_HKONT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use INTO TABLE instead of INTO CORRESPONDING      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SELECT hkont prctr bewar dmbe2 FROM bseg INTO table&amp;lt;/b&amp;gt; gt_hkont for all entries&lt;/P&gt;&lt;P&gt;in gt_tr_t030hb&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;WHERE bukrs IN so_bukrs&lt;/P&gt;&lt;P&gt;and gjahr in so_gjahr&amp;lt;/b&amp;gt;&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 xauto = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to read G/L accounting item it's better to read BSIS/BSAS table instead of BSEG.&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 09:22:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620224#M277496</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-23T09:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Bseg Table Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620225#M277497</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;If I have to read the gl accounts, dmbe2 and prctr from bseg instead of bseg how to refer to BSIS/BSAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u give me the code,&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 09:38:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620225#M277497</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-23T09:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Bseg Table Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620226#M277498</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 chnaged the code as you mentioned still it is taking time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how to resolve 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 09:42:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620226#M277498</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-23T09:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Bseg Table Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620227#M277499</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; - never access BSEG records directly without fully specified key GJAHR BUKRS BELNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First get the key values from secondary index tables as there are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BSAD Accounting- Secondary Index for Customers (Cleared Items)&lt;/P&gt;&lt;P&gt;BSAK Accounting- Secondary Index for Vendors (Cleared Items)&lt;/P&gt;&lt;P&gt;BSAS Accounting- Secondary Index for G/L Accounts (Cleared Items)&lt;/P&gt;&lt;P&gt;BSEC One-Time Account Data Document Segment&lt;/P&gt;&lt;P&gt;BSID Accounting- Secondary Index for Customers&lt;/P&gt;&lt;P&gt;BSIK Accounting- Secondary Index for Vendors&lt;/P&gt;&lt;P&gt;BSIM Secondary Index, Documents for Material&lt;/P&gt;&lt;P&gt;BSIS Accounting- Secondary Index for G/L Accounts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement about performance reduction using INTO CORRESPONDING FIELDS is a widely-believed but never prooved urban legend. INTO CORRESPONDING FIELDS is evaluated once per database access and translated into ligtning-fast moves. It will ensure that the result is always correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may significantly gain performance selecting only the field you really need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Sep 2006 09:48:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620227#M277499</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2006-09-23T09:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Bseg Table Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620228#M277500</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;Try to select the items from BSIS/BSAS:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- One solution can be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: BSIS.&lt;/P&gt;&lt;P&gt;DATA:  GT_TR_T030HB LIKE STANDARD TABLE OF  T030HB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: SO_BUKRS FOR BSIS-BUKRS,&lt;/P&gt;&lt;P&gt;                SO_HKONT FOR BSIS-HKONT,&lt;/P&gt;&lt;P&gt;                SO_GJAHR FOR BSIS-GJAHR,&lt;/P&gt;&lt;P&gt;                SO_PRCTR FOR BSIS-PRCTR,&lt;/P&gt;&lt;P&gt;                SO_VBUND FOR BSIS-VBUND.&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;        BUKRS LIKE BSIS-BUKRS,&lt;/P&gt;&lt;P&gt;        HKONT LIKE BSIS-HKONT,&lt;/P&gt;&lt;P&gt;        GJAHR LIKE BSIS-GJAHR,&lt;/P&gt;&lt;P&gt;        BELNR LIKE BSIS-BELNR,&lt;/P&gt;&lt;P&gt;        BUZEI LIKE BSIS-BUZEI,&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_HKONT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: XAUTO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM T030HB INTO TABLE GT_TR_T030HB&lt;/P&gt;&lt;P&gt;                    WHERE HKONT IN SO_HKONT&lt;/P&gt;&lt;P&gt;.......................................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Open Items (BSIS)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT BUKRS HKONT GJAHR BELNR BUZEI&lt;/P&gt;&lt;P&gt;       PRCTR BEWAR DMBE2&lt;/P&gt;&lt;P&gt;       FROM BSIS INTO TABLE GT_HKONT&lt;/P&gt;&lt;P&gt;        FOR ALL ENTRIES IN GT_TR_T030HB&lt;/P&gt;&lt;P&gt;                      WHERE BUKRS IN SO_BUKRS&lt;/P&gt;&lt;P&gt;                        AND HKONT = GT_TR_T030HB-HKONT&lt;/P&gt;&lt;P&gt;                        AND GJAHR IN SO_GJAHR&lt;/P&gt;&lt;P&gt;                        AND PRCTR IN SO_PRCTR&lt;/P&gt;&lt;P&gt;                        AND VBUND IN SO_VBUND.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Cleared items&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT BUKRS HKONT GJAHR BELNR BUZEI&lt;/P&gt;&lt;P&gt;       PRCTR BEWAR DMBE2&lt;/P&gt;&lt;P&gt;       FROM BSAS APPENDING TABLE GT_HKONT&lt;/P&gt;&lt;P&gt;        FOR ALL ENTRIES IN GT_TR_T030HB&lt;/P&gt;&lt;P&gt;                      WHERE BUKRS IN SO_BUKRS&lt;/P&gt;&lt;P&gt;                        AND HKONT = GT_TR_T030HB-HKONT&lt;/P&gt;&lt;P&gt;                        AND GJAHR IN SO_GJAHR&lt;/P&gt;&lt;P&gt;                        AND PRCTR IN SO_PRCTR&lt;/P&gt;&lt;P&gt;                        AND VBUND IN SO_VBUND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If you need to check if the item is automatically loaded:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT GT_HKONT.&lt;/P&gt;&lt;P&gt;  SELECT SINGLE XAUTO FROM BSEG INTO XAUTO&lt;/P&gt;&lt;P&gt;                                WHERE BUKRS = GT_HKONT-BUKRS&lt;/P&gt;&lt;P&gt;                                  AND BELNR = GT_HKONT-BELNR&lt;/P&gt;&lt;P&gt;                                  AND GJAHR = GT_HKONT-GJAHR&lt;/P&gt;&lt;P&gt;                                  AND BUZEI = GT_HKONT-BUZEI.&lt;/P&gt;&lt;P&gt;  IF XAUTO = SPACE.&lt;/P&gt;&lt;P&gt;    DELETE GT_HKONT.&lt;/P&gt;&lt;P&gt;  ENDIF.&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;Other solution can be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: BSIS.&lt;/P&gt;&lt;P&gt;DATA:  GT_TR_T030HB LIKE STANDARD TABLE OF  T030HB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: SO_BUKRS FOR BSIS-BUKRS,&lt;/P&gt;&lt;P&gt;                SO_HKONT FOR BSIS-HKONT,&lt;/P&gt;&lt;P&gt;                SO_GJAHR FOR BSIS-GJAHR,&lt;/P&gt;&lt;P&gt;                SO_PRCTR FOR BSIS-PRCTR,&lt;/P&gt;&lt;P&gt;                SO_VBUND FOR BSIS-VBUND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF T_DOCUMENT OCCURS 0,&lt;/P&gt;&lt;P&gt;        BUKRS LIKE BSIS-BUKRS,&lt;/P&gt;&lt;P&gt;        GJAHR LIKE BSIS-GJAHR,&lt;/P&gt;&lt;P&gt;        BELNR LIKE BSIS-BELNR,&lt;/P&gt;&lt;P&gt;        BUZEI LIKE BSIS-BUZEI,&lt;/P&gt;&lt;P&gt;      END   OF T_DOCUMENT.&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;        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: XAUTO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Open Items (BSIS)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT BUKRS GJAHR BELNR BUZEI&lt;/P&gt;&lt;P&gt;       FROM BSIS INTO TABLE T_DOCUMENT&lt;/P&gt;&lt;P&gt;        FOR ALL ENTRIES IN GT_TR_T030HB&lt;/P&gt;&lt;P&gt;                      WHERE BUKRS IN SO_BUKRS&lt;/P&gt;&lt;P&gt;                        AND HKONT = GT_TR_T030HB-HKONT&lt;/P&gt;&lt;P&gt;                        AND GJAHR IN SO_GJAHR&lt;/P&gt;&lt;P&gt;                        AND PRCTR IN SO_PRCTR&lt;/P&gt;&lt;P&gt;                        AND VBUND IN SO_VBUND.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Cleared items&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT BUKRS GJAHR BELNR BUZEI&lt;/P&gt;&lt;P&gt;       FROM BSAS INTO TABLE T_DOCUMENT&lt;/P&gt;&lt;P&gt;        FOR ALL ENTRIES IN GT_TR_T030HB&lt;/P&gt;&lt;P&gt;                      WHERE BUKRS IN SO_BUKRS&lt;/P&gt;&lt;P&gt;                        AND HKONT = GT_TR_T030HB-HKONT&lt;/P&gt;&lt;P&gt;                        AND GJAHR IN SO_GJAHR&lt;/P&gt;&lt;P&gt;                        AND PRCTR IN SO_PRCTR&lt;/P&gt;&lt;P&gt;                        AND VBUND IN SO_VBUND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Auto items&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT HKONT PRCTR BEWAR DMBE2&lt;/P&gt;&lt;P&gt;       FROM BSEG INTO TABLE GT_HKONT&lt;/P&gt;&lt;P&gt;        FOR ALL ENTRIES IN T_DOCUMENT&lt;/P&gt;&lt;P&gt;                      WHERE BUKRS = T_DOCUMENT-BUKRS &lt;/P&gt;&lt;P&gt;                        AND BELNR = T_DOCUMENT-BELNR&lt;/P&gt;&lt;P&gt;                        AND GJAHR = T_DOCUMENT-GJAHR&lt;/P&gt;&lt;P&gt;                        AND BUZEI = T_DOCUMENT-BUZEI&lt;/P&gt;&lt;P&gt;                        AND XAUTO = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try&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 10:26:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bseg-table-issue/m-p/1620228#M277500</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-23T10:26:26Z</dc:date>
    </item>
  </channel>
</rss>

