<?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: BAPI_USER_CHANGE - cannot initialise communication fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-change-cannot-initialise-communication-fields/m-p/995758#M75255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pat!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no flag-structure(-table) for table addtel - so you would overwrite everything, if you try to add one additional info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; Try to fill one (or 30) space instead of empty mob_number. This might be trigger override.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Aug 2005 11:00:45 GMT</pubDate>
    <dc:creator>christian_wohlfahrt</dc:creator>
    <dc:date>2005-08-17T11:00:45Z</dc:date>
    <item>
      <title>BAPI_USER_CHANGE - cannot initialise communication fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-change-cannot-initialise-communication-fields/m-p/995757#M75254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using BAPI_USER_CHANGE to synchronise SAP User data with our Exchange Server. Included in these changes are the user's telephone and mobile number. Now say for example if I want to change these numbers there is no problem, but if a user no longer has a (desk) telephone number because they are now splitting their time evenly over several sites or no longer has a mobile number I want to the appropriate fields to be empty in SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a segment of my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

* Structure to hold Communication 'X' structure
DATA: BEGIN OF st_commx.
        INCLUDE STRUCTURE bapiadcomx.
DATA: END OF st_commx.

* Internal Table to hold Telephone / Mobile Numbers
DATA: BEGIN OF tbl_comm OCCURS 0.
        INCLUDE STRUCTURE bapiadtel.
DATA: END OF tbl_comm.
  
  CLEAR tbl_comm.
  ADD 1 TO l_counter.
  tbl_comm-std_no     = 'X'.
  tbl_comm-telephone  = st_user_change-mob_number.
  tbl_comm-std_recip  = 'X'.  "SMS Compatible?
  tbl_comm-r_3_user   = '3'.  "Mobile?
  tbl_comm-home_flag  = 'X'.
  tbl_comm-consnumber = l_counter.

  st_commx-adtel = 'X'.

....

  CALL FUNCTION 'BAPI_USER_CHANGE'
    EXPORTING
      username = st_user_change-username
      address  = st_addr
      addressx = st_addrx
      addcomx  = st_commx
    TABLES
      return   = tbl_return
      addsmtp  = tbl_email
      addtel   = tbl_comm.

  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if st_user_change-mob_number is empty, I would assume that the BAPI would overwrite the existing number with blanks, but this is not happening - the old number is still there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any assistance will be rewarded accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2005 02:01:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-change-cannot-initialise-communication-fields/m-p/995757#M75254</guid>
      <dc:creator>former_member221770</dc:creator>
      <dc:date>2005-08-17T02:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_USER_CHANGE - cannot initialise communication fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-change-cannot-initialise-communication-fields/m-p/995758#M75255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pat!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no flag-structure(-table) for table addtel - so you would overwrite everything, if you try to add one additional info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; Try to fill one (or 30) space instead of empty mob_number. This might be trigger override.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2005 11:00:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-change-cannot-initialise-communication-fields/m-p/995758#M75255</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2005-08-17T11:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_USER_CHANGE - cannot initialise communication fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-change-cannot-initialise-communication-fields/m-p/995759#M75256</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;Your code is ok only 'append tbl_comm' is missing so your code is not working. Just add this append statement after you populate the required data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2005 11:43:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-change-cannot-initialise-communication-fields/m-p/995759#M75256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-17T11:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_USER_CHANGE - cannot initialise communication fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-change-cannot-initialise-communication-fields/m-p/995760#M75257</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;sorry about the incorrect reply in my last reply. The source code of BAPI at point is written as below&lt;/P&gt;&lt;P&gt; IF SY_SUBRC = 0 AND &amp;lt;CHANGEFIELD&amp;gt; IS INITIAL. &lt;/P&gt;&lt;P&gt;   &amp;lt;NEWFIELD&amp;gt; = &amp;lt;OLDFIELD&amp;gt;.                    &lt;/P&gt;&lt;P&gt; ENDIF.                                        &lt;/P&gt;&lt;P&gt;This is code written in FM which is called by FM mentioned by you. Because of this if the &amp;lt;CHANGEFIELD&amp;gt; ie. the field which we want to change is initial then it is not going take effect on existing value. This is a bug can be reported SAP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2005 12:31:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-change-cannot-initialise-communication-fields/m-p/995760#M75257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-17T12:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_USER_CHANGE - cannot initialise communication fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-change-cannot-initialise-communication-fields/m-p/995761#M75258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BAPI_USER_CHANGE actuallu calls SUSR_BAPI_USER_CHANGE in which the code is written which I have posted in my answer before this reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2005 12:34:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-change-cannot-initialise-communication-fields/m-p/995761#M75258</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-17T12:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_USER_CHANGE - cannot initialise communication fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-change-cannot-initialise-communication-fields/m-p/995762#M75259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chintamani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I found the line you are referring to in the SUSR_BAPI_USER_CHANGE FM. I was hoping that I had missed something silly within one of the other parameters to the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will report this as a possible bug to SAP as you suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the meantime for those interested, I have put together a little work around. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the number is initial, I put in a '0' into the number and put a 'X' the 'FLG_NOUSE' field  - therefore the "DO NOT USE" flag is ticked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2005 22:52:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-user-change-cannot-initialise-communication-fields/m-p/995762#M75259</guid>
      <dc:creator>former_member221770</dc:creator>
      <dc:date>2005-08-17T22:52:23Z</dc:date>
    </item>
  </channel>
</rss>

