Fonction SAP BAPI_BUPA_SEARCH_2 - SAP BP, BAPI: Search Business Partner for Telephone, E-Mail, Address

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
ADDRESSDATA BAPIBUS1006_ADDR_SEARCH u 78 X Different Address Attributes
ALL_BUSINESSPARTNERROLES BAPIBUS1006_X-MARK C 1 X Indicator: All BP Roles for BP Role Category
BUSINESSPARTNERROLE BAPIBUS1006_BPROLES-PARTNERROLE C 6 X Search Field for Business Partner Role
BUSINESSPARTNERROLECATEGORY BAPIBUS1006_BPROLES-PARTNERROLECATEGORY C 6 X Search Field for BP Role Category
CENTRALDATA BAPIBUS1006_CENTRAL_SEARCH u 121 X Different Central Business Partner Data
COUNTRY_FOR_TELEPHONE BAPIBUS1006_COMM-COUNTRY_FOR_TELEPHONE C 3 X Country for Telephone Number
EMAIL BAPIBUS1006_COMM-E_MAIL C 241 X Internet Mail (SMTP) Address Search Field
FAX_DATA BAPIBUS1006_FAX_DATA u 33 X Fax Number + Country of Fax Number
OTHERS BAPIBUS1006_OTHER_DATA u 8 X Other parameters
TELEPHONE BAPIBUS1006_COMM-TELEPHONE C 30 X Telephone Number
URL BAPIBUS1006_COMM-URL C 50 X URI Address Search Field
VALID_DATE BAPI_BUPA_VALID_DATE D 8 X Validity Date: Central Partner Data

Paramètre Reférence Long. Facultatif Description
RETURN BAPIRET2 548 BAPI Return Parameter
SEARCHRESULT BAPIBUS1006_BP_ADDR 53 Search Result

Functionality
This function module enables you to search for business partners.
You can enter the telephone and fax number, the e-mail address and theaddress attributes 'country', 'region', 'city' and 'postal code' assearch criteria. The business partner role and central business partnerdata, such as business partner number and the match code fields MC_NAME1and MC_NAME2 constitute additional search criteria.
While the e-mail address and the URI address have to be entered in full,the address attributes and central data may contain wildcards (in theform of '*'). However, bear in mind that you must enter the country whenusing a wildcard to search for the telephone number, otherwise an errormessage is issued.
The country of the fax number must always be transferred when a searchis carried out for a fax number.
The search criterion "role" can be established either by explicitlyentering a role or by means of the role category. When a role categoryis entered, it is possible to search for the role assigned to this rolecategory and established through the standard assignment, or for allroles assigned to the role category.
Business partners that fulfill all the search criteria are selected.

Example
Example

Notes
As of Release 7.0 (SAP ABA), the central data of the business partnercan be maintained in a time-dependent manner. In this case the reportBUPTDTRANSMIT ensures that the Business Address Services (BAS) areupdated with the partner data that has recently become valid. If yousearch for data that is only contained in the address (such as locationand street), then the function module also searches using the address(BAS) in the data matching in both business partner and BAS. Run theBUPTDTRANSMIT report regularly in order to ensure that the search isaccurate.
Searching by address characteristics can result in poor performance whenthere is a large data set. A quicker search using the table BUTADRSEARCHmay solve this problem. For more information, see SAP Note 595442. Ifyou search in all address versions or with the time-dependent search,the system switches automatically to searching without BUTADRSEARCH.

Description
You can search according to the address attributes 'country', 'region','city' and 'postal code'. Several attributes that are entered are takeninto account at the same time, and also linked using AND.

Value range
These attributes may contain wildcards, for example '*'.

Description
If the indicator is set, all the roles assigned to the role categorythat is transferred in the parameter BUSINESSPARTNERROLECATEGORY, areused as search criteria.

Description
The BP role of a business partner can be entered here as a searchcriterion.

Value range
The BP roles are defined in table TB003.

Description
If the role category is entered, the role that is assigned to this rolecategory and established via the standard assignment, is used as asearch criterion.

Value range
The BP role categories are defined in table TB003A.

Description
You can enter the business partner number or the matchcode fieldsMC_NAME1 and MC_NAME2 here as a search criterion. In the case oforganizations, the central fields NAME1 and NAME2 correspond to thematchcode fields, while in the case of persons the search is carried outby first and last name.

Value range
These attributes may contain wildcards, for example '*'.

Description
The field COUNTRY_FOR_TELEPHONE allows you to search fortelephone numbers with the help of wildcards. Only if this field isfilled, can you search for telephone numbers using wildcards.
Otherwise, this field has no significance, and you cannot perform aselection on the basis of it.

Description
The e-mail (SMTP address) of a business partner can be entered here as asearch criterion.

Value range
The e-mail address can have the following formats:

  • local@domain

  • Commentary <(><<)>local@domain>

  • local@domain (commentary)
  • Description
    The fax number of a business partner can be entered here as a searchcriterion. It is important that you enter the country when you searchaccording to a fax number, otherwise an error message is issued.

    Description
    The telephone number of a business partner can be entered here as asearch criterion.

    Value range
    As well as numbers, the telephone number may contain any number ofcharacters, such as '(', '/', '+', '-', '.', ')' and ' '.

    Description
    The URL address, for example the homepage of a business partner, can beentered here as a search criterion.

    Value range
    The search is carried out for the first 50 characters of the URLaddress.

    Description
    Date for which the specified business partner attributes are to bevalid.

    Value range
    Date YYYYMMDD or 00000000; the latter meaning: Search in all timeslices.

    Default
    Current date; = Only those partners for whom the attributes you want tofind are valid today.

    Description
    Table in which messages are transferred by the system, for example, ifan error occurs or a note is displayed.

    Description
    This table contains all the business partners that fulfill all theentered selection criteria at the same time. The business partner numberis returned, and if applicable, the address GUID of the address in whichthe search was successful.