<?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: Two internal table join in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-table-join/m-p/7027836#M1498951</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi i have use read statement but it doesn't seems to work..here is part of my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 SELECT VOIDR
            CHECV
            CHECT
            ZBUKR
            GJAHR
            VBLNR
            FROM PAYR
         INTO CORRESPONDING FIELDS OF TABLE GT_PAYR
         FOR ALL ENTRIES IN GT_BKPF2
         WHERE ZBUKR = GT_BKPF2-BUKRS
           AND GJAHR = GT_BKPF2-GJAHR
           AND VBLNR = GT_BKPF2-BELNR.

*IF NOT GT_PAYR[] IS INITIAL.
*
*      SORT GT_PAYR BY ZBUKR GJAHR VBLNR.
*
*ENDIF.


* Get all documents except parked document.
    LOOP AT gt_bseg INTO wa_bseg.


      AT NEW gjahr.
        CLEAR: wa_bkpf, wa_ce40001_awkey, gt_PAYR.
        READ TABLE gt_bkpf INTO wa_bkpf WITH KEY bukrs = wa_bseg-bukrs
                                                 belnr = wa_bseg-belnr
                                                 gjahr = wa_bseg-gjahr.

       READ TABLE gt_PAYR WITH KEY               ZBUKR = wa_bseg-bukrs
                                                 VBLNR = wa_bseg-belnr
                                                 gjahr = wa_bseg-gjahr.


      ENDAT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jun 2010 09:12:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-06-16T09:12:40Z</dc:date>
    <item>
      <title>Two internal table join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-table-join/m-p/7027834#M1498949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi i am trying to pass some values from one internal table to another..the problem is my 1st internal table ( GT_BKPF2) is smaller than my 2nd internal table (GT_PAYR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EX: GT_BKPF2 has one document no with two line items&lt;/P&gt;&lt;P&gt;      GT_PAYR has one document number corresponding to GT_BKPF2 but it consist of 5 void check which i would like to display.But my report will only show the 1st void check and print beside the two line items and not the remanining...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should i be doing a loop statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 08:56:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-table-join/m-p/7027834#M1498949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-16T08:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Two internal table join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-table-join/m-p/7027835#M1498950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you can very well Use loop if you don't have  any perfromance issue  ( Use Parallel Cursor...) , but more preferred you can use READ statement with KEY addition to it. (check subrc fro successful read )..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 09:08:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-table-join/m-p/7027835#M1498950</guid>
      <dc:creator>anup_deshmukh4</dc:creator>
      <dc:date>2010-06-16T09:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Two internal table join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-table-join/m-p/7027836#M1498951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi i have use read statement but it doesn't seems to work..here is part of my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 SELECT VOIDR
            CHECV
            CHECT
            ZBUKR
            GJAHR
            VBLNR
            FROM PAYR
         INTO CORRESPONDING FIELDS OF TABLE GT_PAYR
         FOR ALL ENTRIES IN GT_BKPF2
         WHERE ZBUKR = GT_BKPF2-BUKRS
           AND GJAHR = GT_BKPF2-GJAHR
           AND VBLNR = GT_BKPF2-BELNR.

*IF NOT GT_PAYR[] IS INITIAL.
*
*      SORT GT_PAYR BY ZBUKR GJAHR VBLNR.
*
*ENDIF.


* Get all documents except parked document.
    LOOP AT gt_bseg INTO wa_bseg.


      AT NEW gjahr.
        CLEAR: wa_bkpf, wa_ce40001_awkey, gt_PAYR.
        READ TABLE gt_bkpf INTO wa_bkpf WITH KEY bukrs = wa_bseg-bukrs
                                                 belnr = wa_bseg-belnr
                                                 gjahr = wa_bseg-gjahr.

       READ TABLE gt_PAYR WITH KEY               ZBUKR = wa_bseg-bukrs
                                                 VBLNR = wa_bseg-belnr
                                                 gjahr = wa_bseg-gjahr.


      ENDAT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 09:12:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/two-internal-table-join/m-p/7027836#M1498951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-16T09:12:40Z</dc:date>
    </item>
  </channel>
</rss>

