<?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: Function module to update vendor communication address in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-update-vendor-communication-address/m-p/2436412#M545028</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to call function module 'ADDR_MEMORY_SAVE' as well. Maybe that already solves your problem...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, here's an example that works for me. It does use a macro though... Not nice but flexible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* ----------------------------------------------------------------------
* DEFINITION
* ----------------------------------------------------------------------
  DEFINE comm_maintain.

    refresh i_ad&amp;amp;1.
    clear i_ad&amp;amp;1.
    i_ad&amp;amp;1-&amp;amp;2 = &amp;amp;3.
    i_ad&amp;amp;1-updateflag = &amp;amp;6.
    i_ad&amp;amp;1-consnumber = &amp;amp;7.
    append i_ad&amp;amp;1.

    call function 'ADDR_COMM_MAINTAIN'
         exporting
              address_number                 = address_number
              language                       = sy-langu
              table_type                     = 'AD&amp;amp;1'
              substitute_all_comm_data       = &amp;amp;4
              accept_telnr_call              = ' '
              consider_consnumber_for_insert = &amp;amp;5
              check_address                  = 'X'
         tables
              comm_table                     = i_ad&amp;amp;1
              error_table                    = error_table
         exceptions
              parameter_error                = 1
              address_not_exist              = 2
              internal_error                 = 3
              others                         = 4.
    if sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
  END-OF-DEFINITION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* ----------------------------------------------------------------------
* Fill structures and corresponding ITAB
* &amp;lt;Comm_Structure&amp;gt;-&amp;lt;Field_name&amp;gt; = &amp;lt;Value&amp;gt;
* ----------------------------------------------------------------------
  IF NOT telephone IS INITIAL.
    comm_maintain tel  tel_number telephone 'X' ' ' '' ''.
  ENDIF.

  IF NOT fax IS INITIAL.
    comm_maintain fax  fax_number fax 'X' ' ' '' ''.
  ENDIF.

  IF NOT teletex IS INITIAL.
    comm_maintain ttx  ttx_number teletex 'X' ' ' '' ''.
  ENDIF.

  IF NOT telex IS INITIAL.
    comm_maintain tlx  tlx_number telex 'X' ' ' '' ''.
  ENDIF.

  IF NOT email IS INITIAL.
    comm_maintain smtp smtp_addr  email 'X' ' ' '' ''.
  ENDIF.

  CALL FUNCTION 'ADDR_MEMORY_SAVE'
       EXCEPTIONS
            OTHERS = 1.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE 'A' NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh yes... The internal tables:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: i_adtel like table of adtel with header line.
  DATA: i_adfax like table of adfax with header line.
  DATA: i_adttx like table of adttx with header line.
  DATA: i_adtlx like table of adtlx with header line.
  DATA: i_adsmtp like table of adsmtp with header line.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Jun 2007 09:26:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-27T09:26:25Z</dc:date>
    <item>
      <title>Function module to update vendor communication address</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-update-vendor-communication-address/m-p/2436410#M545026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Can anyone give me an idea,which function module is used to update vendor communication address details.As I have tried the function module 'ADDR_SAVE_INTERN' but there is no web address field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**points will be rewarded&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naresh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2007 07:37:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-update-vendor-communication-address/m-p/2436410#M545026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-27T07:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to update vendor communication address</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-update-vendor-communication-address/m-p/2436411#M545027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at ADDR_COMM_MAINTAIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a complicated one though...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2007 09:22:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-update-vendor-communication-address/m-p/2436411#M545027</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-27T09:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to update vendor communication address</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-update-vendor-communication-address/m-p/2436412#M545028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to call function module 'ADDR_MEMORY_SAVE' as well. Maybe that already solves your problem...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, here's an example that works for me. It does use a macro though... Not nice but flexible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* ----------------------------------------------------------------------
* DEFINITION
* ----------------------------------------------------------------------
  DEFINE comm_maintain.

    refresh i_ad&amp;amp;1.
    clear i_ad&amp;amp;1.
    i_ad&amp;amp;1-&amp;amp;2 = &amp;amp;3.
    i_ad&amp;amp;1-updateflag = &amp;amp;6.
    i_ad&amp;amp;1-consnumber = &amp;amp;7.
    append i_ad&amp;amp;1.

    call function 'ADDR_COMM_MAINTAIN'
         exporting
              address_number                 = address_number
              language                       = sy-langu
              table_type                     = 'AD&amp;amp;1'
              substitute_all_comm_data       = &amp;amp;4
              accept_telnr_call              = ' '
              consider_consnumber_for_insert = &amp;amp;5
              check_address                  = 'X'
         tables
              comm_table                     = i_ad&amp;amp;1
              error_table                    = error_table
         exceptions
              parameter_error                = 1
              address_not_exist              = 2
              internal_error                 = 3
              others                         = 4.
    if sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
  END-OF-DEFINITION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* ----------------------------------------------------------------------
* Fill structures and corresponding ITAB
* &amp;lt;Comm_Structure&amp;gt;-&amp;lt;Field_name&amp;gt; = &amp;lt;Value&amp;gt;
* ----------------------------------------------------------------------
  IF NOT telephone IS INITIAL.
    comm_maintain tel  tel_number telephone 'X' ' ' '' ''.
  ENDIF.

  IF NOT fax IS INITIAL.
    comm_maintain fax  fax_number fax 'X' ' ' '' ''.
  ENDIF.

  IF NOT teletex IS INITIAL.
    comm_maintain ttx  ttx_number teletex 'X' ' ' '' ''.
  ENDIF.

  IF NOT telex IS INITIAL.
    comm_maintain tlx  tlx_number telex 'X' ' ' '' ''.
  ENDIF.

  IF NOT email IS INITIAL.
    comm_maintain smtp smtp_addr  email 'X' ' ' '' ''.
  ENDIF.

  CALL FUNCTION 'ADDR_MEMORY_SAVE'
       EXCEPTIONS
            OTHERS = 1.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE 'A' NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh yes... The internal tables:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: i_adtel like table of adtel with header line.
  DATA: i_adfax like table of adfax with header line.
  DATA: i_adttx like table of adttx with header line.
  DATA: i_adtlx like table of adtlx with header line.
  DATA: i_adsmtp like table of adsmtp with header line.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2007 09:26:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-update-vendor-communication-address/m-p/2436412#M545028</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-27T09:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to update vendor communication address</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-update-vendor-communication-address/m-p/2436413#M545029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;           try this  BAPI_BUPA_ADDRESS_CHANGE&lt;/P&gt;&lt;P&gt;BAPI_BUPA_ADDRESS_ADD &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2007 09:35:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-update-vendor-communication-address/m-p/2436413#M545029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-27T09:35:48Z</dc:date>
    </item>
  </channel>
</rss>

