SAP BAPI_BUPA_SEARCH_2 Function Module for SAP BP, BAPI: Search Business Partner for Telephone, E-Mail, Address
BAPI_BUPA_SEARCH_2 is a standard bapi bupa search 2 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for SAP BP, BAPI: Search Business Partner for Telephone, E-Mail, Address processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for bapi bupa search 2 FM, simply by entering the name BAPI_BUPA_SEARCH_2 into the relevant SAP transaction such as SE37 or SE38.
Function Group: BUBA_3
Program Name: SAPLBUBA_3
Main Program: SAPLBUBA_3
Appliation area:
Release date: 24-May-2005
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_BUPA_SEARCH_2 pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'BAPI_BUPA_SEARCH_2'"SAP BP, BAPI: Search Business Partner for Telephone, E-Mail, Address.
EXPORTING
* TELEPHONE = "Telephone Number
* FAX_DATA = "Fax Number + Country of Fax Number
* VALID_DATE = "Validity Date: Central Partner Data
* OTHERS = "Other parameters
* EMAIL = "Internet Mail (SMTP) Address Search Field
* URL = "URI Address Search Field
* ADDRESSDATA = "Different Address Attributes
* CENTRALDATA = "Different Central Business Partner Data
* BUSINESSPARTNERROLECATEGORY = "Search Field for BP Role Category
* ALL_BUSINESSPARTNERROLES = "Indicator: All BP Roles for BP Role Category
* BUSINESSPARTNERROLE = "Search Field for Business Partner Role
* COUNTRY_FOR_TELEPHONE = "Country for Telephone Number
TABLES
SEARCHRESULT = "Search Result
RETURN = "BAPI Return Parameter
IMPORTING Parameters details for BAPI_BUPA_SEARCH_2
TELEPHONE - Telephone Number
Data type: BAPIBUS1006_COMM-TELEPHONEOptional: Yes
Call by Reference: No ( called with pass by value option)
FAX_DATA - Fax Number + Country of Fax Number
Data type: BAPIBUS1006_FAX_DATAOptional: Yes
Call by Reference: No ( called with pass by value option)
VALID_DATE - Validity Date: Central Partner Data
Data type: BAPI_BUPA_VALID_DATEOptional: Yes
Call by Reference: No ( called with pass by value option)
OTHERS - Other parameters
Data type: BAPIBUS1006_OTHER_DATAOptional: Yes
Call by Reference: No ( called with pass by value option)
EMAIL - Internet Mail (SMTP) Address Search Field
Data type: BAPIBUS1006_COMM-E_MAILOptional: Yes
Call by Reference: No ( called with pass by value option)
URL - URI Address Search Field
Data type: BAPIBUS1006_COMM-URLOptional: Yes
Call by Reference: No ( called with pass by value option)
ADDRESSDATA - Different Address Attributes
Data type: BAPIBUS1006_ADDR_SEARCHOptional: Yes
Call by Reference: No ( called with pass by value option)
CENTRALDATA - Different Central Business Partner Data
Data type: BAPIBUS1006_CENTRAL_SEARCHOptional: Yes
Call by Reference: No ( called with pass by value option)
BUSINESSPARTNERROLECATEGORY - Search Field for BP Role Category
Data type: BAPIBUS1006_BPROLES-PARTNERROLECATEGORYOptional: Yes
Call by Reference: No ( called with pass by value option)
ALL_BUSINESSPARTNERROLES - Indicator: All BP Roles for BP Role Category
Data type: BAPIBUS1006_X-MARKOptional: Yes
Call by Reference: No ( called with pass by value option)
BUSINESSPARTNERROLE - Search Field for Business Partner Role
Data type: BAPIBUS1006_BPROLES-PARTNERROLEOptional: Yes
Call by Reference: No ( called with pass by value option)
COUNTRY_FOR_TELEPHONE - Country for Telephone Number
Data type: BAPIBUS1006_COMM-COUNTRY_FOR_TELEPHONEOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_BUPA_SEARCH_2
SEARCHRESULT - Search Result
Data type: BAPIBUS1006_BP_ADDROptional: No
Call by Reference: No ( called with pass by value option)
RETURN - BAPI Return Parameter
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_BUPA_SEARCH_2 Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_telephone | TYPE BAPIBUS1006_COMM-TELEPHONE, " | |||
| lt_searchresult | TYPE STANDARD TABLE OF BAPIBUS1006_BP_ADDR, " | |||
| lv_fax_data | TYPE BAPIBUS1006_FAX_DATA, " | |||
| lv_valid_date | TYPE BAPI_BUPA_VALID_DATE, " | |||
| lv_others | TYPE BAPIBUS1006_OTHER_DATA, " | |||
| lv_email | TYPE BAPIBUS1006_COMM-E_MAIL, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_url | TYPE BAPIBUS1006_COMM-URL, " | |||
| lv_addressdata | TYPE BAPIBUS1006_ADDR_SEARCH, " | |||
| lv_centraldata | TYPE BAPIBUS1006_CENTRAL_SEARCH, " | |||
| lv_businesspartnerrolecategory | TYPE BAPIBUS1006_BPROLES-PARTNERROLECATEGORY, " | |||
| lv_all_businesspartnerroles | TYPE BAPIBUS1006_X-MARK, " | |||
| lv_businesspartnerrole | TYPE BAPIBUS1006_BPROLES-PARTNERROLE, " | |||
| lv_country_for_telephone | TYPE BAPIBUS1006_COMM-COUNTRY_FOR_TELEPHONE. " |
|   CALL FUNCTION 'BAPI_BUPA_SEARCH_2' "SAP BP, BAPI: Search Business Partner for Telephone, E-Mail, Address |
| EXPORTING | ||
| TELEPHONE | = lv_telephone | |
| FAX_DATA | = lv_fax_data | |
| VALID_DATE | = lv_valid_date | |
| OTHERS | = lv_others | |
| = lv_email | ||
| URL | = lv_url | |
| ADDRESSDATA | = lv_addressdata | |
| CENTRALDATA | = lv_centraldata | |
| BUSINESSPARTNERROLECATEGORY | = lv_businesspartnerrolecategory | |
| ALL_BUSINESSPARTNERROLES | = lv_all_businesspartnerroles | |
| BUSINESSPARTNERROLE | = lv_businesspartnerrole | |
| COUNTRY_FOR_TELEPHONE | = lv_country_for_telephone | |
| TABLES | ||
| SEARCHRESULT | = lt_searchresult | |
| RETURN | = lt_return | |
| . " BAPI_BUPA_SEARCH_2 | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_BUPA_SEARCH_2
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single TELEPHONE FROM BAPIBUS1006_COMM INTO @DATA(ld_telephone). | ||||
| "SELECT single E_MAIL FROM BAPIBUS1006_COMM INTO @DATA(ld_email). | ||||
| "SELECT single URL FROM BAPIBUS1006_COMM INTO @DATA(ld_url). | ||||
| "SELECT single PARTNERROLECATEGORY FROM BAPIBUS1006_BPROLES INTO @DATA(ld_businesspartnerrolecategory). | ||||
| "SELECT single MARK FROM BAPIBUS1006_X INTO @DATA(ld_all_businesspartnerroles). | ||||
| "SELECT single PARTNERROLE FROM BAPIBUS1006_BPROLES INTO @DATA(ld_businesspartnerrole). | ||||
| "SELECT single COUNTRY_FOR_TELEPHONE FROM BAPIBUS1006_COMM INTO @DATA(ld_country_for_telephone). | ||||
Search for further information about these or an SAP related objects