<?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: ADRC table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/adrc-table/m-p/7398397#M1546511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;READ statement will only select one entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say, you have 2 entries in your internal table lt_adrc with adrnr 0001&lt;/P&gt;&lt;P&gt;i.e Customer ABC and Customer XYZ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, READ statement will always only fetch the first row that fulfills the condition. i.e. Customer ABC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Oct 2010 05:10:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-10-14T05:10:49Z</dc:date>
    <item>
      <title>ADRC table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adrc-table/m-p/7398395#M1546509</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; My query is that ADRC table has 2 entries for a customer... in the below logic I am getting only 1 entry detail of that customer in the O/P table ... how to get both in the output table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;SB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Preparing output table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF mt_flag = ''.&lt;/P&gt;&lt;P&gt;  LOOP AT lt_vbrk INTO lw_vbrk.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read table ZVATCN&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    READ TABLE lt_zvatcn INTO lw_zvatcn WITH KEY vbeln = lw_vbrk-vbeln.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      lw_output-vbeln  = lw_zvatcn-vbeln.&lt;/P&gt;&lt;P&gt;      lw_output-zvatcn = lw_zvatcn-zvatcn.&lt;/P&gt;&lt;P&gt;      lw_output-zcrdat = lw_zvatcn-zcrdat.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read tavle VBRP&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     READ TABLE lt_vbrp INTO lw_vbrp WITH KEY vbeln = lw_vbrk-vbeln.&lt;/P&gt;&lt;P&gt;       IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;         lw_output-fkimg   = lw_vbrp-fkimg.&lt;/P&gt;&lt;P&gt;         lw_output-meins   = lw_vbrp-meins.&lt;/P&gt;&lt;P&gt;         lw_output-matnr   = lw_vbrp-matnr.&lt;/P&gt;&lt;P&gt;         lw_output-arktx   = lw_vbrp-arktx.&lt;/P&gt;&lt;P&gt;         lw_output-net_amt = lw_vbrp-netwr + lw_vbrp-mwsbp.&lt;/P&gt;&lt;P&gt;       ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read table KNA1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      READ TABLE lt_vbrk_kna1 INTO lw_vbrk_kna1 WITH KEY kunnr = lw_vbrk-kunag&lt;/P&gt;&lt;P&gt;                                                         land1 = lw_vbrk-land1.&lt;/P&gt;&lt;P&gt;        IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;          READ TABLE lt_adrc INTO lw_adrc WITH KEY addrnumber = lw_vbrk_kna1-adrnr&lt;/P&gt;&lt;P&gt;                                                   country    = lw_vbrk_kna1-land1.&lt;/P&gt;&lt;P&gt;           IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;             lw_output-name   = lw_adrc-name1.&lt;/P&gt;&lt;P&gt;             lw_output-nation = lw_adrc-nation.&lt;/P&gt;&lt;P&gt;           ENDIF.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      lw_output-bstnk_vf = lw_vbrk-bstnk_vf.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    APPEND lw_output TO lt_output.&lt;/P&gt;&lt;P&gt;    clear :  lw_output-vbeln, lw_output-name, lw_output-nation,lw_output-arktx,&lt;/P&gt;&lt;P&gt;             lw_output-matnr, lw_output-meins,lw_output-fkimg, lw_output-net_amt,&lt;/P&gt;&lt;P&gt;             lw_output-bstnk_vf, lw_output-zvatcn, lw_output-zcrdat.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 03:03:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adrc-table/m-p/7398395#M1546509</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-14T03:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: ADRC table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adrc-table/m-p/7398396#M1546510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are looping at  vbrk table. where vbeln is unique key so one iteration.&lt;/P&gt;&lt;P&gt;now you read adrc so it will give you only one hit =&amp;gt; one entry into o/p table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you loop executes for second time for same vbeln  then you will have the same entry getting duplicated into the o/p table from ADRC.&lt;/P&gt;&lt;P&gt;ADRC may have two entries for that  address_number based on date and natio of key combination but read statement will pick only one entry .&lt;/P&gt;&lt;P&gt;here you need to check that one loop iteration with a read inside will yield only one entry from adrc .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 04:26:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adrc-table/m-p/7398396#M1546510</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-14T04:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: ADRC table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adrc-table/m-p/7398397#M1546511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;READ statement will only select one entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say, you have 2 entries in your internal table lt_adrc with adrnr 0001&lt;/P&gt;&lt;P&gt;i.e Customer ABC and Customer XYZ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, READ statement will always only fetch the first row that fulfills the condition. i.e. Customer ABC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 05:10:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adrc-table/m-p/7398397#M1546511</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-14T05:10:49Z</dc:date>
    </item>
  </channel>
</rss>

