Fonction SAP BAPI_BUPA_ADDRESS_CHANGE - SAP BP, BAPI: Change Address

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
ACCEPT_ERROR BAPI4001_1-ACCEPT_ERR C 1 SPACE X Accept Regional Structure Check Errors with Warnings
ADDRESSDATA BAPIBUS1006_ADDRESS u 830 X Address Data
ADDRESSDATA_X BAPIBUS1006_ADDRESS_X u 56 X Change Information on ADDRESSDATE
ADDRESSGUID BUT020-GUID C 32 X Address GUID
BUSINESSPARTNER BAPIBUS1006_HEAD-BPARTNER C 10 Business Partner Number
DUPLICATE_MESSAGE_TYPE BAPIBUS1006_HEAD-CONTROLDUPLICATEMESSAGE C 1 X Message Type Control

Paramètre Reférence Long. Facultatif Description
ADDRESSDUPLICATES BAPIBUS1006_ADDRESS_DUPLICATES 67 X Address Duplicates
ADDRESSUSAGE BAPIBUS1006_ADDRESSUSAGE 35 X Address Usages
ADDRESSUSAGE_X BAPIBUS1006_ADDRESSUSAGE_X 5 X Change Information on ADDRESSUSAGE
BAPIADFAX BAPIADFAX 143 X Telefax Numbers
BAPIADFAX_X BAPIADFAXX 16 X Change Information on BAPIADFAX
BAPIADPAG BAPIADPAG 136 X Pager Numbers
BAPIADPAG_X BAPIADPAGX 15 X Change Information on BAPIADPAG
BAPIADPRT BAPIADPRT 40 X PRT Addresses
BAPIADPRT_X BAPIADPRTX 9 X Change Information on BAPIADPRT
BAPIADRFC BAPIADRFC 69 X RFC Addresses
BAPIADRFC_X BAPIADRFCX 10 X Change Information on BAPIADRFC
BAPIADRML BAPIADRML 63 X RML Addresses
BAPIADRML_X BAPIADRMLX 13 X Change Information on BAPIADRML
BAPIADSMTP BAPIADSMTP 300 X E-Mail Addresses
BAPIADSMT_X BAPIADSMTX 13 X Change Information on BAPIADSMTP
BAPIADSSF BAPIADSSF 2391 X SSF Addresses
BAPIADSSF_X BAPIADSSFX 22 X Change Information on BAPIADSSF
BAPIADTEL BAPIADTEL 142 X Telephone Numbers
BAPIADTEL_X BAPIADTELX 15 X Change Information on BAPIADTEL
BAPIADTLX BAPIADTLX 72 X Telex Numbers
BAPIADTLX_X BAPIADTLXX 12 X Change Information on BAPIADTLX
BAPIADTTX BAPIADTTX 72 X Teletex Numbers
BAPIADTTX_X BAPIADTTXX 12 X Change Information on BAPIADTTX
BAPIADURI BAPIADURI 2219 X URI Addresses
BAPIADURI_X BAPIADURIX 19 X Change Information on BAPIADURI
BAPIADUSE BAPIADUSE 46 X BAPI Structure for Communication Usages (BAS)
BAPIADUSE_X BAPIADUSEX 7 X Change Reference Structure for BAPIADUSE
BAPIADVERSORG BAPIAD1VD 800 X International Address Version for Organization/Group
BAPIADVERSORG_X BAPIAD1VDX 28 X Change Information for International Address Version for Organizations/Groups
BAPIADVERSPERS BAPIAD2VD 988 X International Address Version for Persons
BAPIADVERSPERS_X BAPIAD2VDX 41 X Change Information for International Address Version for Persons
BAPIADX400 BAPIADX400 948 X X400 Addresses
BAPIADX40_X BAPIADX40X 36 X Change Information on BAPIADX400
BAPIAD_REM BAPIAD_REM 55 X Address Notes
BAPIAD_RE_X BAPIAD_REX 5 X Change Information on BAPIAD_REM
BAPICOMREM BAPICOMREM 60 X Notes on Communication Types
BAPICOMRE_X BAPICOMREX 6 X Change Information on BAPICOMREM
RETURN BAPIRET2 548 X Messages

Functionality
With this BAPI you can change the relevant address for the businesspartner in question.
The system checks that the business partner and the address exist, andthen checks the new data for consistency and Customizing settings. Anyerrors that occur are logged and issued in the RETURN table. If any ofthe checks run across errors, the address changes are not carried out.
Depending on the business partner category of the business partner youhave entered, either the address of a person or that of an organizationis changed.
This module differs from the standard change BAPIs in that you are notonly able to change existing entries, but you can also delete or addtelephone numbers and fax numbers, and so on, that are appended to anaddress as attributes.
Use reference structure bars (check bars) to select entries that youwant to change.
If the appropriate settings have been made in the system, a duplicatecheck is carried out when an address is changed. If a record that is tobe created is recognized as already existing in the system, theaddresses that are similar to this record are returned in the tableADDRESSDUPLICATES.
If the tool used for the duplicate check offers the possibility, theprobability in percent of the current record being a duplicate isreturned in the table ADDRESSDUPLICATES.
In order to maintain international address versions, use the tablesBAPIADVERSORG, BAPIADVERSORG_X and BAPIADVERSPERS or BAPIADVERSPERS_X.You can maintain international address versions for organizations andgroups with the tables BAPIADVERSORG and BAPIADVERSORG_X. You maintaininternational address versions for persons with the tablesBAPIADVERSPERS and BAPIADVERSPERS_X.
At present you only extend existing addresses by adding addressversions. Address versions are inserted (I), changed (U) or deleted (D)using the change indicator (BAPIADVERSORG_X-UPDATEFLAG orBAPIADVERSPERS_X-UPDATEFLAG).

Time Dependency
The following applies to the temporal validity of address usages: thereis only one standard address at any time during the entire validity ofthe addresses. This address usage is created automatically if necessary.As long as there is one valid address, only a new address can become thestandard address instead of the current standard address. By adding anaddress usage in table ADDRESSUSAGE, the new address can be made thestandard address.
It is possible to remove a standard address if there is one otheraddress usage that is available to be the new standard address. Thisautomatically becomes the new standard address.
There can also be other address usages. If there is more than oneaddress for an address usage, you can use the indicatorADDRESSUSAGE-STANDARDADDRESSUSAGE to determine the standard addresswithin this usage.
The fields ADDRESSTYPE and USAGEVALIDTO (corresponding to the key of thetable BUT021_FS) form the key of an address usage. Therefore, when youchange an address usage, the field VALIDTOREADFORCHANGE must be statedin order to identify the usage to be changed. (If the valid-to dateshould be changed, USAGEVALIDTO must be used for the new validity end.)
The fields USAGEVALIDFROM and STANDARDADDRESSUSAGE are, on the otherhand, attributes of the usage.
If an address exists in an address usage in different validity periods,then the usage to be changed must be specified in more detail byentering the field ADDRESSUSAGE-USAGEVALIDTO. The other key fields ofthis transaction are the address number and ADDRESSUSAGE-ADDRESSTYPE.This means that there is a change to a usage if the flagSTANDARDADDRESSUSAGE or USAGEVALIDFROM should be changed. In this casethe UPDATEFLAG must be set to 'U' in table ADDRESSUSAGE_X.

Example
Partner 1 has the following addresses:
Address(GUID),,Valid from ,,Valid to
11,,01.01.2000,,31.12.9999
12,,01.01.2000,,31.12.9999
13,,01.01.2000,,31.12.2004
Application examples for changes to the address usages:

  • You want to make the address with the address(GUID) 13 into the standard
  • address from the 01.01. 2003 to the 31.12.2003.
    Before the change:
    Address usage,,Valid from ,,Valid to,,Address(GUID),,Standard flag
    Standard address,,01.01.2000,,31.12. 2004,,11
    Standard address,,01.01.2005,,31.12.2010,,12
    Standard address,,01.01.2011,,31.12.9999,,11
    Correspondence address ,,01.01.2001,,31.12.2004,,13,,Standard
    ADDRESSGUID,,,,,,,,= 13
    ADDRESSUSAGE-ADDRESSTYPE,, = 'XXDEFAULT'.
    ADDRESSUSAGE-USAGEVALIDFROM,,= '20030101'.
    ADDRESSUSAGE-USAGEVALIDTO ,,= '20031231'.
    ADDRESSUSAGE_X-UPDATEFLAG = 'I'.
    Result:
    Address usage,,Valid from,,Valid to ,,Address(GUID),,Standard flag
    Standard address,,01.01.2000,,31.12.2002,,11,,
    Standard address,,01.01.2003,,31.12.2003,,13,,
    Standard address,,01.01.2004,,31.12.2004,,11,,
    Standard address,,01.01.2005,,31.12.2010,,12,,
    Standard address,,01.01.2011,,31.12.9999,,11,,
    Correspondence address,,01.01.2001,,31.12.2004,,13,,Standard
    The validity of the standard address with the GUID 11 is automaticallyadapted.
    • There are two possibilities if you want to extend the validity of the
    • address with the GUID12 as the standard address till 2015.
      The following procedure is possible, since the current usages areadapted when a standard address is created:
      ADDRESSGUID,,,,,,,,= 12.
      ADDRESSUSAGE-ADDRESSTYPE ,,= 'XXDEFAULT'.
      ADDRESSUSAGE-USAGEVALIDFROM ,,= '20050101'.
      ADDRESSUSAGE-USAGEVALIDTO ,,= '20151231'.
      ADDRESSUSAGE_X-UPDATEFLAG = 'I'.
      Or changing the valid to date":
      ADDRESSGUID,,,,,,,, ,,= 12 .
      ADDRESSUSAGE-ADDRESSTYPE ,,,,= 'XXDEFAULT'.
      ADDRESSUSAGE-VALIDTOREADFORCHANGE = '20101231'.
      ADDRESSUSAGE-USAGEVALIDTO ,,,,= '20151231'.
      ADDRESSUSAGE-USAGEVALIDTO = 'X'.
      ADDRESSUSAGE_X-UPDATEFLAG = 'U'.
      Result:
      Address usage,,Valid from,,Valid to ,,Address(GUID),,Standard flag
      Standard address,,01.01.2000,,31.12. 2002,,11,,
      Standard address,,01.01.2003,,31.12.2003,,13,,
      Standard address,,01.01.2004,,31.12.2004,,11,,
      Standard address,,01.01.2005,,31.12.2015,,12,,
      Standard address,,01.01.2016,,31.12.9999,,11,,
      Correspondence address ,,01.01.2001,,31.12.2004,,13,,Standard
      • You want to limit the usage of address (GUID) 11 as the standard address
      • untill the end of 2000. Since there are several addresses that could bethe new standard address from 01.01.2001 (either address (GUID) 12 or13, because both addresses are valid at that time), this is not possibleas a deletion/change (UPDATEFLAG = 'D' / UPDATEFLAG = 'U'), but againonly as an insert of the new address usage (see previous examples). Thevalidity of the address (GUID) 11 is then automatically limited.
        • You want to a delete the address (GUID) 13 as the correspondence
        • address. However the value '0001' corresponds to the address usage"correspondence address" (see table TB009).
          ADDRESSGUID ,,,,,,,,,,,,= 13.
          ADDRESSUSAGE-ADDRESSTYPE ,,,,,,= '0001'.
          ADDRESSUSAGE-VALIDTOREADFORCHANGE ,,= '20041231'.
          ADDRESSUSAGE_X-UPDATEFLAG ,,,,,,= 'D'.
          The standard address (address type XXDEFAULT) can also be influencedwith the field ADDRESSDATA_X-STANDARDADDRESS. This field is obsolete. Itmay not be used in conjunction with the table ADDRESSUSAGE.

          Notes
          If you do not state an address GUID when you call this module, thesystem assumes that you want to change the standard address of thisbusiness partner.
          If you want to delete a telephone number in the table of existingtelephone numbers for a certain address, for example, the UPDATEFLAGfield in the reference structure bar of the corresponding line mustcontain a "D". If you want to add an entry, this field has to contain an"I". When a reference structure bar is flagged with "I", you must alsoprovide corresponding data for insertion. All new line-type entries thatyou want to add, including the related reference structure bars, must beplaced after all the entries you want to change (U) and delete (D).
          With change data, the key fields must always be filled with data, andwill be considered as far as possible. It is thus of no importance, forexample, whether all remarks for a telephone number are listed as changedata before the remarks for the fax number, or vice-versa, unless youcompletely omit the sequence numbers for communication addresses orremarks, or only state them in part. In this case, the sequence of dataplays a major role.
          The following fields are regarded as being key fields:
          Structure,,Fields
          BAPIAD1VL,,ADDR_VERS, FROM_DATE
          BAPIAD_REM,,ADDR_VERS, LANGU
          BAPIADTEL,,CONSNUMBER
          ... ,, ...
          BAPIADPAG,,CONSNUMBER
          BAPICOMREM,,COMM_TYPE, CONSNUMBER, LANGU
          It is possible to transfer blank sequence numbers for communicationaddresses and remarks. In this case, the sequence in which the data wastransferred counts. For example, if you want to delete the telephonenumber that is in second position in the list of existing telephonenumbers whose sequence numbers are sorted in ascending order, with thisfunction module you firstly have to transfer a dummy telephone numberline with the update flag (U), without marking fields for updating, andthen you have to transfer a telephone number line with the deletion flag(D).
          You should be aware that the communication addresses stored in thedatabase are not usually sorted according to sequence numbers. Youtherefore first have to determine the sequence of the communicationaddresses sorted according to sequence numbers. You are advised not tofollow the above procedure, as it is very easy to make mistakes whenassigning data. It is much safer to enter the sequence numbers as thekey.
          You should assign your own sequence numbers with communication addressesthat you want to create (I), and with the related addresses, so that theassignment of the communication address to a remark is clear. You onlyhave to make sure that the sequence numbers are not yet in use in thedatabase, unless you explicitly want to assign a remark to an existingcommunication address. If you omit the number assignment, the systemassumes that all remarks to be inserted belong to the communicationaddresses to be added, and not to existing communication addresses.(This would only make sense if you want to add a remark in a differentlanguage to the one in which a communication address was created).
          Assignment takes place exclusively by way of the sequence of the datatransferred. The first German language remark entered for a telephonenumber, that has been flagged for creation (I), is assigned to the firsttelephone number you have said you want to add. The third Englishlanguage remark on a fax number with the insertion flag (I) is assignedto the third fax number you have said you want to add.
          In this case, it is not possible to add a remark to a communicationaddress that already exists. Here you always require the correctsequence number.
          If the sequence numbers are filled in the case of one category ofcommunication addresses and their remarks, but not with anothercategory, this has no effect on the overall functionality. Allcommunication types are processed separately. In other words, ifcomplete sequence numbers are stated with a communication type, they areconsidered, even if the sequence numbers with another communication typeare missing in full or part. In the latter two cases, the sequence ofdata to be processed is used.
          You can state the sequence numbers with the communication addresses youwant to insert (I), and omit them with the communication addresses youwant to update (U) and delete (D), and vice-versa. Separate processingthen takes place per case (sequence numbers or sequence of data). Onlycommunication addresses that you want to update or delete have to betransferred together, whereby the sequence numbers have to be completeor not exist at all. To be on the safe side you should always statecomplete sequence numbers with all data.
          Data that you want to change should be read in advance (for example,with FM BAPI_ADDRESSORG_GETDETAIL), in case communication datashould also be changed, so that you know the sequence numbers of thecommunication data.

          Temporal Validity of Communication Data
          The communication data for an address (e.g. table BAPIADTEL ...) can berestricted with regard to time. A date with the format YYYMMDD can beentered aligned to the left in the fields VALID_FROM and VALID_TO. Theexact time is not taken into account. The communication data is validonly as long as the address is valid. If necessary, the date fields areadapted without an error message.

          Description
          You use this parameter to control whether a message from the regionalstructure check should be category E or W. Enter the value X in thisparameter if a possible message of category W should be issued.

          Value range
          X

          Default
          The default value of the parameter is SPACE. Thus a possible message ofcategory E is issued during the regional structure check.

          Description
          This structure contains information on the business partner addresses.
          For information on the significance of the individual parameter fields,see the relevant data element documentation in the ABAP Dictionary.

          Time Dependency for Address Data and Indicator Standard Address
          Address data is time-dependent from Release 6.40. If you want to use thetime dependency, you must control the standard address by assigning theaddress type XXDEFAULT in the table IT_ADUSE or IT_ADUSE_X. Theindicator STANDARDADDRESSUSAGE in this structure still works for reasonsof compatibility only. If there are really several usages with differenttime constraints for an address, this BAPI attempts to set the addressas the standard address on the current date, or to delete the usage asstandard address. This assignment is however complicated. You should nolonger use this compatibility mode in new applications.

          Value range

          Description
          For information on the significance of the change bar, see thecorresponding data element documentation.
          Address data is time-dependent from Release 6.40. If you want to makeuse of time dependency, you must control the standard address byassigning the address type XXDEFAULT in the table IT_ADUSE orIT_ADUSE_X.
          The indicator "STANDARDADDRESSUSAGE" still works in this structure forreasons of compatibility only. If an address really has several usagesthat differ with regard to time, this BAPI attempts to set the currentaddress as the standard address or to delete the usage as standardaddress. This assignment is however complicated. You should no longeruse this compatibility mode in new applications.
          The field STANDARDADDRESSUSAGE is not compatible with entries in thetables IT_ADUSE or IT_ADUSE_X.

          Description
          The address GUID uniquely identifies an address over all systems.
          It is purely a technical object identifier and not intended for use inthe interface or in interaction between system users.
          INCLUDE BAPI_BUSINESSPARTNER OBJECT DOKU ID TX

          Description
          You can use this parameter to control whether the message type with theduplicate check should be an E message or a W message, in other wordsan error message, or a warning. With E messages, further processing iscanceled.
          Permitted values
          E for errors and W for warnings.
          If you do not specify a value, standard message category E is used.

          Description
          The addresses that the system has recognized as being the same orsimilar are stated in this table. The field ADDRNUMBER contains theaddress number of the addresses recognized as being the same orsimilar. In the case that the addresses are personal addresses, thefield PERSNUMBER is filled with the relevant personal number.
          Depending on whether the tool for the duplicate check offers thepossibility, the field PERCENTAGE contains the probability of the givenaddress record being a duplicate

          Description
          Table contains data on the address usage of a business partner address.
          For information on the significance of the individual parameter fields,consult the corresponding data element documentation in the ABAPdictionary.

          Description
          For information on the significance of the change bar, consult thecorresponding data element documentation.

          Description
          This table contains information on the fax data of a business partner.
          For information on the significance of the individual parameter fields,consult the corresponding data element documentation in the ABAPdictionary.

          Description
          For information on the significance of the change bar, consult thecorresponding data element documentation.

          Description
          This table contains information on the pager numbers of a businesspartner.
          For information on the significance of the individual parameter fields,consult the corresponding data element documentation in the ABAPdictionary.

          Description
          For information on the significance of the change bar, consult thecorresponding data element documentation.

          Description
          Table contains information on the printer addresses of a businesspartner.
          For information on the significance of the individual parameter fields,consult the corresponding data element documentation in the ABAPdictionary.

          Description
          For information on the significance of the change bar, consult thecorresponding data element documentation.

          Description
          Table contains information on the RFC addresses of a business partner.
          For information on the significance of the individual parameter fields,consult the corresponding data element documentation in the ABAPdictionary.

          Description
          For information on the significance of the change bar, consult thecorresponding data element documentation.

          Description
          This table contains information on the R-mail addresses of a businesspartner.
          For information on the significance of the individual parameter fields,consult the corresponding data element documentation in the ABAPdictionary.

          Description
          For information on the significance of the change bar, consult thecorresponding data element documentation.

          Description
          Table contains information on the Internet addresses of a businesspartner.
          For information on the significance of the individual parameter fields,consult the corresponding data element documentation in the ABAPdictionary.

          Description
          For information on the significance of the change bar, consult thecorresponding data element documentation.

          Description
          Table contains information on the SSF addresses of a business partner.
          For information on the significance of the individual parameter fields,consult the corresponding data element documentation in the ABAPdictionary.

          Description
          For information on the significance of the change bar, consult thecorresponding data element documentation.

          Description
          Table contains information on the telephone addresses of a businesspartner.
          For information on the significance of the individual parameter fields,consult the corresponding data element documentation in the ABAPdictionary.

          Description
          For information on the significance of the change bar, consult thecorresponding data element documentation.

          Description
          Table contains information on the telex data of a business partner.
          For information on the significance of the individual parameter fields,consult the corresponding data element documentation in the ABAPdictionary.

          Description
          For information on the significance of the change bar, consult thecorresponding data element documentation.

          Description
          Table contains information on the teletex data of a business partner.
          For information on the significance of the individual parameter fields,consult the corresponding data element documentation in the ABAPdictionary.

          Description
          For information on the significance of the change bar, consult thecorresponding data element documentation.

          Description
          Table contains information on the URI addresses of a business partner.
          For information on the significance of the individual parameter fields,consult the corresponding data element documentation in the ABAPdictionary.

          Description
          For information on the significance of the change bar, consult thecorresponding data element documentation.

          Description
          Validity of the communication data (Business Address Services).

          Description
          Update structure for the validity of the communication data (BusinessAddress Services).

          Description
          This table contains data for international address versions fororganizations and groups.

          Description
          This BAPI contains the change information BAPIADVERSORG(international address versions for organizations and groups).

          Description
          This table contains data for international address versions forpersons.

          Description
          This BAPI contains change information for BAPIADVERSORG(international address versions for persons).

          Description
          Table contains information on the X400 addresses of a business partner.
          For information on the significance of the individual parameter fields,consult the corresponding data element documentation in the ABAPdictionary.

          Description
          For information on the significance of the change bar, consult thecorresponding data element documentation.

          Description
          Table contains notes/comments on the addresses of a business partner.
          For information on the significance of the individual parameter fields,consult the corresponding data element documentation in the ABAPdictionary.

          Description
          For information on the significance of the change bar, consult thecorresponding data element documentation.

          Description
          Table contains notes/comments on the communication data of a businesspartner.
          For information on the significance of the individual parameter fields,consult the corresponding data element documentation in the ABAPdictionary.

          Description
          For information on the significance of the change bar, consult thecorresponding data element documentation.

          Description
          Table contains return messages from the method call.

734936API 640: Error R11269 (is address type XXDEFAULT assigned)
687828SAP BP API: Duplicate check 100 % correspondence