<?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: VA0# - internal address table? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160390#M456921</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Rich, thanks for the help.  How do I find the new&lt;/P&gt;&lt;P&gt;&amp;gt; address number?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Suresh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;deleted.. irrelevant response&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Suresh Datti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 May 2007 18:13:13 GMT</pubDate>
    <dc:creator>suresh_datti</dc:creator>
    <dc:date>2007-05-03T18:13:13Z</dc:date>
    <item>
      <title>VA0# - internal address table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160385#M456916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody.  When we create a sales order and override the ship-to address I need to find out where that new address is stored.  I imagine there is some internal table that stores that address.  We want to be able to print that new address in a z-report.  Does anybody have any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 18:06:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160385#M456916</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T18:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: VA0# - internal address table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160386#M456917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the new address is stored in table like ADRC and ADRP.  You would use the ADRNR number and go to these tables to get the address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 18:09:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160386#M456917</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-05-03T18:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: VA0# - internal address table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160387#M456918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rich, thanks for the help.  How do I find the new address number?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 18:10:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160387#M456918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T18:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: VA0# - internal address table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160388#M456919</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 can check it in the VBPA for the partner function 'WE'..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get the address number ADRNR from VBPA for the partner function 'WE'..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use the address number in the table ADRC to get the details..&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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 18:11:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160388#M456919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T18:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: VA0# - internal address table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160389#M456920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For example, he is some code which is in our shipping label print program, it gets the dynamic address from the sales document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


* Get ship to partner
  clear xvbpa.
  select single * into xvbpa
           from vbpa
               where vbeln = xvbak-vbeln
                 and parvw = 'WE'.             " &amp;lt;- Ship To Partner


* Get address from address table.
  clear xadrc.
  select single * into xadrc
           from adrc
                 where addrnumber = xvbpa-adrnr       "&amp;lt;- ADRNR from partner
                   and date_to    = '99991231'.

  xout-name1  = xadrc-name1.
  xout-street = xadrc-street.
  xout-city1  = xadrc-city1.
  xout-region = xadrc-region.
  xout-post_code1 = xadrc-post_code1.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 18:11:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160389#M456920</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-05-03T18:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: VA0# - internal address table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160390#M456921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Rich, thanks for the help.  How do I find the new&lt;/P&gt;&lt;P&gt;&amp;gt; address number?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Suresh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;deleted.. irrelevant response&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Suresh Datti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 18:13:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160390#M456921</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2007-05-03T18:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: VA0# - internal address table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160391#M456922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rich, thanks a lot for that piece of code.  I am going to try that out right now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 18:14:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160391#M456922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T18:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: VA0# - internal address table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160392#M456923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are trying to get this in a Z report, you will have to go from VBAK to VBPA using VBELN and the partner function if your partners for the sales document are defined at the header level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE ADRNR FROM VBPA WHERE VBELN = VBAK-VBELN AND POSNR = '000000' AND PARVW = 'WE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your partners for the document are at an item level, you will have to go to VBPA from VBAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE ADRNR FROM VBPA WHERE VBELN = VBAP-VBELN AND POSNR = VBAP-POSNR AND PARVW = 'WE'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 18:19:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160392#M456923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T18:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: VA0# - internal address table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160393#M456924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rich, that works wonders.  How can I do this using "for all entries"?  I know how to write those select statements but I don't know how to tie the address numbers from adrc to the entries in the internal table.  I hope that makes sense.  Below is code I have so far (thanks to your help).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT it_detail INTO wa_detail.
  CLEAR: wa_vbpa,
         wa_adrc.
  SELECT SINGLE * INTO wa_vbpa FROM vbpa
    WHERE vbeln = wa_detail-vbeln
    AND parvw = 'WE'.

  SELECT SINGLE * INTO wa_adrc
    FROM adrc
    WHERE addrnumber = wa_vbpa-adrnr
    AND date_to = '99991231'.
  wa_detail-we_num = wa_vbpa-kunnr.
  wa_detail-we_name = wa_adrc-name1.
  wa_detail-we_name2 = wa_adrc-name2.
  wa_detail-we_street = wa_adrc-street.
  wa_detail-we_city = wa_adrc-city1.
  wa_detail-we_state = wa_adrc-region.
  wa_detail-we_zip = wa_adrc-post_code1.
  wa_detail-we_tel = wa_adrc-tel_number.
  MODIFY it_detail FROM wa_detail.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 18:45:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160393#M456924</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T18:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: VA0# - internal address table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160394#M456925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Didn't test it, but this may work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


types: begin of ttmp,
        vbeln type vbak-vbeln,
        kunnr type vbpa-kunnr,
        name1 type adrc-name1,
        name2 type adrc-name2,
        street type adrc-street,
        city1 type adrc-city1,
        region type adrc-region,
        post_code1 type adrc-post_code1,
        tel_number type adrc-tel_number,
       end of ttmp.

data: it_detail type table of tdet.
data: wa_detail like line of it_detail.

data: itmp type table of ttmp.
data: xtmp like line of itmp.


* FILL IT_DETAIL HERE


sort it_detail ascending by vbeln.
select * into corresponding fields of table itmp
          from vbpa
              inner join adrc
                  on vbpa~adrnr = adrc~ADDRNUMBER
                         for all entries in it_detail
                                  where vbpa~vbeln = it_detail-vbeln
                                    and vbpa~parvw = 'WE'.

loop at it_detail into wa_detail.

  read table itmp into xtmp with key vbeln = wa_detail-vbeln.
  if sy-subrc  = 0.
    wa_detail-we_num = xtmp-kunnr.
    wa_detail-we_name = xtmp-name1.
    wa_detail-we_name2 = xtmp-name2.
    wa_detail-we_street = xtmp-street.
    wa_detail-we_city = xtmp-city1.
    wa_detail-we_state = xtmp-region.
    wa_detail-we_zip = xtmp-post_code1.
    wa_detail-we_tel = xtmp-tel_number.
    modify it_detail from wa_detail.
  endif.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 19:08:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160394#M456925</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-05-03T19:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: VA0# - internal address table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160395#M456926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rich, thanks for your help.  I actually figured it out right before you posted.  The sad thing is I had the whole problem already answered in my program but I didn't realize it; I was just putting it in the wrong internal table.  Thanks again for all of your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 19:15:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va0-internal-address-table/m-p/2160395#M456926</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T19:15:06Z</dc:date>
    </item>
  </channel>
</rss>

