SAP LTRS_RESOURCE_LOCATION Function Module for Update data about current resource location









LTRS_RESOURCE_LOCATION is a standard ltrs resource location 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 data about current resource 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 ltrs resource location FM, simply by entering the name LTRS_RESOURCE_LOCATION into the relevant SAP transaction such as SE37 or SE38.

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



Function LTRS_RESOURCE_LOCATION 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 'LTRS_RESOURCE_LOCATION'"Update data about current resource location
EXPORTING
I_LOCAT = "Site
I_WORKER = "Resource element
I_RESLOC = "Resource current location
* I_RSRCE = "Resource

EXCEPTIONS
WRONG_RESOURCE_LOCATION = 1
.



IMPORTING Parameters details for LTRS_RESOURCE_LOCATION

I_LOCAT - Site

Data type: LLOCT-LOCAT
Optional: No
Call by Reference: Yes

I_WORKER - Resource element

Data type: LELMT-ELMNT
Optional: No
Call by Reference: Yes

I_RESLOC - Resource current location

Data type: LRSRC-RNODE_ND
Optional: No
Call by Reference: Yes

I_RSRCE - Resource

Data type: LRSRC-RSRCE
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

WRONG_RESOURCE_LOCATION - Entered resource location is wrong

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for LTRS_RESOURCE_LOCATION 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_locat  TYPE LLOCT-LOCAT, "   
lv_wrong_resource_location  TYPE LLOCT, "   
lv_i_worker  TYPE LELMT-ELMNT, "   
lv_i_resloc  TYPE LRSRC-RNODE_ND, "   
lv_i_rsrce  TYPE LRSRC-RSRCE. "   

  CALL FUNCTION 'LTRS_RESOURCE_LOCATION'  "Update data about current resource location
    EXPORTING
         I_LOCAT = lv_i_locat
         I_WORKER = lv_i_worker
         I_RESLOC = lv_i_resloc
         I_RSRCE = lv_i_rsrce
    EXCEPTIONS
        WRONG_RESOURCE_LOCATION = 1
. " LTRS_RESOURCE_LOCATION




ABAP code using 7.40 inline data declarations to call FM LTRS_RESOURCE_LOCATION

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 LOCAT FROM LLOCT INTO @DATA(ld_i_locat).
 
 
"SELECT single ELMNT FROM LELMT INTO @DATA(ld_i_worker).
 
"SELECT single RNODE_ND FROM LRSRC INTO @DATA(ld_i_resloc).
 
"SELECT single RSRCE FROM LRSRC INTO @DATA(ld_i_rsrce).
 


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!