SAP BAPI_BUSPARTNER_GETLISTHOSP Function Module for IS-H: Find and Display Business Partners in Function 'Hospital'
BAPI_BUSPARTNER_GETLISTHOSP is a standard bapi buspartner getlisthosp SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for IS-H: Find and Display Business Partners in Function 'Hospital' 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 buspartner getlisthosp FM, simply by entering the name BAPI_BUSPARTNER_GETLISTHOSP into the relevant SAP transaction such as SE37 or SE38.
Function Group: 1309
Program Name: SAPL1309
Main Program: SAPL1309
Appliation area:
Release date: 20-Jul-2004
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_BUSPARTNER_GETLISTHOSP 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_BUSPARTNER_GETLISTHOSP'"IS-H: Find and Display Business Partners in Function 'Hospital'.
EXPORTING
* MAXCNT = 0 "Read Maximum Number of Business Partners from Database
IMPORTING
WORST_RETURNED_MSGTY = "IS-H: Most Severe Message Type Generated
TABLES
BUSPARTNER_DATA = "Hit List of Determined Business Partners
* FILTER_PARTNER_GUID = "Filter for GUID
* FILTER_BUSPARTNER = "Filter for Business Partner
* FILTER_LASTNAME = "Filter for Last Name
* FILTER_FIRSTNAME = "Filter for 1st / 2nd Name
* FILTER_SHORTNAME = "Filter for Short Name
* FILTER_PCODE = "Filter for Postal Code
* FILTER_CITY = "Filter for City
* FILTER_PARTNER_NO = "Filter for External Partner Number
* RETURN = "Return Parameters
IMPORTING Parameters details for BAPI_BUSPARTNER_GETLISTHOSP
MAXCNT - Read Maximum Number of Business Partners from Database
Data type: BAPINALL-MAXCNTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_BUSPARTNER_GETLISTHOSP
WORST_RETURNED_MSGTY - IS-H: Most Severe Message Type Generated
Data type: BAPINALL-WORSTRETMSGOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_BUSPARTNER_GETLISTHOSP
BUSPARTNER_DATA - Hit List of Determined Business Partners
Data type: BAPI1309BPARTNERHITSOptional: No
Call by Reference: No ( called with pass by value option)
FILTER_PARTNER_GUID - Filter for GUID
Data type: BAPI1309RNGPARTNER_GUIDOptional: Yes
Call by Reference: Yes
FILTER_BUSPARTNER - Filter for Business Partner
Data type: BAPI1309RNGBUSPARTOptional: Yes
Call by Reference: No ( called with pass by value option)
FILTER_LASTNAME - Filter for Last Name
Data type: BAPI1309RNGLNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
FILTER_FIRSTNAME - Filter for 1st / 2nd Name
Data type: BAPI1309RNGFNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
FILTER_SHORTNAME - Filter for Short Name
Data type: BAPI1309RNGSNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
FILTER_PCODE - Filter for Postal Code
Data type: BAPI1309RNGPCODEOptional: Yes
Call by Reference: No ( called with pass by value option)
FILTER_CITY - Filter for City
Data type: BAPI1309RNGCITYOptional: Yes
Call by Reference: No ( called with pass by value option)
FILTER_PARTNER_NO - Filter for External Partner Number
Data type: BAPI1309RNGPARTNER_NOOptional: Yes
Call by Reference: Yes
RETURN - Return Parameters
Data type: BAPIRET2Optional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_BUSPARTNER_GETLISTHOSP 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_maxcnt | TYPE BAPINALL-MAXCNT, " 0 | |||
| lt_buspartner_data | TYPE STANDARD TABLE OF BAPI1309BPARTNERHITS, " | |||
| lv_worst_returned_msgty | TYPE BAPINALL-WORSTRETMSG, " | |||
| lt_filter_partner_guid | TYPE STANDARD TABLE OF BAPI1309RNGPARTNER_GUID, " | |||
| lt_filter_buspartner | TYPE STANDARD TABLE OF BAPI1309RNGBUSPART, " | |||
| lt_filter_lastname | TYPE STANDARD TABLE OF BAPI1309RNGLNAME, " | |||
| lt_filter_firstname | TYPE STANDARD TABLE OF BAPI1309RNGFNAME, " | |||
| lt_filter_shortname | TYPE STANDARD TABLE OF BAPI1309RNGSNAME, " | |||
| lt_filter_pcode | TYPE STANDARD TABLE OF BAPI1309RNGPCODE, " | |||
| lt_filter_city | TYPE STANDARD TABLE OF BAPI1309RNGCITY, " | |||
| lt_filter_partner_no | TYPE STANDARD TABLE OF BAPI1309RNGPARTNER_NO, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2. " |
|   CALL FUNCTION 'BAPI_BUSPARTNER_GETLISTHOSP' "IS-H: Find and Display Business Partners in Function 'Hospital' |
| EXPORTING | ||
| MAXCNT | = lv_maxcnt | |
| IMPORTING | ||
| WORST_RETURNED_MSGTY | = lv_worst_returned_msgty | |
| TABLES | ||
| BUSPARTNER_DATA | = lt_buspartner_data | |
| FILTER_PARTNER_GUID | = lt_filter_partner_guid | |
| FILTER_BUSPARTNER | = lt_filter_buspartner | |
| FILTER_LASTNAME | = lt_filter_lastname | |
| FILTER_FIRSTNAME | = lt_filter_firstname | |
| FILTER_SHORTNAME | = lt_filter_shortname | |
| FILTER_PCODE | = lt_filter_pcode | |
| FILTER_CITY | = lt_filter_city | |
| FILTER_PARTNER_NO | = lt_filter_partner_no | |
| RETURN | = lt_return | |
| . " BAPI_BUSPARTNER_GETLISTHOSP | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_BUSPARTNER_GETLISTHOSP
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 MAXCNT FROM BAPINALL INTO @DATA(ld_maxcnt). | ||||
| "SELECT single WORSTRETMSG FROM BAPINALL INTO @DATA(ld_worst_returned_msgty). | ||||
Search for further information about these or an SAP related objects