SAP LOCATION_UPDATE Function Module for Update Plant Data
LOCATION_UPDATE is a standard location update SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Update Plant 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 location update FM, simply by entering the name LOCATION_UPDATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: WR01
Program Name: SAPLWR01
Main Program: SAPLWR01
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update: 1

Function LOCATION_UPDATE 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 'LOCATION_UPDATE'"Update Plant Data.
EXPORTING
I_WRF1 = "
I_YWRF1 = "
* I_SADR = "
* I_T001W = "
* I_YT001W = "
TABLES
* PI_T_XWRF12 = "
* PI_T_XWRF6 = "
* PI_T_XT023W = "
* PI_T_YT023W = "
* PI_T_XT023X = "
* PI_T_YT023X = "
* PI_T_YWRF12 = "
* PI_T_YWRF3 = "
* PI_T_XWRF3 = "
* PI_T_YWRF4 = "
* PI_T_XWRF4 = "
* PI_T_XWRF5 = "
* PI_T_YWRF5 = "
* PI_T_YWRF6 = "
IMPORTING Parameters details for LOCATION_UPDATE
I_WRF1 -
Data type: WRF1Optional: No
Call by Reference: No ( called with pass by value option)
I_YWRF1 -
Data type: WRF1Optional: No
Call by Reference: No ( called with pass by value option)
I_SADR -
Data type: SADROptional: Yes
Call by Reference: No ( called with pass by value option)
I_T001W -
Data type: T001WOptional: Yes
Call by Reference: No ( called with pass by value option)
I_YT001W -
Data type: T001WOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for LOCATION_UPDATE
PI_T_XWRF12 -
Data type: FWRF12Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_T_XWRF6 -
Data type: FWRF6Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_T_XT023W -
Data type: FT023WOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_T_YT023W -
Data type: FT023WOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_T_XT023X -
Data type: FT023XOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_T_YT023X -
Data type: FT023XOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_T_YWRF12 -
Data type: FWRF12Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_T_YWRF3 -
Data type: FWRF3Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_T_XWRF3 -
Data type: FWRF3Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_T_YWRF4 -
Data type: FWRF4Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_T_XWRF4 -
Data type: FWRF4Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_T_XWRF5 -
Data type: FWRF5Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_T_YWRF5 -
Data type: FWRF5Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_T_YWRF6 -
Data type: FWRF6Optional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for LOCATION_UPDATE 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_i_wrf1 | TYPE WRF1, " | |||
| lt_pi_t_xwrf12 | TYPE STANDARD TABLE OF FWRF12, " | |||
| lt_pi_t_xwrf6 | TYPE STANDARD TABLE OF FWRF6, " | |||
| lt_pi_t_xt023w | TYPE STANDARD TABLE OF FT023W, " | |||
| lt_pi_t_yt023w | TYPE STANDARD TABLE OF FT023W, " | |||
| lt_pi_t_xt023x | TYPE STANDARD TABLE OF FT023X, " | |||
| lt_pi_t_yt023x | TYPE STANDARD TABLE OF FT023X, " | |||
| lv_i_ywrf1 | TYPE WRF1, " | |||
| lt_pi_t_ywrf12 | TYPE STANDARD TABLE OF FWRF12, " | |||
| lv_i_sadr | TYPE SADR, " | |||
| lt_pi_t_ywrf3 | TYPE STANDARD TABLE OF FWRF3, " | |||
| lv_i_t001w | TYPE T001W, " | |||
| lt_pi_t_xwrf3 | TYPE STANDARD TABLE OF FWRF3, " | |||
| lv_i_yt001w | TYPE T001W, " | |||
| lt_pi_t_ywrf4 | TYPE STANDARD TABLE OF FWRF4, " | |||
| lt_pi_t_xwrf4 | TYPE STANDARD TABLE OF FWRF4, " | |||
| lt_pi_t_xwrf5 | TYPE STANDARD TABLE OF FWRF5, " | |||
| lt_pi_t_ywrf5 | TYPE STANDARD TABLE OF FWRF5, " | |||
| lt_pi_t_ywrf6 | TYPE STANDARD TABLE OF FWRF6. " |
|   CALL FUNCTION 'LOCATION_UPDATE' "Update Plant Data |
| EXPORTING | ||
| I_WRF1 | = lv_i_wrf1 | |
| I_YWRF1 | = lv_i_ywrf1 | |
| I_SADR | = lv_i_sadr | |
| I_T001W | = lv_i_t001w | |
| I_YT001W | = lv_i_yt001w | |
| TABLES | ||
| PI_T_XWRF12 | = lt_pi_t_xwrf12 | |
| PI_T_XWRF6 | = lt_pi_t_xwrf6 | |
| PI_T_XT023W | = lt_pi_t_xt023w | |
| PI_T_YT023W | = lt_pi_t_yt023w | |
| PI_T_XT023X | = lt_pi_t_xt023x | |
| PI_T_YT023X | = lt_pi_t_yt023x | |
| PI_T_YWRF12 | = lt_pi_t_ywrf12 | |
| PI_T_YWRF3 | = lt_pi_t_ywrf3 | |
| PI_T_XWRF3 | = lt_pi_t_xwrf3 | |
| PI_T_YWRF4 | = lt_pi_t_ywrf4 | |
| PI_T_XWRF4 | = lt_pi_t_xwrf4 | |
| PI_T_XWRF5 | = lt_pi_t_xwrf5 | |
| PI_T_YWRF5 | = lt_pi_t_ywrf5 | |
| PI_T_YWRF6 | = lt_pi_t_ywrf6 | |
| . " LOCATION_UPDATE | ||
ABAP code using 7.40 inline data declarations to call FM LOCATION_UPDATE
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.Search for further information about these or an SAP related objects