SAP BAPI_LOCSRVAPS_SAVEMULTI2 Function Module for Create or Change Location Data
BAPI_LOCSRVAPS_SAVEMULTI2 is a standard bapi locsrvaps savemulti2 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create or Change Location Data 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 locsrvaps savemulti2 FM, simply by entering the name BAPI_LOCSRVAPS_SAVEMULTI2 into the relevant SAP transaction such as SE37 or SE38.
Function Group: 10002
Program Name: SAPL10002
Main Program: SAPL10002
Appliation area:
Release date: 22-Oct-2009
Mode(Normal, Remote etc): Normal Function Module
Update:

Function BAPI_LOCSRVAPS_SAVEMULTI2 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_LOCSRVAPS_SAVEMULTI2'"Create or Change Location Data.
EXPORTING
LOGICAL_SYSTEM = "Logical System from which Message Originates
* SAVE_OPTIONS = "Settings for Saving Data
* COMMIT_CONTROL = "Update Control
* BUSINESS_SYSTEM_GROUP = "Business System Group
TABLES
* LOCATION_HEAD = "Location: Header Data
* LOCATION_TEXT_X = "Location: Language-Dependent Short Texts, Change Parameters
* LOCATION_ADDRESS = "Location: Address Data
* LOCATION_ADDRESS_X = "Location: Address Data, Change Parameters
* LOCATION_SMTP = "Location: Communication Method SMTP
* LOCATION_SMTP_X = "Location: Communication Method SMTP, Change Parameters
* LOCATION_TEL = "Location: Communication Method Telephone
* LOCATION_TEL_X = "Location: Communication Method Telephone, Change Parameters
* LOCATION_FAX = "Location: Communication Method Fax
* LOCATION_FAX_X = "Location: Communication Method Fax, Change Parameters
* LOCATION_URI = "Location: Communication Method URI
* LOCATION_HEAD_X = "Location: Header Data, Change Parameters
* LOCATION_URI_X = "Location: Communication Method URI, Change Parameters
* LOCATION_MODEL = "Location: Model Assignment
* RETURN = "Return Parameters
* EXTENSION_IN = "Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
* LOCATION_SPP = "Location: Service Parts Planning
* LOCATION_SPP_X = "Location: Service Parts Planning, Change Parameters
* LOCATION_ALTERNATIVE_ID = "Location: Alternative Location Identifiers
* LOCATION_GEOCODING = "Location: Geo Coding Data
* LOCATION_GEOCODING_X = "Location: Geo Coding Data, Change
* LOCATION_MAPPING = "Location: Mapping Information
* LOCATION_MAPPING_X = "Location: Mapping Information, Change Parameters
* LOCATION_SUBLOCATION = "Location: Storage Locations
* LOCATION_SUBLOCATION_X = "Location: Storage Locations, Change Parameters
* LOCATION_VERSION = "Location: Version-Dependent Data
* LOCATION_VERSION_X = "Location: Version-Dependent Data, Change Parameters
* LOCATION_TEXT = "Location: Language-Dependent Short Texts
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPL10002_001 User Exit for Method 'SaveMultiple' of Business Object BUS10002
EXIT_SAPL10002_002 User Exit for Method 'GetList' of Business Object BUS10002
EXIT_SAPL10002_003 User Exit for Method 'DeleteMultiple' of Business Object BUS10002
IMPORTING Parameters details for BAPI_LOCSRVAPS_SAVEMULTI2
LOGICAL_SYSTEM - Logical System from which Message Originates
Data type: BAPISCMBGENFIELDS-LOGICAL_SYSTEMOptional: No
Call by Reference: No ( called with pass by value option)
SAVE_OPTIONS - Settings for Saving Data
Data type: BAPI10002SAVEOPTIONSOptional: Yes
Call by Reference: No ( called with pass by value option)
COMMIT_CONTROL - Update Control
Data type: BAPI10002GENFIELDS-COMMIT_CONTROLOptional: Yes
Call by Reference: No ( called with pass by value option)
BUSINESS_SYSTEM_GROUP - Business System Group
Data type: BAPISCMBGENFIELDS-LOGQSOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_LOCSRVAPS_SAVEMULTI2
LOCATION_HEAD - Location: Header Data
Data type: BAPI10002LOC2Optional: Yes
Call by Reference: Yes
LOCATION_TEXT_X - Location: Language-Dependent Short Texts, Change Parameters
Data type: BAPI10002LOCTEXT2XOptional: Yes
Call by Reference: Yes
LOCATION_ADDRESS - Location: Address Data
Data type: BAPI10002LOCADDR2Optional: Yes
Call by Reference: Yes
LOCATION_ADDRESS_X - Location: Address Data, Change Parameters
Data type: BAPI10002LOCADDR2XOptional: Yes
Call by Reference: Yes
LOCATION_SMTP - Location: Communication Method SMTP
Data type: BAPI10002LOCSMTP2Optional: Yes
Call by Reference: Yes
LOCATION_SMTP_X - Location: Communication Method SMTP, Change Parameters
Data type: BAPI10002LOCSMTP2XOptional: Yes
Call by Reference: Yes
LOCATION_TEL - Location: Communication Method Telephone
Data type: BAPI10002LOCTEL2Optional: Yes
Call by Reference: Yes
LOCATION_TEL_X - Location: Communication Method Telephone, Change Parameters
Data type: BAPI10002LOCTEL2XOptional: Yes
Call by Reference: Yes
LOCATION_FAX - Location: Communication Method Fax
Data type: BAPI10002LOCFAX2Optional: Yes
Call by Reference: Yes
LOCATION_FAX_X - Location: Communication Method Fax, Change Parameters
Data type: BAPI10002LOCFAX2XOptional: Yes
Call by Reference: Yes
LOCATION_URI - Location: Communication Method URI
Data type: BAPI10002LOCURI2Optional: Yes
Call by Reference: Yes
LOCATION_HEAD_X - Location: Header Data, Change Parameters
Data type: BAPI10002LOC2XOptional: Yes
Call by Reference: Yes
LOCATION_URI_X - Location: Communication Method URI, Change Parameters
Data type: BAPI10002LOCURI2XOptional: Yes
Call by Reference: Yes
LOCATION_MODEL - Location: Model Assignment
Data type: BAPI10002LOCMODEL2Optional: Yes
Call by Reference: Yes
RETURN - Return Parameters
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
EXTENSION_IN - Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
LOCATION_SPP - Location: Service Parts Planning
Data type: BAPI10002LOCSPPOptional: Yes
Call by Reference: Yes
LOCATION_SPP_X - Location: Service Parts Planning, Change Parameters
Data type: BAPI10002LOCSPPXOptional: Yes
Call by Reference: Yes
LOCATION_ALTERNATIVE_ID - Location: Alternative Location Identifiers
Data type: BAPI10002LOCALTIDOptional: Yes
Call by Reference: Yes
LOCATION_GEOCODING - Location: Geo Coding Data
Data type: BAPI10002LOCGC2Optional: Yes
Call by Reference: Yes
LOCATION_GEOCODING_X - Location: Geo Coding Data, Change
Data type: BAPI10002LOCGC2XOptional: Yes
Call by Reference: Yes
LOCATION_MAPPING - Location: Mapping Information
Data type: BAPI10002LOCMAP2Optional: Yes
Call by Reference: Yes
LOCATION_MAPPING_X - Location: Mapping Information, Change Parameters
Data type: BAPI10002LOCMAP2XOptional: Yes
Call by Reference: Yes
LOCATION_SUBLOCATION - Location: Storage Locations
Data type: BAPI10002SUBLOC2Optional: Yes
Call by Reference: Yes
LOCATION_SUBLOCATION_X - Location: Storage Locations, Change Parameters
Data type: BAPI10002SUBLOC2XOptional: Yes
Call by Reference: Yes
LOCATION_VERSION - Location: Version-Dependent Data
Data type: BAPI10002LOCVERS2Optional: Yes
Call by Reference: Yes
LOCATION_VERSION_X - Location: Version-Dependent Data, Change Parameters
Data type: BAPI10002LOCVERS2XOptional: Yes
Call by Reference: Yes
LOCATION_TEXT - Location: Language-Dependent Short Texts
Data type: BAPI10002LOCTEXT2Optional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_LOCSRVAPS_SAVEMULTI2 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: | ||||
| lt_location_head | TYPE STANDARD TABLE OF BAPI10002LOC2, " | |||
| lv_logical_system | TYPE BAPISCMBGENFIELDS-LOGICAL_SYSTEM, " | |||
| lt_location_text_x | TYPE STANDARD TABLE OF BAPI10002LOCTEXT2X, " | |||
| lt_location_address | TYPE STANDARD TABLE OF BAPI10002LOCADDR2, " | |||
| lt_location_address_x | TYPE STANDARD TABLE OF BAPI10002LOCADDR2X, " | |||
| lt_location_smtp | TYPE STANDARD TABLE OF BAPI10002LOCSMTP2, " | |||
| lt_location_smtp_x | TYPE STANDARD TABLE OF BAPI10002LOCSMTP2X, " | |||
| lt_location_tel | TYPE STANDARD TABLE OF BAPI10002LOCTEL2, " | |||
| lt_location_tel_x | TYPE STANDARD TABLE OF BAPI10002LOCTEL2X, " | |||
| lt_location_fax | TYPE STANDARD TABLE OF BAPI10002LOCFAX2, " | |||
| lt_location_fax_x | TYPE STANDARD TABLE OF BAPI10002LOCFAX2X, " | |||
| lt_location_uri | TYPE STANDARD TABLE OF BAPI10002LOCURI2, " | |||
| lv_save_options | TYPE BAPI10002SAVEOPTIONS, " | |||
| lt_location_head_x | TYPE STANDARD TABLE OF BAPI10002LOC2X, " | |||
| lt_location_uri_x | TYPE STANDARD TABLE OF BAPI10002LOCURI2X, " | |||
| lt_location_model | TYPE STANDARD TABLE OF BAPI10002LOCMODEL2, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lt_extension_in | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lt_location_spp | TYPE STANDARD TABLE OF BAPI10002LOCSPP, " | |||
| lt_location_spp_x | TYPE STANDARD TABLE OF BAPI10002LOCSPPX, " | |||
| lt_location_alternative_id | TYPE STANDARD TABLE OF BAPI10002LOCALTID, " | |||
| lt_location_geocoding | TYPE STANDARD TABLE OF BAPI10002LOCGC2, " | |||
| lt_location_geocoding_x | TYPE STANDARD TABLE OF BAPI10002LOCGC2X, " | |||
| lv_commit_control | TYPE BAPI10002GENFIELDS-COMMIT_CONTROL, " | |||
| lt_location_mapping | TYPE STANDARD TABLE OF BAPI10002LOCMAP2, " | |||
| lt_location_mapping_x | TYPE STANDARD TABLE OF BAPI10002LOCMAP2X, " | |||
| lv_business_system_group | TYPE BAPISCMBGENFIELDS-LOGQS, " | |||
| lt_location_sublocation | TYPE STANDARD TABLE OF BAPI10002SUBLOC2, " | |||
| lt_location_sublocation_x | TYPE STANDARD TABLE OF BAPI10002SUBLOC2X, " | |||
| lt_location_version | TYPE STANDARD TABLE OF BAPI10002LOCVERS2, " | |||
| lt_location_version_x | TYPE STANDARD TABLE OF BAPI10002LOCVERS2X, " | |||
| lt_location_text | TYPE STANDARD TABLE OF BAPI10002LOCTEXT2. " |
|   CALL FUNCTION 'BAPI_LOCSRVAPS_SAVEMULTI2' "Create or Change Location Data |
| EXPORTING | ||
| LOGICAL_SYSTEM | = lv_logical_system | |
| SAVE_OPTIONS | = lv_save_options | |
| COMMIT_CONTROL | = lv_commit_control | |
| BUSINESS_SYSTEM_GROUP | = lv_business_system_group | |
| TABLES | ||
| LOCATION_HEAD | = lt_location_head | |
| LOCATION_TEXT_X | = lt_location_text_x | |
| LOCATION_ADDRESS | = lt_location_address | |
| LOCATION_ADDRESS_X | = lt_location_address_x | |
| LOCATION_SMTP | = lt_location_smtp | |
| LOCATION_SMTP_X | = lt_location_smtp_x | |
| LOCATION_TEL | = lt_location_tel | |
| LOCATION_TEL_X | = lt_location_tel_x | |
| LOCATION_FAX | = lt_location_fax | |
| LOCATION_FAX_X | = lt_location_fax_x | |
| LOCATION_URI | = lt_location_uri | |
| LOCATION_HEAD_X | = lt_location_head_x | |
| LOCATION_URI_X | = lt_location_uri_x | |
| LOCATION_MODEL | = lt_location_model | |
| RETURN | = lt_return | |
| EXTENSION_IN | = lt_extension_in | |
| LOCATION_SPP | = lt_location_spp | |
| LOCATION_SPP_X | = lt_location_spp_x | |
| LOCATION_ALTERNATIVE_ID | = lt_location_alternative_id | |
| LOCATION_GEOCODING | = lt_location_geocoding | |
| LOCATION_GEOCODING_X | = lt_location_geocoding_x | |
| LOCATION_MAPPING | = lt_location_mapping | |
| LOCATION_MAPPING_X | = lt_location_mapping_x | |
| LOCATION_SUBLOCATION | = lt_location_sublocation | |
| LOCATION_SUBLOCATION_X | = lt_location_sublocation_x | |
| LOCATION_VERSION | = lt_location_version | |
| LOCATION_VERSION_X | = lt_location_version_x | |
| LOCATION_TEXT | = lt_location_text | |
| . " BAPI_LOCSRVAPS_SAVEMULTI2 | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_LOCSRVAPS_SAVEMULTI2
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 LOGICAL_SYSTEM FROM BAPISCMBGENFIELDS INTO @DATA(ld_logical_system). | ||||
| "SELECT single COMMIT_CONTROL FROM BAPI10002GENFIELDS INTO @DATA(ld_commit_control). | ||||
| "SELECT single LOGQS FROM BAPISCMBGENFIELDS INTO @DATA(ld_business_system_group). | ||||
Search for further information about these or an SAP related objects