SAP LOCATION_TRANSLATE Function Module for









LOCATION_TRANSLATE is a standard location translate SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 translate FM, simply by entering the name LOCATION_TRANSLATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: WSO1
Program Name: SAPLWSO1
Main Program: SAPLWSO1
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function LOCATION_TRANSLATE 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_TRANSLATE'"
EXPORTING
* CLIENT = ' ' "
* PLANT = ' ' "
* TABS = ' ' "
* TABS_WRF1 = ' ' "

IMPORTING
CLIENT_RESULT = "
C_RES_FIELD = "
PLANT_RESULT = "
P_RES_FIELD = "
C_RES_FIELD_WRF1 = "

EXCEPTIONS
CLIENT_NOT_FOUND = 1 NO_MATCHING = 2 PLANT_NOT_FOUND = 3 WRONG_PARAMETERS = 4
.




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_SAPLWSO1_001 User Exit for Controling Data Adjustment for Listing/Article Maintenance
EXIT_SAPLWSO1_002 Do Not Include Supplying Plant Control in Material Maintenance
EXIT_SAPLWSO1_003 User Exit for Controling List. Conditions in Integrated Artl. Maintenance
EXIT_SAPLWSO1_004 Control for Creating Additional MVKE Data During Listing

IMPORTING Parameters details for LOCATION_TRANSLATE

CLIENT -

Data type: KNA1-KUNNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PLANT -

Data type: T001W-WERKS
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABS -

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABS_WRF1 -

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for LOCATION_TRANSLATE

CLIENT_RESULT -

Data type: KNA1-KUNNR
Optional: No
Call by Reference: No ( called with pass by value option)

C_RES_FIELD -

Data type: KNA1
Optional: No
Call by Reference: No ( called with pass by value option)

PLANT_RESULT -

Data type: T001W-WERKS
Optional: No
Call by Reference: No ( called with pass by value option)

P_RES_FIELD -

Data type: T001W
Optional: No
Call by Reference: No ( called with pass by value option)

C_RES_FIELD_WRF1 -

Data type: WRF1
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

CLIENT_NOT_FOUND - Customer not found

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_MATCHING -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PLANT_NOT_FOUND - Plant not found

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

WRONG_PARAMETERS - See Long Text

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for LOCATION_TRANSLATE 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_client  TYPE KNA1-KUNNR, "   SPACE
lv_client_result  TYPE KNA1-KUNNR, "   
lv_client_not_found  TYPE KNA1, "   
lv_plant  TYPE T001W-WERKS, "   SPACE
lv_c_res_field  TYPE KNA1, "   
lv_no_matching  TYPE KNA1, "   
lv_tabs  TYPE KNA1, "   SPACE
lv_plant_result  TYPE T001W-WERKS, "   
lv_plant_not_found  TYPE T001W, "   
lv_tabs_wrf1  TYPE T001W, "   SPACE
lv_p_res_field  TYPE T001W, "   
lv_wrong_parameters  TYPE T001W, "   
lv_c_res_field_wrf1  TYPE WRF1. "   

  CALL FUNCTION 'LOCATION_TRANSLATE'  "
    EXPORTING
         CLIENT = lv_client
         PLANT = lv_plant
         TABS = lv_tabs
         TABS_WRF1 = lv_tabs_wrf1
    IMPORTING
         CLIENT_RESULT = lv_client_result
         C_RES_FIELD = lv_c_res_field
         PLANT_RESULT = lv_plant_result
         P_RES_FIELD = lv_p_res_field
         C_RES_FIELD_WRF1 = lv_c_res_field_wrf1
    EXCEPTIONS
        CLIENT_NOT_FOUND = 1
        NO_MATCHING = 2
        PLANT_NOT_FOUND = 3
        WRONG_PARAMETERS = 4
. " LOCATION_TRANSLATE




ABAP code using 7.40 inline data declarations to call FM LOCATION_TRANSLATE

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 KUNNR FROM KNA1 INTO @DATA(ld_client).
DATA(ld_client) = ' '.
 
"SELECT single KUNNR FROM KNA1 INTO @DATA(ld_client_result).
 
 
"SELECT single WERKS FROM T001W INTO @DATA(ld_plant).
DATA(ld_plant) = ' '.
 
 
 
DATA(ld_tabs) = ' '.
 
"SELECT single WERKS FROM T001W INTO @DATA(ld_plant_result).
 
 
DATA(ld_tabs_wrf1) = ' '.
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!