SAP BAPI_FUNCLOC_CREATE Function Module for PM BAPI: Create Functional Location
BAPI_FUNCLOC_CREATE is a standard bapi funcloc create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for PM BAPI: Create Functional Location 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 funcloc create FM, simply by entering the name BAPI_FUNCLOC_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: ITOB_BAPI_FL
Program Name: SAPLITOB_BAPI_FL
Main Program: SAPLITOB_BAPI_FL
Appliation area:
Release date: 12-Nov-2009
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_FUNCLOC_CREATE 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_FUNCLOC_CREATE'"PM BAPI: Create Functional Location.
EXPORTING
EXTERNAL_NUMBER = "Functional Location Label
* LABELING_SYSTEM = "Labeling System for Functional Locations
DATA_GENERAL = "PM: BAPI Structure for ITOBAPI_CREATE + READ Fields
DATA_SPECIFIC = "PM: BAPI Structure for ITOBAPI_CREATE_FL_ONLY + READ Fields
* AUTOMATIC_INSTALL = "Automatic Installation According to Structure Indicator
IMPORTING
FUNCTLOCATION = "Functional Location Key
DATA_GENERAL_EXP = "PM: BAPI Structure for ITOBAPI_CREATE + READ Fields
DATA_SPECIFIC_EXP = "PM: BAPI Structure for ITOBAPI_CREATE_FL_ONLY + READ Fields
RETURN = "Return Parameter
IMPORTING Parameters details for BAPI_FUNCLOC_CREATE
EXTERNAL_NUMBER - Functional Location Label
Data type: BAPI_ITOB_PARMS-FUNCLOCOptional: No
Call by Reference: No ( called with pass by value option)
LABELING_SYSTEM - Labeling System for Functional Locations
Data type: BAPI_ITOB_PARMS-LABEL_SYSTOptional: Yes
Call by Reference: No ( called with pass by value option)
DATA_GENERAL - PM: BAPI Structure for ITOBAPI_CREATE + READ Fields
Data type: BAPI_ITOBOptional: No
Call by Reference: No ( called with pass by value option)
DATA_SPECIFIC - PM: BAPI Structure for ITOBAPI_CREATE_FL_ONLY + READ Fields
Data type: BAPI_ITOB_FL_ONLYOptional: No
Call by Reference: No ( called with pass by value option)
AUTOMATIC_INSTALL - Automatic Installation According to Structure Indicator
Data type: BAPIFLAG-BAPIFLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_FUNCLOC_CREATE
FUNCTLOCATION - Functional Location Key
Data type: BAPI_ITOB_PARMS-FUNCLOC_INTOptional: No
Call by Reference: No ( called with pass by value option)
DATA_GENERAL_EXP - PM: BAPI Structure for ITOBAPI_CREATE + READ Fields
Data type: BAPI_ITOBOptional: No
Call by Reference: No ( called with pass by value option)
DATA_SPECIFIC_EXP - PM: BAPI Structure for ITOBAPI_CREATE_FL_ONLY + READ Fields
Data type: BAPI_ITOB_FL_ONLYOptional: No
Call by Reference: No ( called with pass by value option)
RETURN - Return Parameter
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_FUNCLOC_CREATE 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_functlocation | TYPE BAPI_ITOB_PARMS-FUNCLOC_INT, " | |||
| lv_external_number | TYPE BAPI_ITOB_PARMS-FUNCLOC, " | |||
| lv_labeling_system | TYPE BAPI_ITOB_PARMS-LABEL_SYST, " | |||
| lv_data_general_exp | TYPE BAPI_ITOB, " | |||
| lv_data_general | TYPE BAPI_ITOB, " | |||
| lv_data_specific_exp | TYPE BAPI_ITOB_FL_ONLY, " | |||
| lv_return | TYPE BAPIRET2, " | |||
| lv_data_specific | TYPE BAPI_ITOB_FL_ONLY, " | |||
| lv_automatic_install | TYPE BAPIFLAG-BAPIFLAG. " |
|   CALL FUNCTION 'BAPI_FUNCLOC_CREATE' "PM BAPI: Create Functional Location |
| EXPORTING | ||
| EXTERNAL_NUMBER | = lv_external_number | |
| LABELING_SYSTEM | = lv_labeling_system | |
| DATA_GENERAL | = lv_data_general | |
| DATA_SPECIFIC | = lv_data_specific | |
| AUTOMATIC_INSTALL | = lv_automatic_install | |
| IMPORTING | ||
| FUNCTLOCATION | = lv_functlocation | |
| DATA_GENERAL_EXP | = lv_data_general_exp | |
| DATA_SPECIFIC_EXP | = lv_data_specific_exp | |
| RETURN | = lv_return | |
| . " BAPI_FUNCLOC_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_FUNCLOC_CREATE
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 FUNCLOC_INT FROM BAPI_ITOB_PARMS INTO @DATA(ld_functlocation). | ||||
| "SELECT single FUNCLOC FROM BAPI_ITOB_PARMS INTO @DATA(ld_external_number). | ||||
| "SELECT single LABEL_SYST FROM BAPI_ITOB_PARMS INTO @DATA(ld_labeling_system). | ||||
| "SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_automatic_install). | ||||
Search for further information about these or an SAP related objects