SAP BAPI_FUNCLOC_STRUC_ASSIGN Function Module for Assign Superior Functional Location
BAPI_FUNCLOC_STRUC_ASSIGN is a standard bapi funcloc struc assign SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Assign Superior 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 struc assign FM, simply by entering the name BAPI_FUNCLOC_STRUC_ASSIGN 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: 30-Aug-2007
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_FUNCLOC_STRUC_ASSIGN 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_STRUC_ASSIGN'"Assign Superior Functional Location.
EXPORTING
FUNCTLOCATION = "Functional Location
FUNCTLOCATION_SUPERIOR = "Superior functional location
* POSITION = "Position in superior technical object
VALID_FROM_ISO = "UTC Time Stamp in Short Form (YYYYMMDDhhmmss)
IMPORTING
DATA_GENERAL_EXP = "PM: BAPI Structure for ITOBAPI_CREATE + READ Fields
DATA_SPECIFIC_EXP = "PM: BAPI Structure for ITOBAPI_CREATE_FL_ONLY + READ Fields
TABLES
RETURN = "Table with BAPI Return Information
IMPORTING Parameters details for BAPI_FUNCLOC_STRUC_ASSIGN
FUNCTLOCATION - Functional Location
Data type: BAPI_ITOB_PARMS-FUNCLOC_INTOptional: No
Call by Reference: No ( called with pass by value option)
FUNCTLOCATION_SUPERIOR - Superior functional location
Data type: BAPI_ITOB_FL_ONLY-SUPFLOCOptional: No
Call by Reference: No ( called with pass by value option)
POSITION - Position in superior technical object
Data type: BAPI_ITOB_FL_ONLY-POSNROptional: Yes
Call by Reference: No ( called with pass by value option)
VALID_FROM_ISO - UTC Time Stamp in Short Form (YYYYMMDDhhmmss)
Data type: BAPI_ITOB_PARMS_TIME-TIMESTAMPOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_FUNCLOC_STRUC_ASSIGN
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)
TABLES Parameters details for BAPI_FUNCLOC_STRUC_ASSIGN
RETURN - Table with BAPI Return Information
Data type: BAPIRET2Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_FUNCLOC_STRUC_ASSIGN 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_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_functlocation | TYPE BAPI_ITOB_PARMS-FUNCLOC_INT, " | |||
| lv_data_general_exp | TYPE BAPI_ITOB, " | |||
| lv_data_specific_exp | TYPE BAPI_ITOB_FL_ONLY, " | |||
| lv_functlocation_superior | TYPE BAPI_ITOB_FL_ONLY-SUPFLOC, " | |||
| lv_position | TYPE BAPI_ITOB_FL_ONLY-POSNR, " | |||
| lv_valid_from_iso | TYPE BAPI_ITOB_PARMS_TIME-TIMESTAMP. " |
|   CALL FUNCTION 'BAPI_FUNCLOC_STRUC_ASSIGN' "Assign Superior Functional Location |
| EXPORTING | ||
| FUNCTLOCATION | = lv_functlocation | |
| FUNCTLOCATION_SUPERIOR | = lv_functlocation_superior | |
| POSITION | = lv_position | |
| VALID_FROM_ISO | = lv_valid_from_iso | |
| IMPORTING | ||
| DATA_GENERAL_EXP | = lv_data_general_exp | |
| DATA_SPECIFIC_EXP | = lv_data_specific_exp | |
| TABLES | ||
| RETURN | = lt_return | |
| . " BAPI_FUNCLOC_STRUC_ASSIGN | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_FUNCLOC_STRUC_ASSIGN
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 SUPFLOC FROM BAPI_ITOB_FL_ONLY INTO @DATA(ld_functlocation_superior). | ||||
| "SELECT single POSNR FROM BAPI_ITOB_FL_ONLY INTO @DATA(ld_position). | ||||
| "SELECT single TIMESTAMP FROM BAPI_ITOB_PARMS_TIME INTO @DATA(ld_valid_from_iso). | ||||
Search for further information about these or an SAP related objects