SAP OIJ_ROUTE_READ Function Module for Read route for TSW locations









OIJ_ROUTE_READ is a standard oij route read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read route for TSW locations 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 oij route read FM, simply by entering the name OIJ_ROUTE_READ into the relevant SAP transaction such as SE37 or SE38.

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



Function OIJ_ROUTE_READ 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 'OIJ_ROUTE_READ'"Read  route for TSW locations
EXPORTING
* IT_TSYST = "Transport system
IT_LOCSEQ = "Location sequence
* IV_ROUTE = "Route
* IV_CHECK_TYPE = ' ' "' ' = location contained in route; 'S' = location sequence; 'T' Date/time
* IV_TOLERANCE = 101 "Tolerance in percent for stage duration for timestamp check
* IV_LOC_RAISE_ERROR = 'X' "Raise error if no stage point could be derived for TSW location
* IV_TSYST_CHECK = ' ' "Check transport system against route definition

IMPORTING
ET_ROUTE_INFO = "Routes
EV_ROUTE_SHORTEST = "Routes
EV_ROUTE_TOT_FASTEST = "Routes
EV_ROUTE_TRV_FASTEST = "Route
ET_ROUTE_TS_CON_LOC = "Route info Transport system connection locations

EXCEPTIONS
NO_ROUTE_FOUND = 1 NO_STAGE_POINT_FOR_TSW_LOC = 2 TIMESTAMP_ERROR = 3
.



IMPORTING Parameters details for OIJ_ROUTE_READ

IT_TSYST - Transport system

Data type: ROIJTS_KEY_T
Optional: Yes
Call by Reference: Yes

IT_LOCSEQ - Location sequence

Data type: ROIJLOCSEQ_T
Optional: No
Call by Reference: Yes

IV_ROUTE - Route

Data type: ROUTE
Optional: Yes
Call by Reference: Yes

IV_CHECK_TYPE - ' ' = location contained in route; 'S' = location sequence; 'T' Date/time

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: Yes

IV_TOLERANCE - Tolerance in percent for stage duration for timestamp check

Data type: OIJ_ROUTE_TOLERANCE
Default: 101
Optional: Yes
Call by Reference: Yes

IV_LOC_RAISE_ERROR - Raise error if no stage point could be derived for TSW location

Data type: XFELD
Default: 'X'
Optional: Yes
Call by Reference: Yes

IV_TSYST_CHECK - Check transport system against route definition

Data type: CHAR1
Default: SPACE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for OIJ_ROUTE_READ

ET_ROUTE_INFO - Routes

Data type: ROIJ_ROUTE_INFO_T
Optional: No
Call by Reference: Yes

EV_ROUTE_SHORTEST - Routes

Data type: ROUTE
Optional: No
Call by Reference: Yes

EV_ROUTE_TOT_FASTEST - Routes

Data type: ROUTE
Optional: No
Call by Reference: Yes

EV_ROUTE_TRV_FASTEST - Route

Data type: ROUTE
Optional: No
Call by Reference: Yes

ET_ROUTE_TS_CON_LOC - Route info Transport system connection locations

Data type: ROIJ_ROUTE_TS_CON_LOC_T
Optional: No
Call by Reference: Yes

EXCEPTIONS details

NO_ROUTE_FOUND - no suitable route found

Data type:
Optional: No
Call by Reference: Yes

NO_STAGE_POINT_FOR_TSW_LOC - no stage point found for TSW location

Data type:
Optional: No
Call by Reference: Yes

TIMESTAMP_ERROR - Timestamp_error (date/time from > date/time to)

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for OIJ_ROUTE_READ 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_it_tsyst  TYPE ROIJTS_KEY_T, "   
lv_et_route_info  TYPE ROIJ_ROUTE_INFO_T, "   
lv_no_route_found  TYPE ROIJ_ROUTE_INFO_T, "   
lv_it_locseq  TYPE ROIJLOCSEQ_T, "   
lv_ev_route_shortest  TYPE ROUTE, "   
lv_no_stage_point_for_tsw_loc  TYPE ROUTE, "   
lv_iv_route  TYPE ROUTE, "   
lv_timestamp_error  TYPE ROUTE, "   
lv_ev_route_tot_fastest  TYPE ROUTE, "   
lv_iv_check_type  TYPE CHAR1, "   ' '
lv_ev_route_trv_fastest  TYPE ROUTE, "   
lv_iv_tolerance  TYPE OIJ_ROUTE_TOLERANCE, "   101
lv_et_route_ts_con_loc  TYPE ROIJ_ROUTE_TS_CON_LOC_T, "   
lv_iv_loc_raise_error  TYPE XFELD, "   'X'
lv_iv_tsyst_check  TYPE CHAR1. "   SPACE

  CALL FUNCTION 'OIJ_ROUTE_READ'  "Read route for TSW locations
    EXPORTING
         IT_TSYST = lv_it_tsyst
         IT_LOCSEQ = lv_it_locseq
         IV_ROUTE = lv_iv_route
         IV_CHECK_TYPE = lv_iv_check_type
         IV_TOLERANCE = lv_iv_tolerance
         IV_LOC_RAISE_ERROR = lv_iv_loc_raise_error
         IV_TSYST_CHECK = lv_iv_tsyst_check
    IMPORTING
         ET_ROUTE_INFO = lv_et_route_info
         EV_ROUTE_SHORTEST = lv_ev_route_shortest
         EV_ROUTE_TOT_FASTEST = lv_ev_route_tot_fastest
         EV_ROUTE_TRV_FASTEST = lv_ev_route_trv_fastest
         ET_ROUTE_TS_CON_LOC = lv_et_route_ts_con_loc
    EXCEPTIONS
        NO_ROUTE_FOUND = 1
        NO_STAGE_POINT_FOR_TSW_LOC = 2
        TIMESTAMP_ERROR = 3
. " OIJ_ROUTE_READ




ABAP code using 7.40 inline data declarations to call FM OIJ_ROUTE_READ

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.

 
 
 
 
 
 
 
 
 
DATA(ld_iv_check_type) = ' '.
 
 
DATA(ld_iv_tolerance) = 101.
 
 
DATA(ld_iv_loc_raise_error) = 'X'.
 
DATA(ld_iv_tsyst_check) = ' '.
 


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!